[llvm] 62d44fb - [MC] Remove setUseAssemblerInfoForParsing(false) workarounds
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 23:28:05 PDT 2024
Author: Fangrui Song
Date: 2024-06-24T23:28:01-07:00
New Revision: 62d44fbd50e28a6cfe479fc07164b8c970f049c6
URL: https://github.com/llvm/llvm-project/commit/62d44fbd50e28a6cfe479fc07164b8c970f049c6
DIFF: https://github.com/llvm/llvm-project/commit/62d44fbd50e28a6cfe479fc07164b8c970f049c6.diff
LOG: [MC] Remove setUseAssemblerInfoForParsing(false) workarounds
This reverts commit 245491a9f384e4c53421196533c2a2b693efaf8d ("[MC] Disable MCAssembler based constant folding for DwarfDebug")
and cb09b5f3d53e5b7b4452bb3db78dca79fc9b3f17 ("[MC] Disable MCAssembler based constant folding for compact unwind and emitJumpTableEntry").
Checking the relative order of FA and FB is now faster due to
de19f7b6d46f1c38e10e604154f0fdaaffde9ebd ("[MC] Replace fragment ilist with singly-linked lists").
Added:
Modified:
llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/lib/MC/MCDwarf.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 766fb3633b281..40f4dc2689cdf 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -2463,15 +2463,11 @@ bool AsmPrinter::doFinalization(Module &M) {
emitGlobalIFunc(M, IFunc);
// Finalize debug and EH information.
- // Defer MCAssembler based constant folding due to a performance issue. The
- // label
diff erences will be evaluated at write time.
- OutStreamer->setUseAssemblerInfoForParsing(false);
for (const HandlerInfo &HI : Handlers) {
NamedRegionTimer T(HI.TimerName, HI.TimerDescription, HI.TimerGroupName,
HI.TimerGroupDescription, TimePassesIsEnabled);
HI.Handler->endModule();
}
- OutStreamer->setUseAssemblerInfoForParsing(true);
// This deletes all the ephemeral handlers that AsmPrinter added, while
// keeping all the user-added handlers alive until the AsmPrinter is
@@ -2803,10 +2799,8 @@ void AsmPrinter::emitJumpTableInfo() {
// Defer MCAssembler based constant folding due to a performance issue. The
// label
diff erences will be evaluated at write time.
- OutStreamer->setUseAssemblerInfoForParsing(false);
for (const MachineBasicBlock *MBB : JTBBs)
emitJumpTableEntry(MJTI, MBB, JTI);
- OutStreamer->setUseAssemblerInfoForParsing(true);
}
if (!JTInDiffSection)
OutStreamer->emitDataRegion(MCDR_DataRegionEnd);
diff --git a/llvm/lib/MC/MCDwarf.cpp b/llvm/lib/MC/MCDwarf.cpp
index 5032592b3861a..9ada21669be34 100644
--- a/llvm/lib/MC/MCDwarf.cpp
+++ b/llvm/lib/MC/MCDwarf.cpp
@@ -1865,14 +1865,6 @@ void MCDwarfFrameEmitter::Emit(MCObjectStreamer &Streamer, MCAsmBackend *MAB,
FrameEmitterImpl Emitter(IsEH, Streamer);
ArrayRef<MCDwarfFrameInfo> FrameArray = Streamer.getDwarfFrameInfos();
- // Disable AttemptToFoldSymbolOffsetDifference folding of EmitCompactUnwind
- // and fdeStart-cieStart for EmitFDE due to the the performance issue. The
- // label
diff erences will be evaluate at write time.
- assert(Streamer.getUseAssemblerInfoForParsing());
- Streamer.setUseAssemblerInfoForParsing(false);
- auto Enable = llvm::make_scope_exit(
- [&]() { Streamer.setUseAssemblerInfoForParsing(true); });
-
// Emit the compact unwind info if available.
bool NeedsEHFrameSection = !MOFI->getSupportsCompactUnwindWithoutEHFrame();
if (IsEH && MOFI->getCompactUnwindSection()) {
More information about the llvm-commits
mailing list