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/Transforms/Utils/Local.h | |
parent | 35aa94b229d516b9eb775ad4e13a8e2d03221cf9 (diff) | |
download | external_llvm-4e282decf3960bfa6b1fe3fd77bb51ff96121515.zip external_llvm-4e282decf3960bfa6b1fe3fd77bb51ff96121515.tar.gz external_llvm-4e282decf3960bfa6b1fe3fd77bb51ff96121515.tar.bz2 |
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/Transforms/Utils/Local.h')
-rw-r--r-- | include/llvm/Transforms/Utils/Local.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index caae27f..dc18f3c 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -69,6 +69,10 @@ bool RecursivelyDeleteDeadPHINode(PHINode *PN); /// /// This returns true if it changed the code, note that it can delete /// instructions in other blocks as well in this block. +/// +/// WARNING: Do not use this function on unreachable blocks, as recursive +/// simplification is not able to handle corner-case scenarios that can +/// arise in them. bool SimplifyInstructionsInBlock(BasicBlock *BB, const TargetData *TD = 0); //===----------------------------------------------------------------------===// |