mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Fix FoldSingleEntryPHINodes to update memdep and AA when it deletes
phi nodes. It is called from MergeBlockIntoPredecessor which is called from GVN, which claims to preserve these. I'm skeptical that this is the actual problem behind PR8954, but this is a stab in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123222 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1741,8 +1741,8 @@ bool GVN::runOnFunction(Function& F) {
|
||||
// Merge unconditional branches, allowing PRE to catch more
|
||||
// optimization opportunities.
|
||||
for (Function::iterator FI = F.begin(), FE = F.end(); FI != FE; ) {
|
||||
BasicBlock *BB = FI;
|
||||
++FI;
|
||||
BasicBlock *BB = FI++;
|
||||
|
||||
bool removedBlock = MergeBlockIntoPredecessor(BB, this);
|
||||
if (removedBlock) ++NumGVNBlocks;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user