[PATCH] D61584: [DebugInfo] Some fields do not need relocations even relax is enabled.

Paul Robinson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 15 09:08:53 PDT 2019


probinson added a comment.

It still bothers me that MCDwarf has to know exactly when to override the target's decision to do relaxation.

Why is it appropriate to do that in the two methods where you have made that change in this patch, and not in many other places within MCDwarf that call the same helper?  What guides me to know it's correct in the first three calls to emitAbsValue within FrameEmitterImpl::EmitFDE, but not in the fourth?  Without becoming an expert in all the fine details of every target.



================
Comment at: include/llvm/MC/MCFixup.h:92
+
+  /// Enforce the fixup to be converted to an absolute value.
+  bool Fixed;
----------------
"Require the assembler to evaluate the fixup."

(It is going to become an absolute value regardless, in the contexts where this is set to true; the only question is where the evaluation happens.)


================
Comment at: include/llvm/MC/MCStreamer.h:621
   virtual void EmitValueImpl(const MCExpr *Value, unsigned Size,
-                             SMLoc Loc = SMLoc());
+                             SMLoc Loc = SMLoc(), bool Fixed = false);
 
----------------
Need to add Fixed to the doxygen comment for this method.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D61584





More information about the llvm-commits mailing list