[llvm] [Hexagaon] Remove emplace workaround (NFC) (PR #145718)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 25 08:07:31 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-hexagon
Author: AZero13 (AZero13)
<details>
<summary>Changes</summary>
It was done because it was not supported in gcc 4.7.4.
---
Full diff: https://github.com/llvm/llvm-project/pull/145718.diff
1 Files Affected:
- (modified) llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp (+1-4)
``````````diff
diff --git a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
index b75c8863b6999..b3c61e1829bf9 100644
--- a/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp
@@ -2196,10 +2196,7 @@ void HexagonFrameLowering::optimizeSpillSlots(MachineFunction &MF,
// and collect relevant information.
for (auto &B : MF) {
std::map<int,IndexType> LastStore, LastLoad;
- // Emplace appears not to be supported in gcc 4.7.2-4.
- //auto P = BlockIndexes.emplace(&B, HexagonBlockRanges::InstrIndexMap(B));
- auto P = BlockIndexes.insert(
- std::make_pair(&B, HexagonBlockRanges::InstrIndexMap(B)));
+ auto P = BlockIndexes.emplace(&B, HexagonBlockRanges::InstrIndexMap(B));
auto &IndexMap = P.first->second;
LLVM_DEBUG(dbgs() << "Index map for " << printMBBReference(B) << "\n"
<< IndexMap << '\n');
``````````
</details>
https://github.com/llvm/llvm-project/pull/145718
More information about the llvm-commits
mailing list