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

Hsiangkai Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 19:18:52 PDT 2019


HsiangKai added a comment.

In D61584#1493600 <https://reviews.llvm.org/D61584#1493600>, @probinson wrote:

> Thanks for the reference, that helps some.
>  However I still think this isn't the right way to go about fixing the problem.  This started because RISC-V decided not to resolve certain kinds of expressions, and then it turns out that applies to too many expressions.  Somebody suggested that the asm backend decision should be more refined, based on symbol section perhaps, and that feels like a more principled way to go about it.


I don't think to refine the backend decision is a solution for the problem. I have explained the reason in https://reviews.llvm.org/D45181#1495288.

In` EmitFDE` example, `Length` value will be converted to a `Fixup`. It is reasonable to convert the expression to fixup due to the symbol values are unknown then.

When finalization, these fixups will be converted to relocations if relaxation is enabled. However, there is no way to decide to generate relocations or generate absolute value in `MCAssembler::evaluateFixup()`. There is no information to distinguish these two cases.


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