aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar/BoundsChecking.cpp
AgeCommit message (Collapse)Author
2012-07-20move the bounds checking pass to the instrumentation folder, where it ↵Nuno Lopes
belongs. I dunno why in the world I dropped it in the Scalar folder in the first place. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160587 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-03BoundsChecking: optimize out the check for offset < 0 if size is known to ↵Nuno Lopes
be >= 0 (signed). (LLVM optimizers cannot do this optimization by themselves) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159668 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-29Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth
This was always part of the VMCore library out of necessity -- it deals entirely in the IR. The .cpp file in fact was already part of the VMCore library. This is just a mechanical move. I've tried to go through and re-apply the coding standard's preferred header sort, but at 40-ish files, I may have gotten some wrong. Please let me know if so. I'll be committing the corresponding updates to Clang and Polly, and Duncan has DragonEgg. Thanks to Bill and Eric for giving the green light for this bit of cleanup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159421 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-23BoundsChecking: attach debug info to traps to make my life a bit more saneNuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159055 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-21port the BoundsChecking patch to the new MemoryBuiltin API (i.e., remove ↵Nuno Lopes
most of the code from here). Remove the alloc_size.ll test until we settle on a metadata format that makes everyone happy.. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158920 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-08BoundsChecking: add support for ConstantPointerNull. fixes a bunch of ↵Nuno Lopes
instrumentation failures in loops with reallocs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158210 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-01BoundsChecking: fix a bug when the handling of recursive PHIs failed and ↵Nuno Lopes
could leave dangling references in the cache add regression tests for this problem. Can already compile & run: PHP, PCRE, and ICU (i.e., all the software I tried) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157822 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31add -bounds-checking-multiple-traps option to make one trap BB per checkNuno Lopes
disabled by default for now; we can discusse the default value (& name) later git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157777 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-31revamp BoundsChecking considerably:Nuno Lopes
- compute size & offset at the same time. The side-effects of this are that we now support negative GEPs. It's now approaching a phase that it can be reused by other passes (e.g., lowering of the objectsize intrinsic) - use APInt throughout to handle wrap-arounds - add support for PHI instrumentation - add a cache (required for recursive PHIs anyway) - remove hoisting support for now, since it was wrong in a few cases sorry for the churn here.. tests will follow soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157775 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-29bounds checking:Nuno Lopes
- hoist checks out of loops where SCEV is smart enough - add additional statistics to measure how much we loose for not supporting interprocedural and pointers loaded from memory git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157649 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-25bounds checking: add support for byval argumentsNuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157498 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-25boundschecking:Nuno Lopes
add support for select add experimental support for alloc_size metadata git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157481 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-23BoundsChecking: add a couple of simple tests and fix a bug in branch emitionNuno Lopes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157329 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-22address some of John Criswell's commentsNuno Lopes
teach computeAllocSize about realloc, reallocf, and valloc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157298 91177308-0d34-0410-b5e6-96231b3b80d8
2012-05-22add a new pass to instrument loads and stores for run-time bounds checkingNuno Lopes
move EmitGEPOffset from InstCombine to Transforms/Utils/Local.h (a draft of this) patch reviewed by Andrew, thanks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157261 91177308-0d34-0410-b5e6-96231b3b80d8