mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
a5ff88d2db
There are two optimizations here: 1. Consider the following code: FCMPSrr %0, %1, implicit-def $nzcv %sel1:gpr32 = CSELWr %_, %_, 12, implicit $nzcv %sub:gpr32 = SUBSWrr %_, %_, implicit-def $nzcv FCMPSrr %0, %1, implicit-def $nzcv %sel2:gpr32 = CSELWr %_, %_, 12, implicit $nzcv This kind of code where we have 2 FCMPs each feeding a CSEL can happen when we have a single IR fcmp being used by two selects. During selection, to ensure that there can be no clobbering of nzcv between the fcmp and the csel, we have to generate an fcmp immediately before each csel is selected. However, often we can essentially CSE these together later in MachineCSE. This doesn't work though if there are unrelated flag-setting instructions in between the two FCMPs. In this case, the SUBS defines NZCV but it doesn't have any users, being overwritten by the second FCMP. Our solution here is to try to convert flag setting operations between a interval of identical FCMPs, so that CSE will be able to eliminate one. 2. SelectionDAG imported patterns for arithmetic ops currently select the flag-setting ops for CSE reasons, and add the implicit-def $nzcv operand to those instructions. However if those impdef operands are not marked as dead, the peephole optimizations are not able to optimize them into non-flag setting variants. The optimization here is to find these dead imp-defs and mark them as such. This pass is only enabled when optimizations are enabled. Differential Revision: https://reviews.llvm.org/D89415 |
||
---|---|---|
.. | ||
benchmark | ||
bugpoint | ||
count | ||
crosstool | ||
docker | ||
emacs | ||
FileCheck | ||
fpcmp | ||
gdb-scripts | ||
git | ||
gn | ||
jedit | ||
kate | ||
KillTheDoctor | ||
lint | ||
lit | ||
llvm-build | ||
llvm-lit | ||
llvm-locstats | ||
LLVMVisualizers | ||
Misc | ||
not | ||
PerfectShuffle | ||
release | ||
Reviewing | ||
sanitizers | ||
TableGen | ||
Target/ARM | ||
testgen | ||
textmate | ||
unittest | ||
UpdateTestChecks | ||
valgrind | ||
vim | ||
vscode | ||
yaml-bench | ||
abtest.py | ||
add_argument_names.py | ||
bisect | ||
bisect-skip-count | ||
bugpoint_gisel_reducer.py | ||
check_ninja_deps.py | ||
check-each-file | ||
chunk-print-before-all.py | ||
clang-parse-diagnostics-file | ||
codegen-diff | ||
collect_and_build_with_pgo.py | ||
convert-constraint-log-to-z3.py | ||
countloc.sh | ||
create_ladder_graph.py | ||
demangle_tree.py | ||
DSAclean.py | ||
DSAextract.py | ||
extract_symbols.py | ||
extract_vplan.py | ||
findmisopt | ||
findoptdiff | ||
findsym.pl | ||
GenLibDeps.pl | ||
GetSourceVersion | ||
getsrcs.sh | ||
indirect_calls.py | ||
lldbDataFormatters.py | ||
llvm-compilers-check | ||
llvm-gisel-cov.py | ||
llvm-native-gxx | ||
llvm.grm | ||
LLVMBuild.txt | ||
llvmdo | ||
llvmgrep | ||
merge-stats.py | ||
prepare-code-coverage-artifact.py | ||
remote-exec.py | ||
schedcover.py | ||
shuffle_fuzz.py | ||
shuffle_select_fuzz_tester.py | ||
sort_includes.py | ||
unicode-case-fold.py | ||
update_analyze_test_checks.py | ||
update_cc_test_checks.py | ||
update_llc_test_checks.py | ||
update_mca_test_checks.py | ||
update_mir_test_checks.py | ||
update_test_checks.py | ||
UpdateCMakeLists.pl | ||
wciia.py |