We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4caea8 commit 15762eaCopy full SHA for 15762ea
llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp
@@ -2022,8 +2022,9 @@ static bool isTargetConstant(const SDValue &V) {
2022
}
2023
2024
unsigned HexagonDAGToDAGISel::getUsesInFunction(const Value *V) {
2025
- if (GAUsesInFunction.count(V))
2026
- return GAUsesInFunction[V];
+ auto [It, Inserted] = GAUsesInFunction.try_emplace(V);
+ if (!Inserted)
2027
+ return It->second;
2028
2029
unsigned Result = 0;
2030
const Function &CurF = CurDAG->getMachineFunction().getFunction();
@@ -2033,7 +2034,7 @@ unsigned HexagonDAGToDAGISel::getUsesInFunction(const Value *V) {
2033
2034
++Result;
2035
2036
- GAUsesInFunction[V] = Result;
2037
+ It->second = Result;
2038
2039
return Result;
2040
0 commit comments