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

Unified Diff: src/IceConverter.cpp

Issue 876083007: Subzero: Emit functions and global initializers in a separate thread. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: More code review changes Created 5 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/IceConverter.h ('k') | src/IceGlobalContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/IceConverter.cpp
diff --git a/src/IceConverter.cpp b/src/IceConverter.cpp
index 5316db6a07935fd89372dcc2112172ed0576a8db..ea352dde11a2ed27d7f59e770f573909995119b7 100644
--- a/src/IceConverter.cpp
+++ b/src/IceConverter.cpp
@@ -84,7 +84,9 @@ public:
: LLVM2ICEConverter(Converter), Func(nullptr) {}
void convertFunction(const Function *F) {
- Func = Ice::Cfg::create(Ctx);
+ if (Ctx->isIRGenerationDisabled())
+ return;
+ Func = Ice::Cfg::create(Ctx, Converter.getNextSequenceNumber());
Ice::Cfg::setCurrentCfg(Func.get());
VarMap.clear();
@@ -801,7 +803,7 @@ void LLVM2ICEGlobalsConverter::addGlobalInitializer(
namespace Ice {
void Converter::nameUnnamedGlobalVariables(Module *Mod) {
- const IceString &GlobalPrefix = Flags.DefaultGlobalPrefix;
+ const IceString &GlobalPrefix = Ctx->getFlags().DefaultGlobalPrefix;
if (GlobalPrefix.empty())
return;
uint32_t NameIndex = 0;
@@ -816,7 +818,7 @@ void Converter::nameUnnamedGlobalVariables(Module *Mod) {
}
void Converter::nameUnnamedFunctions(Module *Mod) {
- const IceString &FunctionPrefix = Flags.DefaultFunctionPrefix;
+ const IceString &FunctionPrefix = Ctx->getFlags().DefaultFunctionPrefix;
if (FunctionPrefix.empty())
return;
uint32_t NameIndex = 0;
@@ -883,8 +885,8 @@ void Converter::installGlobalDeclarations(Module *Mod) {
void Converter::convertGlobals(Module *Mod) {
LLVM2ICEGlobalsConverter GlobalsConverter(*this);
- VariableDeclarationList VariableDeclarations;
- GlobalsConverter.convertGlobalsToIce(Mod, VariableDeclarations);
+ VariableDeclarationList *VariableDeclarations = new VariableDeclarationList;
+ GlobalsConverter.convertGlobalsToIce(Mod, *VariableDeclarations);
lowerGlobals(VariableDeclarations);
}
« no previous file with comments | « src/IceConverter.h ('k') | src/IceGlobalContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698