mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Do not attempt to do parial redundancy elimination on void values.
Also fixed a punctuation error in the header comment. This fixes PR3775. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66542 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
// This pass performs global value numbering to eliminate fully redundant
|
||||
// instructions. It also performs simple dead load elimination.
|
||||
//
|
||||
// Note that this pass does the value numbering itself, it does not use the
|
||||
// Note that this pass does the value numbering itself; it does not use the
|
||||
// ValueNumbering analysis passes.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
@@ -1469,8 +1469,9 @@ bool GVN::performPRE(Function& F) {
|
||||
Instruction *CurInst = BI++;
|
||||
|
||||
if (isa<AllocationInst>(CurInst) || isa<TerminatorInst>(CurInst) ||
|
||||
isa<PHINode>(CurInst) || CurInst->mayReadFromMemory() ||
|
||||
CurInst->mayWriteToMemory() || isa<DbgInfoIntrinsic>(CurInst))
|
||||
isa<PHINode>(CurInst) || (CurInst->getType() == Type::VoidTy) ||
|
||||
CurInst->mayReadFromMemory() || CurInst->mayWriteToMemory() ||
|
||||
isa<DbgInfoIntrinsic>(CurInst))
|
||||
continue;
|
||||
|
||||
uint32_t valno = VN.lookup(CurInst);
|
||||
|
||||
Reference in New Issue
Block a user