diff options
author | Dan Gohman <gohman@apple.com> | 2012-04-12 23:31:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2012-04-12 23:31:46 +0000 |
commit | 558ece284cef9d42a96577f3943cb3efee8904e0 (patch) | |
tree | 361530840f20c8339710aea15f6f90e7c4a2e71e /include | |
parent | 2a7d3a93735f97c2a4cabcc08a88d702c28cb0d4 (diff) | |
download | external_llvm-558ece284cef9d42a96577f3943cb3efee8904e0.zip external_llvm-558ece284cef9d42a96577f3943cb3efee8904e0.tar.gz external_llvm-558ece284cef9d42a96577f3943cb3efee8904e0.tar.bz2 |
Add forms of dominates and isReachableFromEntry that accept a Use
directly instead of a user Instruction. This allows them to test
whether a def dominates a particular operand if the user instruction
is a PHI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154631 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index 372465a..6e8e424 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -775,6 +775,7 @@ public: // dominates - Return true if Def dominates a use in User. This performs // the special checks necessary if Def and User are in the same basic block. // Note that Def doesn't dominate a use in Def itself! + bool dominates(const Instruction *Def, const Use &U) const; bool dominates(const Instruction *Def, const Instruction *User) const; bool dominates(const Instruction *Def, const BasicBlock *BB) const; @@ -843,6 +844,8 @@ public: return DT->isReachableFromEntry(A); } + bool isReachableFromEntry(const Use &U) const; + virtual void releaseMemory() { DT->releaseMemory(); |