aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/ModuleSummaryIndex.cpp
diff options
context:
space:
mode:
authorSam Elliott <selliott@lowrisc.org>2020-07-01 11:55:07 +0100
committerSam Elliott <selliott@lowrisc.org>2020-07-01 11:56:31 +0100
commit7dc892661edde4eb90229dd5a14f45a1ceb08653 (patch)
tree197feb0f94b17224ccb0cad4b38f4017f49c9b5d /llvm/lib/IR/ModuleSummaryIndex.cpp
parentc44266dc4816ec3df084232055ec02060eec0616 (diff)
downloadllvm-7dc892661edde4eb90229dd5a14f45a1ceb08653.zip
llvm-7dc892661edde4eb90229dd5a14f45a1ceb08653.tar.gz
llvm-7dc892661edde4eb90229dd5a14f45a1ceb08653.tar.bz2
[RISCV] Implement Hooks to avoid chaining SELECT
Summary: This implements two hooks that attempt to avoid control flow for RISC-V. RISC-V will lower SELECTs into control flow, which is not a great idea. The hook `hasMultipleConditionRegisters()` turns off the following DAGCombiner folds: select(C0|C1, x, y) <=> select(C0, x, select(C1, x, y)) select(C0&C1, x, y) <=> select(C0, select(C1, x, y), y) The second hook `setJumpIsExpensive` controls a flag that has a similar purpose and is used in CodeGenPrepare and the SelectionDAGBuilder. Both of these have the effect of ensuring more logic is done before fewer jumps. Note: with the `B` extension, we may be able to lower select into a conditional move instruction, so at some point these hooks will need to be guarded based on enabled extensions. Reviewed By: luismarques Differential Revision: https://reviews.llvm.org/D79268
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
0 files changed, 0 insertions, 0 deletions