diff options
author | Nikita Popov <npopov@redhat.com> | 2023-01-13 10:52:29 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2023-07-30 18:38:45 +0200 |
commit | ad7f02010f32bff28fec139e103ad0240e160aa9 (patch) | |
tree | 1d4a9c2f2c2c1cf8a9d2187cd302646b0443f4a2 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp | |
parent | cf39dea58d8dbc8b5ad7bd7f34534eeeb989e327 (diff) | |
download | llvm-ad7f02010f32bff28fec139e103ad0240e160aa9.zip llvm-ad7f02010f32bff28fec139e103ad0240e160aa9.tar.gz llvm-ad7f02010f32bff28fec139e103ad0240e160aa9.tar.bz2 |
[InstCombine] Process blocks in RPO
InstComine currently processes blocks in an arbitrary
depth-first order. This can break the usual invariant that the
operands of an instruction should be simplified before the
instruction itself, if uses across basic blocks (particularly
inside phi nodes) are involved.
This patch switches the initial worklist population to use RPO
instead, which will ensure that predecessors are visited before
successors (back-edges notwithstanding).
This allows us to fold more cases within a single InstCombine
iteration, in preparation for D154579. This change by itself
is a minor compile-time regression of about 0.1%, which will
be more than recovered by switching to single-iteration InstCombine.
Differential Revision: https://reviews.llvm.org/D75362
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions