diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-02-16 02:32:17 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-02-16 02:32:17 +0000 |
commit | b820508449c9b43cef82f837efc9be4f4df8c67c (patch) | |
tree | ea88d0b211460b0335d3beac2f4d467073182953 /lib/CodeGen/SimpleRegisterCoalescing.h | |
parent | 785610d18b401d3138edf13037d21d7ec89e748a (diff) | |
download | external_llvm-b820508449c9b43cef82f837efc9be4f4df8c67c.tar.gz external_llvm-b820508449c9b43cef82f837efc9be4f4df8c67c.tar.bz2 external_llvm-b820508449c9b43cef82f837efc9be4f4df8c67c.zip |
Refactor some code; check if commuteInstruction is able to commute the instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47208 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SimpleRegisterCoalescing.h')
-rw-r--r-- | lib/CodeGen/SimpleRegisterCoalescing.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.h b/lib/CodeGen/SimpleRegisterCoalescing.h index cae5e5a450..309a858758 100644 --- a/lib/CodeGen/SimpleRegisterCoalescing.h +++ b/lib/CodeGen/SimpleRegisterCoalescing.h @@ -178,6 +178,11 @@ namespace llvm { bool AdjustCopiesBackFrom(LiveInterval &IntA, LiveInterval &IntB, MachineInstr *CopyMI); + /// HasOtherReachingDefs - Return true if there are definitions of IntB + /// other than BValNo val# that can reach uses of AValno val# of IntA. + bool HasOtherReachingDefs(LiveInterval &IntA, LiveInterval &IntB, + VNInfo *AValNo, VNInfo *BValNo); + /// RemoveCopyByCommutingDef - We found a non-trivially-coalescable copy. /// If the source value number is defined by a commutable instruction and /// its other operand is coalesced to the copy dest register, see if we |