[PATCH] D122258: [MC][RFC] Omit DWARF unwind info if compact unwind is present for all archs

Jez Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 18 21:48:55 PDT 2022


int3 marked an inline comment as done.
int3 added inline comments.


================
Comment at: llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp:131-132
+                                           size_t Size) {
+  if (Size == 0)
+    return;
   registerEHFramesInProcess(Addr, Size);
----------------
int3 wrote:
> lhames wrote:
> > Is this needed? With your change, registerEHFramesInProcess should be a no-op if `Size == 0`.
> might not be yeah. I wasn't sure whether the extra entry in `EHFrames` would be an issue, but I will double check
looks like it isn't necessary. removing


================
Comment at: llvm/tools/llc/llc.cpp:697-700
+    auto &Ctx = MMIWP->getMMI().getContext();
+    Ctx.setGenDwarfForAssembly(Target->Options.ForceDwarfFrameSection);
     const_cast<TargetLoweringObjectFile *>(LLVMTM.getObjFileLowering())
+        ->Initialize(Ctx, *Target);
----------------
int3 wrote:
> lhames wrote:
> > This option hand-off feels very manual. I wonder if we should add a `propagateTargetOptionsToMC` function, but maybe the set of options that it would apply to is small enough not to bother for now?
> > 
> > I would add something like this to `LLVMTargetMachine::addPassesToEmitMC` too, for the the case where the caller passes in a null `MCContext*`. 
> thanks for the pointers! I'll look into that
actually, I'm not sure I understood your suggestion... which class do you envision `propagateTargetOptionsToMC` being defined in? How would it make things "less manual"?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122258/new/

https://reviews.llvm.org/D122258



More information about the llvm-commits mailing list