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

Side by Side Diff: src/IceTargetLoweringX86BaseImpl.h

Issue 1318553003: Compute the loop nest depth of each CfgNode and weight Variables by it. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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/IceSwitchLowering.cpp ('k') | src/IceTimerTree.def » ('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/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==// 1 //===- subzero/src/IceTargetLoweringX86BaseImpl.h - x86 lowering -*- C++ -*-==//
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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 return; 320 return;
321 Func->placePhiStores(); 321 Func->placePhiStores();
322 if (Func->hasError()) 322 if (Func->hasError())
323 return; 323 return;
324 Func->deletePhis(); 324 Func->deletePhis();
325 if (Func->hasError()) 325 if (Func->hasError())
326 return; 326 return;
327 Func->dump("After Phi lowering"); 327 Func->dump("After Phi lowering");
328 } 328 }
329 329
330 // Run this early so it can be used to focus optimizations on potentially hot
331 // code.
332 // TODO(stichnot,ascull): currently only used for regalloc not expensive high
333 // level optimizations which could be focused on potentially hot code.
334 Func->computeLoopNestDepth();
335 Func->dump("After loop nest depth analysis");
336
330 // Address mode optimization. 337 // Address mode optimization.
331 Func->getVMetadata()->init(VMK_SingleDefs); 338 Func->getVMetadata()->init(VMK_SingleDefs);
332 Func->doAddressOpt(); 339 Func->doAddressOpt();
333 340
334 // Find read-modify-write opportunities. Do this after address mode 341 // Find read-modify-write opportunities. Do this after address mode
335 // optimization so that doAddressOpt() doesn't need to be applied to RMW 342 // optimization so that doAddressOpt() doesn't need to be applied to RMW
336 // instructions as well. 343 // instructions as well.
337 findRMW(); 344 findRMW();
338 Func->dump("After RMW transform"); 345 Func->dump("After RMW transform");
339 346
(...skipping 20 matching lines...) Expand all
360 // Disable constant blinding or pooling for load optimization. 367 // Disable constant blinding or pooling for load optimization.
361 { 368 {
362 BoolFlagSaver B(RandomizationPoolingPaused, true); 369 BoolFlagSaver B(RandomizationPoolingPaused, true);
363 doLoadOpt(); 370 doLoadOpt();
364 } 371 }
365 Func->genCode(); 372 Func->genCode();
366 if (Func->hasError()) 373 if (Func->hasError())
367 return; 374 return;
368 Func->dump("After x86 codegen"); 375 Func->dump("After x86 codegen");
369 376
370 // Register allocation. This requires instruction renumbering and full 377 // Register allocation. This requires instruction renumbering and full
371 // liveness analysis. 378 // liveness analysis. Loops must be identified before liveness so variable
379 // use weights are correct.
372 Func->renumberInstructions(); 380 Func->renumberInstructions();
373 if (Func->hasError()) 381 if (Func->hasError())
374 return; 382 return;
375 Func->liveness(Liveness_Intervals); 383 Func->liveness(Liveness_Intervals);
376 if (Func->hasError()) 384 if (Func->hasError())
377 return; 385 return;
378 // Validate the live range computations. The expensive validation call is 386 // Validate the live range computations. The expensive validation call is
379 // deliberately only made when assertions are enabled. 387 // deliberately only made when assertions are enabled.
380 assert(Func->validateLiveness()); 388 assert(Func->validateLiveness());
381 // The post-codegen dump is done here, after liveness analysis and associated 389 // The post-codegen dump is done here, after liveness analysis and associated
(...skipping 4982 matching lines...) Expand 10 before | Expand all | Expand 10 after
5364 } 5372 }
5365 // the offset is not eligible for blinding or pooling, return the original 5373 // the offset is not eligible for blinding or pooling, return the original
5366 // mem operand 5374 // mem operand
5367 return MemOperand; 5375 return MemOperand;
5368 } 5376 }
5369 5377
5370 } // end of namespace X86Internal 5378 } // end of namespace X86Internal
5371 } // end of namespace Ice 5379 } // end of namespace Ice
5372 5380
5373 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H 5381 #endif // SUBZERO_SRC_ICETARGETLOWERINGX86BASEIMPL_H
OLDNEW
« no previous file with comments | « src/IceSwitchLowering.cpp ('k') | src/IceTimerTree.def » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698