[PATCH] D44887: [RISCV] Add shouldForceRelocationWithApplyFixup Target Hook to calculate fixup value but also leave relocation types
Sameer AbuAsal via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 26 13:33:11 PDT 2018
sabuasal added a comment.
Hi Shiva,
Just a comment a
> Quoted Text "if we define shouldForceRelocation for branches, fixup calculation will be disabled"
Implementing RISCVAsmBackend::shoulForceRelocation() will force "MCAssembler::evaluateFixup()" to return false for IsResolved which will cause the record of the relocation in "MCAssembler::handleFixup()" but the fixup value itself will still be computed.
I think the side effect that is causing relaxation to always be forced in other cases is because you don't have "fixupNeedsRelaxationAdvanced" overridden in RISCVAsmBackend. If you override it you can change the behavior of always having
the instruction relaxed if resolved is set to false. I was wondering if you took a look at implemeting the same thing you need by doing that!
Repository:
rL LLVM
https://reviews.llvm.org/D44887
More information about the llvm-commits
mailing list