Commit 44b3ce88 by John Porto

Subzero. Fix CfgLocalAllocator bug.

parent 36d6aa65
......@@ -14,10 +14,10 @@
// 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).
#if PNACL_BROWSER_TRANSLATOR
#include "IceBrowserCompileServer.h"
#if PNACL_BROWSER_TRANSLATOR
// Headers which are not properly part of the SDK are included by their path in
// the NaCl tree.
#ifdef __pnacl__
......@@ -230,4 +230,22 @@ void BrowserCompileServer::startCompileThread(int ObjFD) {
} // 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
......@@ -33,11 +33,14 @@ namespace Ice {
Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber)
: Ctx(Ctx), SequenceNumber(SequenceNumber),
VMask(Ctx->getFlags().getVerbose()), NextInstNumber(Inst::NumberInitial),
Allocator(new ArenaAllocator()), Live(nullptr),
Target(TargetLowering::createLowering(Ctx->getFlags().getTargetArch(),
this)),
VMetadata(new VariablesMetadata(this)),
TargetAssembler(Target->createAssembler()) {
Live(nullptr) {
Allocator.reset(new ArenaAllocator());
CfgLocalAllocatorScope _(this);
Target =
TargetLowering::createLowering(Ctx->getFlags().getTargetArch(), this);
VMetadata.reset(new VariablesMetadata(this));
TargetAssembler = Target->createAssembler();
if (Ctx->getFlags().getRandomizeAndPoolImmediatesOption() == RPI_Randomize) {
// If -randomize-pool-immediates=randomize, create a random number
// 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