aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/TwoAddressInstructionPass.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-06-09 19:26:01 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-06-09 19:26:01 +0000
commit88287d63dcf967e22d0e235765743e4f09e3ce5d (patch)
tree3e12cca4516e458f6afad39bf57dd77f0e54a7d5 /lib/CodeGen/TwoAddressInstructionPass.cpp
parente9a62547cf624ee5bc2090c326fc90d52d997f3d (diff)
downloadexternal_llvm-88287d63dcf967e22d0e235765743e4f09e3ce5d.zip
external_llvm-88287d63dcf967e22d0e235765743e4f09e3ce5d.tar.gz
external_llvm-88287d63dcf967e22d0e235765743e4f09e3ce5d.tar.bz2
Allow target to place 2-address pass inserted copies in better spots. Thumb2 will use this to try to avoid breaking up IT blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/TwoAddressInstructionPass.cpp')
-rw-r--r--lib/CodeGen/TwoAddressInstructionPass.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp
index 16588bf..5b7ae19 100644
--- a/lib/CodeGen/TwoAddressInstructionPass.cpp
+++ b/lib/CodeGen/TwoAddressInstructionPass.cpp
@@ -1104,7 +1104,12 @@ bool TwoAddressInstructionPass::runOnMachineFunction(MachineFunction &MF) {
}
}
}
-
+
+ // Schedule the source copy / remat inserted to form two-address
+ // instruction. FIXME: Does it matter the distance map may not be
+ // accurate after it's scheduled?
+ TII->scheduleTwoAddrSource(prior(mi), mi, *TRI);
+
MadeChange = true;
DEBUG(dbgs() << "\t\trewrite to:\t" << *mi);