[llvm] [BOLT][NFC] Unset UseAssemblerInfoForParsing for emission (PR #94778)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 7 10:56:12 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-bolt

Author: Amir Ayupov (aaupov)

<details>
<summary>Changes</summary>

Summary:
Use workaround for quadratic behavior inside
AttemptToFoldSymbolOffsetDifference called from BinaryEmitter::emitLSDA.

https://github.com/llvm/llvm-project/commit/b06e736982a3568fe2bcea8688550f9e393b7450#commitcomment-142836456


---
Full diff: https://github.com/llvm/llvm-project/pull/94778.diff


1 Files Affected:

- (modified) bolt/lib/Core/BinaryEmitter.cpp (+2) 


``````````diff
diff --git a/bolt/lib/Core/BinaryEmitter.cpp b/bolt/lib/Core/BinaryEmitter.cpp
index 0b44acb0816f2..5793963f9b80d 100644
--- a/bolt/lib/Core/BinaryEmitter.cpp
+++ b/bolt/lib/Core/BinaryEmitter.cpp
@@ -194,6 +194,7 @@ class BinaryEmitter {
 
 void BinaryEmitter::emitAll(StringRef OrgSecPrefix) {
   Streamer.initSections(false, *BC.STI);
+  Streamer.setUseAssemblerInfoForParsing(false);
 
   if (opts::UpdateDebugSections && BC.isELF()) {
     // Force the emission of debug line info into allocatable section to ensure
@@ -226,6 +227,7 @@ void BinaryEmitter::emitAll(StringRef OrgSecPrefix) {
   // TODO Enable for Mach-O once BinaryContext::getDataSection supports it.
   if (BC.isELF())
     AddressMap::emit(Streamer, BC);
+  Streamer.setUseAssemblerInfoForParsing(true);
 }
 
 void BinaryEmitter::emitFunctions() {

``````````

</details>


https://github.com/llvm/llvm-project/pull/94778


More information about the llvm-commits mailing list