mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-06 18:46:18 +00:00
Commit a small improvement that is already in the x86 and ia64 backends to
not generate unnecessary register copies. This improves compile time by 2-5% depending on the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22210 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
16b5644f04
commit
a43b176f51
@ -1572,6 +1572,11 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) {
|
||||
SDNode *Node = N.Val;
|
||||
MVT::ValueType DestType = N.getValueType();
|
||||
|
||||
if (Node->getOpcode() == ISD::CopyFromReg &&
|
||||
MRegisterInfo::isVirtualRegister(cast<RegSDNode>(Node)->getReg()))
|
||||
// Just use the specified register as our input.
|
||||
return cast<RegSDNode>(Node)->getReg();
|
||||
|
||||
unsigned &Reg = ExprMap[N];
|
||||
if (Reg) return Reg;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user