[PATCH] D150004: [RISCV] .debug_line: emit relocations for assembly input files
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 10 16:08:30 PDT 2023
MaskRay added a comment.
> I share @reames' concern. There is emitDwarfAdvanceFrameAddr below that has the same issue. MCPseudoProbe::emit does exactly the same, too. The solution as-is looks incomplete.
>
> Removing this code fragment does not look totally wrong, but it should be done consistently in all places and compile time should not be neglected. Ideally, evaluateAsAbsolute should return false when the expression cannot be
evaluated as absolute.
`.debug_frame`/`.eh_frame` is what I am experimenting with. I think it can be fixed separately without a new set of patches.
Assembly source files typically don't write CFI directives, and a bug is mostly unnoticeable anyway.
The `.debug_line` is more harmful as some assemblers synthesize `.debug_line` for assembly source files without `.file` and `.loc`.
I disagree that we want to adjust the code of `evaluateAsAbsolute` or the call site. The `evaluateAsAbsolute` code is false for "direct object emission".
It makes `clang -g -c a.c` slower (though the difference is difficult to notice since it isn't a bottleneck).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150004/new/
https://reviews.llvm.org/D150004
More information about the llvm-commits
mailing list