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), |