Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: src/IceTargetLowering.cpp

Issue 870653002: Subzero: Initial implementation of multithreaded translation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Cleanup Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/IceTargetLowering.cpp
diff --git a/src/IceTargetLowering.cpp b/src/IceTargetLowering.cpp
index b04727de47d24742dc2333276ed166aad8307f55..dc86531fbaa10104eadd490e5d3781a1803f18e4 100644
--- a/src/IceTargetLowering.cpp
+++ b/src/IceTargetLowering.cpp
@@ -101,6 +101,34 @@ TargetLowering *TargetLowering::createLowering(TargetArch Target, Cfg *Func) {
return nullptr;
}
+void TargetLowering::emitConstants(GlobalContext *Ctx) {
+ // Wait for the worker threads to finish so that we know nothing
+ // more will be added to the constant pool.
+ Ctx->waitForWorkerThreads();
JF 2015/01/22 20:50:56 It seems somewhat obscure to have emitConstants be
jvoung (off chromium) 2015/01/22 23:06:06 Looks like it should have already been done before
Jim Stichnoth 2015/01/23 07:55:55 Done, in main(), so that startWorkerThreads() and
Jim Stichnoth 2015/01/23 07:55:55 Done.
+ if (Ctx->getFlags().DisableTranslation)
+ return;
+ TargetArch Target = Ctx->getTargetArch();
+ if (Target == Target_X8632) {
+ TargetX8632::emitConstants(Ctx);
+ return;
+ }
+#if 0
+ if (Target == Target_X8664) {
+ IceTargetX8664::emitConstants(Ctx);
+ return;
+ }
+ if (Target == Target_ARM32) {
+ IceTargetARM32::emitConstants(Ctx);
+ return;
+ }
+ if (Target == Target_ARM64) {
+ IceTargetARM64::emitConstants(Ctx);
+ return;
+ }
+#endif
+ llvm_unreachable("emitConstants: Unsupported target");
+}
+
TargetLowering::TargetLowering(Cfg *Func)
: Func(Func), Ctx(Func->getContext()),
RandomizeRegisterAllocation(CLRandomizeRegisterAllocation),

Powered by Google App Engine
This is Rietveld 408576698