[PATCH] D69411: [MC] Calculate difference of symbols in two fragments when possible
Jian Cai via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 1 14:43:13 PDT 2019
jcai19 added a comment.
In D69411#1725298 <https://reviews.llvm.org/D69411#1725298>, @peter.smith wrote:
> When I run check-llvm with this patch applied I get 7 failures:
>
> LLVM :: DebugInfo/Mips/delay-slot.ll
> LLVM :: DebugInfo/Mips/dsr-fixed-objects.ll
> LLVM :: DebugInfo/Mips/dsr-non-fixed-objects.ll
> LLVM :: DebugInfo/Mips/fn-call-line.ll
> LLVM :: MC/AsmParser/directive_fill_2.s
> LLVM :: MC/MachO/reloc-diff.s
> LLVM :: MC/X86/expand-var.s
>
> This is applied to master revision 12c9ffd108345f643df98dfa8653af1a4311ed86 <https://reviews.llvm.org/rG12c9ffd108345f643df98dfa8653af1a4311ed86> and the tests don't fail with master. Is it possible your most recent changes have broken something? I'm testing a release build of LLVM with clang, assertions enabled.
The latest patch should address these issues. It seems other than .if conditions, llvm::MCExpr::evaluateAsAbsolute is allowed to not immediately resolve the difference of two symbols in adjacent fragments, such as ".long _external_def - _local_def" in llvm/test/MC/MachO/reloc-diff.s. They will be resolved later when finalizing the layout of the object file. The newer version of the code essentially passes an additional flag to tell the function whether the substraction to evaluate is an if condition.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69411/new/
https://reviews.llvm.org/D69411
More information about the llvm-commits
mailing list