summaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2022-11-03 14:13:08 +0100
committerNikita Popov <npopov@redhat.com>2022-11-04 09:26:35 +0100
commit01ec0ff2dcf5528b0e6728e5693b583e4e6f83f1 (patch)
tree0ae3d16c229721525b3f9b83d7b61501e81cb4f9 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parente787708bcf53e8849481f2d0267f7e8b5dbf6c8d (diff)
[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
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
0 files changed, 0 insertions, 0 deletions