aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-09-07 20:29:59 +0000
committerHal Finkel <hfinkel@anl.gov>2014-09-07 20:29:59 +0000
commit7e1844940e8550e7b79b78091fd1bce043e257ea (patch)
treec99bc2060803f486c53928c3f595a3b72d4fffb1 /clang/lib/CodeGen/CodeGenFunction.h
parentd67e4639016ec7bb1ad3e41b199f7ad11eaee09f (diff)
downloadllvm-7e1844940e8550e7b79b78091fd1bce043e257ea.zip
llvm-7e1844940e8550e7b79b78091fd1bce043e257ea.tar.gz
llvm-7e1844940e8550e7b79b78091fd1bce043e257ea.tar.bz2
Make use of @llvm.assume from LazyValueInfo
This change teaches LazyValueInfo to use the @llvm.assume intrinsic. Like with the known-bits change (r217342), this requires feeding a "context" instruction pointer through many functions. Aside from a little refactoring to reuse the logic that turns predicates into constant ranges in LVI, the only new code is that which can 'merge' the range from an assumption into that otherwise computed. There is also a small addition to JumpThreading so that it can have LVI use assumptions in the same block as the comparison feeding a conditional branch. With this patch, we can now simplify this as expected: int foo(int a) { __builtin_assume(a > 5); if (a > 3) { bar(); return 1; } return 0; } llvm-svn: 217345
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
0 files changed, 0 insertions, 0 deletions