summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaExprMember.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-03-12 11:19:31 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-03-12 11:19:31 +0000
commita0796555e2e3643cadcc6dcbff74de92bc5726ea (patch)
tree42b87952d55bd404c389dfce5ae54134741e82f4 /clang/lib/Sema/SemaExprMember.cpp
parent6242a0f771ada35e25d4cef1fe61cd8cedde0fba (diff)
downloadbcm5719-llvm-a0796555e2e3643cadcc6dcbff74de92bc5726ea.tar.gz
bcm5719-llvm-a0796555e2e3643cadcc6dcbff74de92bc5726ea.zip
Teach instsimplify how to constant fold pointer differences.
Typically instcombine has handled this, but pointer differences show up in several contexts where we would like to get constant folding, and cannot afford to run instcombine. Specifically, I'm working on improving the constant folding of arguments used in inline cost analysis with instsimplify. Doing this in instsimplify implies some algorithm changes. We have to handle multiple layers of all-constant GEPs because instsimplify cannot fold them into a single GEP the way instcombine can. Also, we're only interested in all-constant GEPs. The result is that this doesn't really replace the instcombine logic, it's just complimentary and focused on constant folding. Reviewed on IRC by Benjamin Kramer. llvm-svn: 152555
Diffstat (limited to 'clang/lib/Sema/SemaExprMember.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud