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

Side by Side 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, 9 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 unified diff | Download patch
« no previous file with comments | « src/IceBrowserCompileServer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===//
2 // 2 //
3 // The Subzero Code Generator 3 // The Subzero Code Generator
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 /// 9 ///
10 /// \file 10 /// \file
(...skipping 15 matching lines...) Expand all
26 #include "IceLiveness.h" 26 #include "IceLiveness.h"
27 #include "IceLoopAnalyzer.h" 27 #include "IceLoopAnalyzer.h"
28 #include "IceOperand.h" 28 #include "IceOperand.h"
29 #include "IceTargetLowering.h" 29 #include "IceTargetLowering.h"
30 30
31 namespace Ice { 31 namespace Ice {
32 32
33 Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber) 33 Cfg::Cfg(GlobalContext *Ctx, uint32_t SequenceNumber)
34 : Ctx(Ctx), SequenceNumber(SequenceNumber), 34 : Ctx(Ctx), SequenceNumber(SequenceNumber),
35 VMask(Ctx->getFlags().getVerbose()), NextInstNumber(Inst::NumberInitial), 35 VMask(Ctx->getFlags().getVerbose()), NextInstNumber(Inst::NumberInitial),
36 Allocator(new ArenaAllocator()), Live(nullptr), 36 Live(nullptr) {
37 Target(TargetLowering::createLowering(Ctx->getFlags().getTargetArch(), 37 Allocator.reset(new ArenaAllocator());
38 this)), 38 CfgLocalAllocatorScope _(this);
39 VMetadata(new VariablesMetadata(this)), 39 Target =
40 TargetAssembler(Target->createAssembler()) { 40 TargetLowering::createLowering(Ctx->getFlags().getTargetArch(), this);
41 VMetadata.reset(new VariablesMetadata(this));
42 TargetAssembler = Target->createAssembler();
43
41 if (Ctx->getFlags().getRandomizeAndPoolImmediatesOption() == RPI_Randomize) { 44 if (Ctx->getFlags().getRandomizeAndPoolImmediatesOption() == RPI_Randomize) {
42 // If -randomize-pool-immediates=randomize, create a random number 45 // If -randomize-pool-immediates=randomize, create a random number
43 // generator to generate a cookie for constant blinding. 46 // generator to generate a cookie for constant blinding.
44 RandomNumberGenerator RNG(Ctx->getFlags().getRandomSeed(), 47 RandomNumberGenerator RNG(Ctx->getFlags().getRandomSeed(),
45 RPE_ConstantBlinding, this->SequenceNumber); 48 RPE_ConstantBlinding, this->SequenceNumber);
46 ConstantBlindingCookie = 49 ConstantBlindingCookie =
47 (uint32_t)RNG.next((uint64_t)std::numeric_limits<uint32_t>::max() + 1); 50 (uint32_t)RNG.next((uint64_t)std::numeric_limits<uint32_t>::max() + 1);
48 } 51 }
49 } 52 }
50 53
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 } 1132 }
1130 } 1133 }
1131 // Print each basic block 1134 // Print each basic block
1132 for (CfgNode *Node : Nodes) 1135 for (CfgNode *Node : Nodes)
1133 Node->dump(this); 1136 Node->dump(this);
1134 if (isVerbose(IceV_Instructions)) 1137 if (isVerbose(IceV_Instructions))
1135 Str << "}\n"; 1138 Str << "}\n";
1136 } 1139 }
1137 1140
1138 } // end of namespace Ice 1141 } // end of namespace Ice
OLDNEW
« 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