summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2014-07-16 20:13:31 +0000
committerChris Bieneman <beanz@apple.com>2014-07-16 20:13:31 +0000
commitdf4b763be5897a315751cd071953e11c7d28a175 (patch)
treefbe63381a6bc5424465127332733ba75f4929f36 /llvm/lib/CodeGen
parent2458bec7e740643bdfa3c0e89d60704e225b78cb (diff)
downloadbcm5719-llvm-df4b763be5897a315751cd071953e11c7d28a175.tar.gz
bcm5719-llvm-df4b763be5897a315751cd071953e11c7d28a175.zip
[RegisterCoalescer] Moving the RegisterCoalescer subtarget hook onto the TargetRegisterInfo instead of the TargetSubtargetInfo.
llvm-svn: 213188
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 0bda4c79987..e04a3cf077f 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -1038,7 +1038,6 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
}
if (CP.getNewRC()) {
- const TargetSubtargetInfo &ST = TM->getSubtarget<TargetSubtargetInfo>();
auto SrcRC = MRI->getRegClass(CP.getSrcReg());
auto DstRC = MRI->getRegClass(CP.getDstReg());
unsigned SrcIdx = CP.getSrcIdx();
@@ -1047,7 +1046,7 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
std::swap(SrcIdx, DstIdx);
std::swap(SrcRC, DstRC);
}
- if (!ST.shouldCoalesce(CopyMI, SrcRC, SrcIdx, DstRC, DstIdx,
+ if (!TRI->shouldCoalesce(CopyMI, SrcRC, SrcIdx, DstRC, DstIdx,
CP.getNewRC())) {
DEBUG(dbgs() << "\tSubtarget bailed on coalescing.\n");
return false;
OpenPOWER on IntegriCloud