mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-22 07:24:47 +00:00
Add range adapters predecessors() and successors() for BBs
Use them in two isolated transforms so we know they work and aren't dead code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228173 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -561,8 +561,7 @@ bool ArgPromotion::isSafeToPromoteArgument(Argument *Arg,
|
||||
// Now check every path from the entry block to the load for transparency.
|
||||
// To do this, we perform a depth first search on the inverse CFG from the
|
||||
// loading block.
|
||||
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) {
|
||||
BasicBlock *P = *PI;
|
||||
for (BasicBlock *P : predecessors(BB)) {
|
||||
for (BasicBlock *TranspBB : inverse_depth_first_ext(P, TranspBlocks))
|
||||
if (AA.canBasicBlockModify(*TranspBB, Loc))
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user