aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2020-12-01 11:58:19 -0800
committerJessica Paquette <jpaquette@apple.com>2020-12-07 17:24:23 -0800
commitd49f6491b6d1439b5a65ff6e965b65a66d943b63 (patch)
treed0953f4ea17ba6d23ff80defe0664bfc43af2964 /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent700cf7dcc927c0ffddc0a1acbfde490f673ffb4a (diff)
downloadllvm-d49f6491b6d1439b5a65ff6e965b65a66d943b63.zip
llvm-d49f6491b6d1439b5a65ff6e965b65a66d943b63.tar.gz
llvm-d49f6491b6d1439b5a65ff6e965b65a66d943b63.tar.bz2
[AArch64][GlobalISel] Refactor G_BRCOND selection
`selectCompareBranch` was hard to understand. Also, it was being needlessly pessimistic with the `ProduceNonFlagSettingCondBr` case. It assumed that everything in `selectCompareBranch` would emit a TB(N)Z or C(B)NZ. That's not true; the G_FCMP + G_BRCOND case would never emit those instructions, and the G_ICMP + G_BRCOND case was capable of emitting an integer compare + Bcc. - Refactor `selectCompareBranch` into separate functions based off of what is feeding the G_BRCOND's condition. - Move G_BRCOND selection code from `select` to `selectCompareBranch`. - Remove duplicated constraint code from the code originally in `select`; `emitTestBit` already handles that, so no need to constrain twice. - Factor out the G_FCMP + G_BRCOND case into `selectCompareBranchFedByFCmp`. - Split the G_ICMP + G_BRCOND case into an optimization function, `tryOptCompareBranchFedByICmp` and a general selection function, `selectCompareBranchFedByICmp`. - Reduce the number of things passed to `tryOptAndIntoCompareBranch`. - Improve documentation. - Give some variables more descriptive names. Other than improving the code generation for functions with speculative_load_hardening by getting the logic correct, this is NFC. Differential Revision: https://reviews.llvm.org/D92582
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions