mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-15 19:24:33 +00:00
[PHITransAddr] Don't translate unreachable values
Unreachable values may use themselves in strange ways due to their dominance property. Attempting to translate through them can lead to infinite recursion, crashing LLVM. Instead, claim that we weren't able to translate the value. This fixes PR23096. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238702 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -75,12 +75,12 @@ public:
|
||||
bool IsPotentiallyPHITranslatable() const;
|
||||
|
||||
/// PHITranslateValue - PHI translate the current address up the CFG from
|
||||
/// CurBB to Pred, updating our state to reflect any needed changes. If the
|
||||
/// dominator tree DT is non-null, the translated value must dominate
|
||||
/// CurBB to Pred, updating our state to reflect any needed changes. If
|
||||
/// 'MustDominate' is true, the translated value must dominate
|
||||
/// PredBB. This returns true on failure and sets Addr to null.
|
||||
bool PHITranslateValue(BasicBlock *CurBB, BasicBlock *PredBB,
|
||||
const DominatorTree *DT);
|
||||
|
||||
const DominatorTree *DT, bool MustDominate);
|
||||
|
||||
/// PHITranslateWithInsertion - PHI translate this value into the specified
|
||||
/// predecessor block, inserting a computation of the value if it is
|
||||
/// unavailable.
|
||||
|
Reference in New Issue
Block a user