mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-09 16:45:03 +00:00
This pass is completely broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18387 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3af4b4fe78
commit
6b205c3ef1
@ -152,20 +152,13 @@ bool PRE::runOnFunction(Function &F) {
|
||||
bool PRE::ProcessBlock(BasicBlock *BB) {
|
||||
bool Changed = false;
|
||||
|
||||
// DISABLED: This pass invalidates iterators and then uses them.
|
||||
return false;
|
||||
|
||||
// PRE expressions first defined in this block...
|
||||
Instruction *PrevInst = 0;
|
||||
for (BasicBlock::iterator I = BB->begin(); I != BB->end(); )
|
||||
if (ProcessExpression(I)) {
|
||||
// The current instruction may have been deleted, make sure to back up to
|
||||
// PrevInst instead.
|
||||
if (PrevInst)
|
||||
I = PrevInst;
|
||||
else
|
||||
I = BB->begin();
|
||||
if (ProcessExpression(I++))
|
||||
Changed = true;
|
||||
} else {
|
||||
PrevInst = I++;
|
||||
}
|
||||
|
||||
return Changed;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user