aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2016-06-01 16:47:45 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2016-06-01 16:47:45 +0000
commit10df497a1f4766e1c5ca598ba5fd08085f6d263c (patch)
tree9f24fb1cb29ce5fc794a097a1541f5da44157490 /llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp
parentf10c8290fac5b16511ac48d676c50765eb92ddae (diff)
downloadllvm-10df497a1f4766e1c5ca598ba5fd08085f6d263c.zip
llvm-10df497a1f4766e1c5ca598ba5fd08085f6d263c.tar.gz
llvm-10df497a1f4766e1c5ca598ba5fd08085f6d263c.tar.bz2
Reduce dependence on pointee types when deducing dereferenceability
Summary: Change some of the internal interfaces in Loads.cpp to keep track of the number of bytes we're trying to prove dereferenceable using an explicit `Size` parameter. Before this, the `Size` parameter was implicitly inferred from the pointee type of the pointer whose dereferenceability we were trying to prove, causing us to be conservative around bitcasts. This was unfortunate since bitcast instructions are no-ops and should never break optimizations. With an explicit `Size` parameter, we're more precise (as shown in the test cases), and the code is simpler. We should eventually move towards a `DerefQuery` struct that groups together a base pointer, an offset, a size and an alignment; but this patch is a first step. Reviewers: apilipenko, dblaikie, hfinkel, reames Subscribers: mcrosier, llvm-commits Differential Revision: http://reviews.llvm.org/D20764 llvm-svn: 271406
Diffstat (limited to 'llvm/lib/Analysis/ModuleDebugInfoPrinter.cpp')
0 files changed, 0 insertions, 0 deletions