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
This commit is contained in:
Owen Anderson
2010-09-16 20:51:41 +00:00
parent 35aa94b229
commit 4e282decf3
3 changed files with 17 additions and 24 deletions

View File

@@ -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);