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

Unified Diff: src/IceCfg.cpp

Issue 1742833002: Subzero. Fix CfgLocalAllocator bug. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/IceBrowserCompileServer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceCfg.cpp
diff --git a/src/IceCfg.cpp b/src/IceCfg.cpp
index c959784efaff94816e8153cba128b1e97cf54626..480893a4ea7fe62c475eefc79312a0ed611b83f3 100644
--- a/src/IceCfg.cpp
+++ b/src/IceCfg.cpp
@@ -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.
« no previous file with comments | « src/IceBrowserCompileServer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698