[PATCH] D140931: Improve and enable folding of conditional branches with tail calls.
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 23:10:59 PST 2023
pengfei added a comment.
I'm not sure if we can arbitrarily replace `jmp foo` with `jcc foo`. At least `jmp` has a large range (64-bit) scope which supports code size > 2GB. Maybe we should limit it to kernel/small code model?
================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:3018-3019
assert(BranchCond.size() == 1);
+ // At the moment MayChangeDirection is unused (or always treated as true).
+ // We only match existing CC.
if (CC != BranchCond[0].getImm())
----------------
We do we need to add it if it's unused? Do not put unrelated/useless code in the same patch. It obstructs people to understand the patch.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D140931/new/
https://reviews.llvm.org/D140931
More information about the llvm-commits
mailing list