Skip to content

[Hexagon] Remove emplace workaround (NFC) #145718

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2025
Merged

Conversation

AZero13
Copy link
Contributor

@AZero13 AZero13 commented Jun 25, 2025

It was done because it was not supported in gcc 4.7.4.

It was done because it was not supported in gcc 4.7.4.
@llvmbot
Copy link
Member

llvmbot commented Jun 25, 2025

@llvm/pr-subscribers-backend-hexagon

Author: AZero13 (AZero13)

Changes

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 --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');

Copy link
Contributor

@aankit-ca aankit-ca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the change

@androm3da androm3da changed the title [Hexagaon] Remove emplace workaround (NFC) [Hexagon] Remove emplace workaround (NFC) Jun 25, 2025
@AZero13
Copy link
Contributor Author

AZero13 commented Jun 25, 2025

LGTM. Thanks for the change

LGTM. Thanks for the change

Thank you. Can you please merge?

@AZero13 AZero13 requested a review from aankit-ca June 25, 2025 22:00
@AZero13
Copy link
Contributor Author

AZero13 commented Jun 26, 2025

@aankit-ca I do not have merge permissions.

@aankit-ca aankit-ca merged commit 6b9e6f0 into llvm:main Jun 26, 2025
9 checks passed
@aankit-ca
Copy link
Contributor

@aankit-ca I do not have merge permissions.

Done!

@AZero13 AZero13 deleted the emplace branch June 26, 2025 19:33
anthonyhatran pushed a commit to anthonyhatran/llvm-project that referenced this pull request Jun 26, 2025
It was done because it was not supported in gcc 4.7.4.
rlavaee pushed a commit to rlavaee/llvm-project that referenced this pull request Jul 1, 2025
It was done because it was not supported in gcc 4.7.4.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants