summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-12-07 02:08:58 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-12-07 02:08:58 +0000
commit80d3e56c738aea996510c5c4435a0aa7b90ccf6f (patch)
treebdfe72e494dc137e6bd825d105429fd57ee8d109 /clang/lib
parente483d87bd93d1dc67784492e48e46135ec0b1b09 (diff)
downloadbcm5719-llvm-80d3e56c738aea996510c5c4435a0aa7b90ccf6f.tar.gz
bcm5719-llvm-80d3e56c738aea996510c5c4435a0aa7b90ccf6f.zip
Add support to ValueTracking for determining that a pointer is non-null
by virtue of inbounds GEPs that preclude a null pointer. This is a very common pattern in the code generated by std::vector and other standard library routines which use allocators that test for null pervasively. This is one step closer to teaching Clang+LLVM to be able to produce an empty function for: void f() { std::vector<int> v; v.push_back(1); v.push_back(2); v.push_back(3); v.push_back(4); } Which is related to getting them to completely fold SmallVector push_back sequences into constants when inlining and other optimizations make that a possibility. llvm-svn: 169573
Diffstat (limited to 'clang/lib')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud