Commit 44b3ce88 by John Porto

Subzero. Fix CfgLocalAllocator bug.

parent 36d6aa65
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
// Can only compile this with the NaCl compiler (needs irt.h, and the // Can only compile this with the NaCl compiler (needs irt.h, and the
// unsandboxed LLVM build using the trusted compiler does not have irt.h). // unsandboxed LLVM build using the trusted compiler does not have irt.h).
#if PNACL_BROWSER_TRANSLATOR
#include "IceBrowserCompileServer.h" #include "IceBrowserCompileServer.h"
#if PNACL_BROWSER_TRANSLATOR
// Headers which are not properly part of the SDK are included by their path in // Headers which are not properly part of the SDK are included by their path in
// the NaCl tree. // the NaCl tree.
#ifdef __pnacl__ #ifdef __pnacl__
...@@ -230,4 +230,22 @@ void BrowserCompileServer::startCompileThread(int ObjFD) { ...@@ -230,4 +230,22 @@ void BrowserCompileServer::startCompileThread(int ObjFD) {
} // end of namespace Ice } // end of namespace Ice
#else // !PNACL_BROWSER_TRANSLATOR
#include "llvm/Support/ErrorHandling.h"
namespace Ice {
BrowserCompileServer::~BrowserCompileServer() {}
void BrowserCompileServer::run() {
llvm::report_fatal_error("no browser hookups");
}
ErrorCode &BrowserCompileServer::getErrorCode() {
llvm::report_fatal_error("no browser hookups");
}
} // end of namespace Ice
#endif // PNACL_BROWSER_TRANSLATOR #endif // PNACL_BROWSER_TRANSLATOR
...@@ -33,11 +33,14 @@ namespace Ice { ...@@ -33,11 +33,14 @@ namespace Ice {
Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber) Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber)
: Ctx(Ctx), SequenceNumber(SequenceNumber), : Ctx(Ctx), SequenceNumber(SequenceNumber),
VMask(Ctx->getFlags().getVerbose()), NextInstNumber(Inst::NumberInitial), VMask(Ctx->getFlags().getVerbose()), NextInstNumber(Inst::NumberInitial),
Allocator(new ArenaAllocator()), Live(nullptr), Live(nullptr) {
Target(TargetLowering::createLowering(Ctx->getFlags().getTargetArch(), Allocator.reset(new ArenaAllocator());
this)), CfgLocalAllocatorScope _(this);
VMetadata(new VariablesMetadata(this)), Target =
TargetAssembler(Target->createAssembler()) { TargetLowering::createLowering(Ctx->getFlags().getTargetArch(), this);
VMetadata.reset(new VariablesMetadata(this));
TargetAssembler = Target->createAssembler();
if (Ctx->getFlags().getRandomizeAndPoolImmediatesOption() == RPI_Randomize) { if (Ctx->getFlags().getRandomizeAndPoolImmediatesOption() == RPI_Randomize) {
// If -randomize-pool-immediates=randomize, create a random number // If -randomize-pool-immediates=randomize, create a random number
// generator to generate a cookie for constant blinding. // generator to generate a cookie for constant blinding.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment