mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01: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. llvm-svn: 22210
This commit is contained in:
parent
202eb6ff93
commit
9bb1be2eec
@ -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…
Reference in New Issue
Block a user