aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2024-06-24 23:28:00 -0700
committerFangrui Song <i@maskray.me>2024-06-24 23:28:01 -0700
commit62d44fbd50e28a6cfe479fc07164b8c970f049c6 (patch)
tree2bd5569b3f3d860bc84718d4055e9ae3abe445f7
parent8599629d390270b21c97f8b7ad2d97a344211d05 (diff)
downloadllvm-62d44fbd50e28a6cfe479fc07164b8c970f049c6.zip
llvm-62d44fbd50e28a6cfe479fc07164b8c970f049c6.tar.gz
llvm-62d44fbd50e28a6cfe479fc07164b8c970f049c6.tar.bz2
[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").
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp6
-rw-r--r--llvm/lib/MC/MCDwarf.cpp8
2 files changed, 0 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 766fb36..40f4dc2 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 differences 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 differences 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 5032592..9ada216 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 differences 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()) {