diff options
author | Owen Anderson <resistor@mac.com> | 2010-09-16 20:51:41 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2010-09-16 20:51:41 +0000 |
commit | 4e282decf3960bfa6b1fe3fd77bb51ff96121515 (patch) | |
tree | bdffe2a3ec4edaf9b9a90bf77c142d645c66e1b4 /include/llvm/Analysis | |
parent | 35aa94b229d516b9eb775ad4e13a8e2d03221cf9 (diff) | |
download | llvm-4e282decf3960bfa6b1fe3fd77bb51ff96121515.tar.gz llvm-4e282decf3960bfa6b1fe3fd77bb51ff96121515.tar.bz2 llvm-4e282decf3960bfa6b1fe3fd77bb51ff96121515.tar.xz |
Revert r114097, adding back in the assertion against replacing an Instruction by itself. Now that CorrelatedValuePropagation is
more careful not to call SimplifyInstructionsInBlock() on an unreachable block, the issue has been fixed at a higher level. Add
a big warning to SimplifyInstructionsInBlock() to hopefully prevent this in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114117 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/InstructionSimplify.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Analysis/InstructionSimplify.h b/include/llvm/Analysis/InstructionSimplify.h index f47e740a74..913fd77da3 100644 --- a/include/llvm/Analysis/InstructionSimplify.h +++ b/include/llvm/Analysis/InstructionSimplify.h @@ -71,6 +71,8 @@ namespace llvm { /// SimplifyInstruction - See if we can compute a simplified version of this /// instruction. If not, this returns null. + /// WARNING: If called on unreachable code, an instruction may be reported + /// to simplify to itself. Value *SimplifyInstruction(Instruction *I, const TargetData *TD = 0); |