diff options
author | Pedro Lobo <pedro.lobo@tecnico.ulisboa.pt> | 2024-12-10 15:06:48 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-10 15:06:48 +0000 |
commit | d7c12ea29e614db073641f204e4619d7e54b1ff5 (patch) | |
tree | 9f031aa768e30699862b21129ae42ebcc5d8c6fe /llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | |
parent | 20b071c0ebd9a5de7e1893cf6f1d6081819015c8 (diff) | |
download | llvm-d7c12ea29e614db073641f204e4619d7e54b1ff5.zip llvm-d7c12ea29e614db073641f204e4619d7e54b1ff5.tar.gz llvm-d7c12ea29e614db073641f204e4619d7e54b1ff5.tar.bz2 |
[LoopRotate] Use `poison` instead of `undef` as placeholder in debug info [NFC] (#119135)
The `poison` values are used to substitute debug information of values
moved from the original header into the preheader that are no longer
available in the former.
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopRotationUtils.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LoopRotationUtils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp index 04042e7..fffff29 100644 --- a/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp +++ b/llvm/lib/Transforms/Utils/LoopRotationUtils.cpp @@ -171,14 +171,14 @@ static void RewriteUsesOfClonedInstructions(BasicBlock *OrigHeader, // Users in the OrigPreHeader need to use the value to which the // original definitions are mapped and anything else can be handled by // the SSAUpdater. To avoid adding PHINodes, check if the value is - // available in UserBB, if not substitute undef. + // available in UserBB, if not substitute poison. Value *NewVal; if (UserBB == OrigPreheader) NewVal = OrigPreHeaderVal; else if (SSA.HasValueForBlock(UserBB)) NewVal = SSA.GetValueInMiddleOfBlock(UserBB); else - NewVal = UndefValue::get(OrigHeaderVal->getType()); + NewVal = PoisonValue::get(OrigHeaderVal->getType()); DbgValue->replaceVariableLocationOp(OrigHeaderVal, NewVal); } @@ -194,14 +194,14 @@ static void RewriteUsesOfClonedInstructions(BasicBlock *OrigHeader, // Users in the OrigPreHeader need to use the value to which the // original definitions are mapped and anything else can be handled by // the SSAUpdater. To avoid adding PHINodes, check if the value is - // available in UserBB, if not substitute undef. + // available in UserBB, if not substitute poison. Value *NewVal; if (UserBB == OrigPreheader) NewVal = OrigPreHeaderVal; else if (SSA.HasValueForBlock(UserBB)) NewVal = SSA.GetValueInMiddleOfBlock(UserBB); else - NewVal = UndefValue::get(OrigHeaderVal->getType()); + NewVal = PoisonValue::get(OrigHeaderVal->getType()); DVR->replaceVariableLocationOp(OrigHeaderVal, NewVal); } } |