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

Side by Side Diff: src/llvm2ice.cpp

Issue 680733002: Subzero: Allow delaying Phi lowering until after register allocation. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix vector const undef lowering for phis. Created 6 years, 1 month 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/IceTypes.cpp ('k') | tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll » ('j') | 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/llvm2ice.cpp - Driver for testing ----------------------===// 1 //===- subzero/src/llvm2ice.cpp - Driver for testing ----------------------===//
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 // This file defines a driver that uses LLVM capabilities to parse a 10 // This file defines a driver that uses LLVM capabilities to parse a
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 cl::desc("Use integrated assembler (default yes)"), 162 cl::desc("Use integrated assembler (default yes)"),
163 cl::init(true)); 163 cl::init(true));
164 164
165 static cl::alias UseIas("ias", cl::desc("Alias for -integrated-as"), 165 static cl::alias UseIas("ias", cl::desc("Alias for -integrated-as"),
166 cl::NotHidden, cl::aliasopt(UseIntegratedAssembler)); 166 cl::NotHidden, cl::aliasopt(UseIntegratedAssembler));
167 167
168 static cl::opt<bool> AlwaysExitSuccess( 168 static cl::opt<bool> AlwaysExitSuccess(
169 "exit-success", cl::desc("Exit with success status, even if errors found"), 169 "exit-success", cl::desc("Exit with success status, even if errors found"),
170 cl::init(false)); 170 cl::init(false));
171 171
172 static cl::opt<bool> GenerateBuildAtts( 172 static cl::opt<bool>
173 "build-atts", cl::desc("Generate list of build attributes associated with " 173 GenerateBuildAtts("build-atts",
174 cl::desc("Generate list of build attributes associated with "
174 "this executable."), 175 "this executable."),
175 cl::init(false)); 176 cl::init(false));
176 177
177 static int GetReturnValue(int Val) { 178 static int GetReturnValue(int Val) {
178 if (AlwaysExitSuccess) 179 if (AlwaysExitSuccess)
179 return 0; 180 return 0;
180 return Val; 181 return Val;
181 } 182 }
182 183
183 static struct { 184 static struct {
184 const char *FlagName; 185 const char *FlagName;
185 int FlagValue; 186 int FlagValue;
186 } ConditionalBuildAttributes[] = { 187 } ConditionalBuildAttributes[] = { { "text_asm", ALLOW_TEXT_ASM },
187 { "text_asm", ALLOW_TEXT_ASM }, 188 { "dump", ALLOW_DUMP },
188 { "dump", ALLOW_DUMP }, 189 { "llvm_cl", ALLOW_LLVM_CL },
189 { "llvm_cl", ALLOW_LLVM_CL }, 190 { "llvm_ir", ALLOW_LLVM_IR },
190 { "llvm_ir", ALLOW_LLVM_IR }, 191 { "llvm_ir_as_input",
191 { "llvm_ir_as_input", ALLOW_LLVM_IR_AS_INPUT } 192 ALLOW_LLVM_IR_AS_INPUT } };
192 };
193 193
194 // Validates values of build attributes. Prints them to Stream if 194 // Validates values of build attributes. Prints them to Stream if
195 // Stream is non-null. 195 // Stream is non-null.
196 static void ValidateAndGenerateBuildAttributes(raw_os_ostream *Stream) { 196 static void ValidateAndGenerateBuildAttributes(raw_os_ostream *Stream) {
197 197
198 if (Stream) 198 if (Stream)
199 *Stream << TargetArch << "\n"; 199 *Stream << TargetArch << "\n";
200 200
201 for (size_t i = 0; i < array_lengthof(ConditionalBuildAttributes); ++i) { 201 for (size_t i = 0; i < array_lengthof(ConditionalBuildAttributes); ++i) {
202 switch (ConditionalBuildAttributes[i].FlagValue) { 202 switch (ConditionalBuildAttributes[i].FlagValue) {
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 if (TimeEachFunction) { 298 if (TimeEachFunction) {
299 const bool DumpCumulative = false; 299 const bool DumpCumulative = false;
300 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative); 300 Ctx.dumpTimers(Ice::GlobalContext::TSK_Funcs, DumpCumulative);
301 } 301 }
302 if (SubzeroTimingEnabled) 302 if (SubzeroTimingEnabled)
303 Ctx.dumpTimers(); 303 Ctx.dumpTimers();
304 const bool FinalStats = true; 304 const bool FinalStats = true;
305 Ctx.dumpStats("_FINAL_", FinalStats); 305 Ctx.dumpStats("_FINAL_", FinalStats);
306 return GetReturnValue(ErrorStatus); 306 return GetReturnValue(ErrorStatus);
307 } 307 }
OLDNEW
« no previous file with comments | « src/IceTypes.cpp ('k') | tests_lit/llvm2ice_tests/nacl-atomic-cmpxchg-optimization.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698