[PATCH] D105238: GlobalISel/AArch64: don't optimize away redundant branches at -O0
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 1 14:37:57 PDT 2021
aprantl added a comment.
In D105238#2853402 <https://reviews.llvm.org/D105238#2853402>, @aemerson wrote:
> @aprantl by the way, I'm pretty sure there are a fair number of tests that need updating with this change.
Yes that' right:
Failed Tests (12):
LLVM :: CodeGen/AArch64/GlobalISel/arm64-atomic.ll
LLVM :: CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
LLVM :: CodeGen/AArch64/unwind-preserved.ll
LLVM :: CodeGen/BPF/BTF/func-func-ptr.ll
LLVM :: CodeGen/BPF/BTF/func-non-void.ll
LLVM :: CodeGen/BPF/BTF/func-typedef.ll
LLVM :: CodeGen/BPF/BTF/func-unused-arg.ll
LLVM :: CodeGen/BPF/BTF/func-void.ll
LLVM :: CodeGen/Mips/GlobalISel/llvm-ir/jump_table_and_brjt.ll
LLVM :: CodeGen/Mips/GlobalISel/llvm-ir/long_ambiguous_chain_s32.ll
LLVM :: CodeGen/Mips/GlobalISel/llvm-ir/long_ambiguous_chain_s64.ll
LLVM :: CodeGen/Mips/GlobalISel/llvm-ir/phi.ll
Before I go through updating all the tests, do we think that this is a reasonable change?
Pros:
- Consistent with SelectionDAG behavior (fixes a "regression" in GlobalISEL)
- Enables debugging scenarios (setting breakpoints on early returns, etc)
Cons:
- Code size increase (-O0 only)
The patch improves debuggability, and debug builds are the primary reason why developers compile without optimizations. From my point of view this seems to be the right trade-off, but please let me know if there are any other interests we need to consider.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105238/new/
https://reviews.llvm.org/D105238
More information about the llvm-commits
mailing list