[PATCH] D65280: Add a pass to lower is.constant and objectsize intrinsics
Joerg Sonnenberger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 06:29:12 PDT 2019
joerg updated this revision to Diff 216822.
joerg added a comment.
Simplify the pass logic. First round will update the predecessor links and note if any block is orphaned, a second round will remove unreachable blocks if necessary.
The pass can be further refined to use and update DominatorTree and AssumptionCache incrementally, but this should be functionally complete now. It will not handle more complex cases like orphaned loops, but I don't think those are commonly used with is.constant or objectsize conditions either.
The pass will now scan every BB once, but fall back to the start of a BB of recursive removal invalidates the iterator. This seems to be the strictest form I can manage.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65280/new/
https://reviews.llvm.org/D65280
Files:
bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.mli
bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c
include/llvm-c/Transforms/Scalar.h
include/llvm/Analysis/InstructionSimplify.h
include/llvm/InitializePasses.h
include/llvm/LinkAllPasses.h
include/llvm/Transforms/Scalar.h
include/llvm/Transforms/Scalar/LowerConstantIntrinsics.h
lib/Analysis/InstructionSimplify.cpp
lib/CodeGen/CodeGenPrepare.cpp
lib/CodeGen/GlobalISel/IRTranslator.cpp
lib/CodeGen/SelectionDAG/FastISel.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/TargetPassConfig.cpp
lib/Passes/PassBuilder.cpp
lib/Passes/PassRegistry.def
lib/Transforms/Scalar/CMakeLists.txt
lib/Transforms/Scalar/LowerConstantIntrinsics.cpp
lib/Transforms/Scalar/Scalar.cpp
test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
test/CodeGen/AArch64/O0-pipeline.ll
test/CodeGen/AArch64/O3-pipeline.ll
test/CodeGen/ARM/O3-pipeline.ll
test/CodeGen/X86/O0-pipeline.ll
test/CodeGen/X86/O3-pipeline.ll
test/CodeGen/X86/is-constant.ll
test/CodeGen/X86/object-size.ll
test/Transforms/CodeGenPrepare/X86/overflow-intrinsics.ll
test/Transforms/CodeGenPrepare/basic.ll
test/Transforms/CodeGenPrepare/builtin-condition.ll
test/Transforms/CodeGenPrepare/crash-on-large-allocas.ll
test/Transforms/LowerConstantIntrinsics/constant-intrinsics.ll
test/Transforms/LowerConstantIntrinsics/crash-on-large-allocas.ll
test/Transforms/LowerConstantIntrinsics/objectsize_basic.ll
utils/gn/secondary/llvm/lib/Transforms/Scalar/BUILD.gn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65280.216822.patch
Type: text/x-patch
Size: 47779 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190823/b25b1881/attachment-0001.bin>
More information about the llvm-commits
mailing list