diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-11-03 07:20:12 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-11-03 07:20:12 +0000 |
commit | c92da3882ee4e18153bb36fcdf33af393aba8259 (patch) | |
tree | cfa61b666bad819e19da4b419ff10dd14365c76b /include/llvm/CodeGen | |
parent | 111c4f897eb9a42eac6aceea830b8e76058afd73 (diff) | |
download | external_llvm-c92da3882ee4e18153bb36fcdf33af393aba8259.zip external_llvm-c92da3882ee4e18153bb36fcdf33af393aba8259.tar.gz external_llvm-c92da3882ee4e18153bb36fcdf33af393aba8259.tar.bz2 |
There are times when the coalescer would not coalesce away a copy but the copy
can be eliminated by the allocator is the destination and source targets the
same register. The most common case is when the source and destination registers
are in different class. For example, on x86 mov32to32_ targets GR32_ which
contains a subset of the registers in GR32.
The allocator can do 2 things:
1. Set the preferred allocation for the destination of a copy to that of its source.
2. After allocation is done, change the allocation of a copy destination (if
legal) so the copy can be eliminated.
This eliminates 443 extra moves from 403.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/LiveIntervalAnalysis.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index 2f1176d..dacec8e 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -162,6 +162,11 @@ namespace llvm { return i2miMap_[index]; } + /// conflictsWithPhysRegDef - Returns true if the specified register + /// is defined during the duration of the specified interval. + bool conflictsWithPhysRegDef(const LiveInterval &li, VirtRegMap &vrm, + unsigned reg); + /// findLiveInMBBs - Given a live range, if the value of the range /// is live in any MBB returns true as well as the list of basic blocks /// where the value is live in. |