Do not speculatively execute an instruction by hoisting it to its predecessor BB if any of its operands are defined but not used in BB. The transformation will prevent the operand from being sunk into the use block.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52244 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2008-06-12 21:15:59 +00:00
parent 0d0ca8572f
commit 502a4f5162
3 changed files with 29 additions and 2 deletions

View File

@@ -161,6 +161,8 @@ public:
///
bool hasNUsesOrMore(unsigned N) const;
bool isUsedInBasicBlock(BasicBlock *BB) const;
/// getNumUses - This method computes the number of uses of this Value. This
/// is a linear time operation. Use hasOneUse, hasNUses, or hasMoreThanNUses
/// to check for specific values.