[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 23:04:47 PDT 2023
MaskRay added a comment.
In D150004#4332943 <https://reviews.llvm.org/D150004#4332943>, @probinson wrote:
> I agree with @reames and @barannikov88 that it seems like evaluateAsAbsolute is the right place for this.
> Unless you can demonstrate that it gets something else wrong to put the check there.
Perhaps the question is why we can't teach `evaluateAsAbsolute` about RISC-V linker relaxation.
This route will go against @compnerd's bbea64250f65480d787e1c5ff45c4de3ec2dcda8 <https://reviews.llvm.org/rGbbea64250f65480d787e1c5ff45c4de3ec2dcda8> .
My gut feeling says we should try avoid such reliance, although I don't have a very good enough theory about it.
Reintroducing this folding to MCExpr may cause brittleness.
Eliminating `evaluateAsAbsolute` with a `MCAssembler` uses, if the performance overhead is acceptable, is the preferred approach IMO.
`MCDwarfLineAddr::Emit` introduces another problem that it duplicates some functionality of `MCAssembler::relaxDwarfLineAddr`.
Both operations are quite complex. It'd be better to remove a "fast path" that does complex things.
I'll soon provide an updated summary about `MCObjectStreamer::emit[SU]LEB128Value`.
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