[all-commits] [llvm/llvm-project] 01ec0f: [SimplifyCFG] Allow speculating block containing a...
Nikita Popov via All-commits
all-commits at lists.llvm.org
Fri Nov 4 01:27:21 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 01ec0ff2dcf5528b0e6728e5693b583e4e6f83f1
https://github.com/llvm/llvm-project/commit/01ec0ff2dcf5528b0e6728e5693b583e4e6f83f1
Author: Nikita Popov <npopov at redhat.com>
Date: 2022-11-04 (Fri, 04 Nov 2022)
Changed paths:
M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
M llvm/test/CodeGen/ARM/2010-05-18-PostIndexBug.ll
M llvm/test/Transforms/SimplifyCFG/assume.ll
M llvm/test/Transforms/SimplifyCFG/two-entry-phi-fold-crash.ll
Log Message:
-----------
[SimplifyCFG] Allow speculating block containing assume()
SpeculativelyExecuteBB(), which converts a branch + phi structure
into a select, currently bails out if the block contains an assume
(because it is not speculatable).
Adjust the fold to ignore ephemeral values (i.e. assumes and values
only used in assumes) for cost modelling purposes, and drop them
when performing the fold.
Theoretically, we could try to preserve the assume information by
generating a assume(br_cond || assume_cond) style assume, but this
is very unlikely to to be useful (because we don't do anything
useful with assumes of this form) and it would make things
substantially more complicated once we take operand bundle assumes
into account (which don't really support a || operation).
I'd prefer not to do that without good motivation.
Differential Revision: https://reviews.llvm.org/D137339
More information about the All-commits
mailing list