diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-07 22:10:26 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-05-07 22:10:26 +0000 |
commit | 3c52f0281fd5aea2819fb9b723cd9955ce60a99d (patch) | |
tree | b00db436b3b091810039c828d85eb0bd708925b3 /llvm/lib/CodeGen/RegisterCoalescer.cpp | |
parent | c4b3a7a1d771a515dbd6d695275be92e6da3eb81 (diff) | |
download | bcm5719-llvm-3c52f0281fd5aea2819fb9b723cd9955ce60a99d.tar.gz bcm5719-llvm-3c52f0281fd5aea2819fb9b723cd9955ce60a99d.zip |
Add an MF argument to TRI::getPointerRegClass() and TII::getRegClass().
The getPointerRegClass() hook can return register classes that depend on
the calling convention of the current function (ptr_rc_tailcall).
So far, we have been able to infer the calling convention from the
subtarget alone, but as we add support for multiple calling conventions
per target, that no longer works.
Patch by Yiannis Tsiouris!
llvm-svn: 156328
Diffstat (limited to 'llvm/lib/CodeGen/RegisterCoalescer.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegisterCoalescer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp index 16b9a7dbd9d..567ce1940c9 100644 --- a/llvm/lib/CodeGen/RegisterCoalescer.cpp +++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp @@ -779,7 +779,7 @@ bool RegisterCoalescer::ReMaterializeTrivialDef(LiveInterval &SrcInt, // Make sure the copy destination register class fits the instruction // definition register class. The mismatch can happen as a result of earlier // extract_subreg, insert_subreg, subreg_to_reg coalescing. - const TargetRegisterClass *RC = TII->getRegClass(MCID, 0, TRI); + const TargetRegisterClass *RC = TII->getRegClass(MCID, 0, TRI, *MF); if (TargetRegisterInfo::isVirtualRegister(DstReg)) { if (MRI->getRegClass(DstReg) != RC) return false; |