forked from OSchip/llvm-project
[SelectionDAGBuilder] Save iterator to avoid second DenseMap lookup. NFC
We were calling find and then using operator[]. Instead keep the iterator from find and use it to get the value. Just happened to notice while investigating how we decide what extends to use between basic blocks.
This commit is contained in:
parent
510402c2c8
commit
a8ae41fb51
|
@ -9873,10 +9873,10 @@ SelectionDAGBuilder::CopyValueToVirtualRegister(const Value *V, unsigned Reg) {
|
|||
None); // This is not an ABI copy.
|
||||
SDValue Chain = DAG.getEntryNode();
|
||||
|
||||
ISD::NodeType ExtendType = (FuncInfo.PreferredExtendType.find(V) ==
|
||||
FuncInfo.PreferredExtendType.end())
|
||||
? ISD::ANY_EXTEND
|
||||
: FuncInfo.PreferredExtendType[V];
|
||||
ISD::NodeType ExtendType = ISD::ANY_EXTEND;
|
||||
auto PreferredExtendIt = FuncInfo.PreferredExtendType.find(V);
|
||||
if (PreferredExtendIt != FuncInfo.PreferredExtendType.end())
|
||||
ExtendType = PreferredExtendIt->second;
|
||||
RFV.getCopyToRegs(Op, DAG, getCurSDLoc(), Chain, nullptr, V, ExtendType);
|
||||
PendingExports.push_back(Chain);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue