aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/VirtRegMap.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-10-13 02:50:24 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-10-13 02:50:24 +0000
commit7f56625447b94178118f2fec732b10f9e4aa7fbf (patch)
treebcfcbc0dbea4929e9225144bf8c3913daecfa120 /lib/CodeGen/VirtRegMap.h
parent106e8020bd1e36cffb749aa8358018b48839e336 (diff)
downloadexternal_llvm-7f56625447b94178118f2fec732b10f9e4aa7fbf.zip
external_llvm-7f56625447b94178118f2fec732b10f9e4aa7fbf.tar.gz
external_llvm-7f56625447b94178118f2fec732b10f9e4aa7fbf.tar.bz2
Local spiller optimization:
Turn this: movswl %ax, %eax movl %eax, -36(%ebp) xorl %edi, -36(%ebp) into movswl %ax, %eax xorl %edi, %eax movl %eax, -36(%ebp) by unfolding the load / store xorl into an xorl and a store when we know the value in the spill slot is available in a register. This doesn't change the number of instructions but reduce the number of times memory is accessed. Also unfold some load folding instructions and reuse the value when similar situation presents itself. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.h')
-rw-r--r--lib/CodeGen/VirtRegMap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/VirtRegMap.h b/lib/CodeGen/VirtRegMap.h
index 8385f3d..f6d305e 100644
--- a/lib/CodeGen/VirtRegMap.h
+++ b/lib/CodeGen/VirtRegMap.h
@@ -181,6 +181,10 @@ namespace llvm {
void virtFolded(unsigned VirtReg, MachineInstr *OldMI, unsigned OpNum,
MachineInstr *NewMI);
+ /// @brief Updates information about the specified virtual register's value
+ /// folded into the specified machine instruction.
+ void virtFolded(unsigned VirtReg, MachineInstr *MI, ModRef MRInfo);
+
/// @brief returns the virtual registers' values folded in memory
/// operands of this instruction
std::pair<MI2VirtMapTy::const_iterator, MI2VirtMapTy::const_iterator>