mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 02:24:22 +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:
@ -1278,8 +1278,7 @@ getNonLocalPointerDepFromBB(Instruction *QueryInst,
|
||||
// Get the PHI translated pointer in this predecessor. This can fail if
|
||||
// not translatable, in which case the getAddr() returns null.
|
||||
PHITransAddr &PredPointer = PredList.back().second;
|
||||
PredPointer.PHITranslateValue(BB, Pred, nullptr);
|
||||
|
||||
PredPointer.PHITranslateValue(BB, Pred, DT, /*MustDominate=*/false);
|
||||
Value *PredPtrVal = PredPointer.getAddr();
|
||||
|
||||
// Check to see if we have already visited this pred block with another
|
||||
|
Reference in New Issue
Block a user