summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/BoundsChecking.cpp
Commit message (Collapse)AuthorAgeFilesLines
* move the bounds checking pass to the instrumentation folder, where it ↵Nuno Lopes2012-07-201-209/+0
| | | | | | | | belongs. I dunno why in the world I dropped it in the Scalar folder in the first place. No functionality change. llvm-svn: 160587
* BoundsChecking: optimize out the check for offset < 0 if size is known to ↵Nuno Lopes2012-07-031-7/+10
| | | | | | | | be >= 0 (signed). (LLVM optimizers cannot do this optimization by themselves) llvm-svn: 159668
* Move llvm/Support/IRBuilder.h -> llvm/IRBuilder.hChandler Carruth2012-06-291-4/+4
| | | | | | | | | | | | | | | | | 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. llvm-svn: 159421
* BoundsChecking: attach debug info to traps to make my life a bit more saneNuno Lopes2012-06-231-9/+10
| | | | llvm-svn: 159055
* port the BoundsChecking patch to the new MemoryBuiltin API (i.e., remove ↵Nuno Lopes2012-06-211-393/+30
| | | | | | | | most of the code from here). Remove the alloc_size.ll test until we settle on a metadata format that makes everyone happy.. llvm-svn: 158920
* BoundsChecking: add support for ConstantPointerNull. fixes a bunch of ↵Nuno Lopes2012-06-081-6/+7
| | | | | | instrumentation failures in loops with reallocs llvm-svn: 158210
* BoundsChecking: fix a bug when the handling of recursive PHIs failed and ↵Nuno Lopes2012-06-011-22/+39
| | | | | | | | | | 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) llvm-svn: 157822
* add -bounds-checking-multiple-traps option to make one trap BB per checkNuno Lopes2012-05-311-1/+5
| | | | | | disabled by default for now; we can discusse the default value (& name) later llvm-svn: 157777
* revamp BoundsChecking considerably:Nuno Lopes2012-05-311-129/+230
| | | | | | | | | | | | - 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. llvm-svn: 157775
* bounds checking:Nuno Lopes2012-05-291-13/+51
| | | | | | | - 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 llvm-svn: 157649
* bounds checking: add support for byval argumentsNuno Lopes2012-05-251-1/+9
| | | | llvm-svn: 157498
* boundschecking:Nuno Lopes2012-05-251-50/+104
| | | | | | | add support for select add experimental support for alloc_size metadata llvm-svn: 157481
* BoundsChecking: add a couple of simple tests and fix a bug in branch emitionNuno Lopes2012-05-231-7/+19
| | | | llvm-svn: 157329
* address some of John Criswell's commentsNuno Lopes2012-05-221-31/+84
| | | | | | teach computeAllocSize about realloc, reallocf, and valloc llvm-svn: 157298
* add a new pass to instrument loads and stores for run-time bounds checkingNuno Lopes2012-05-221-0/+280
move EmitGEPOffset from InstCombine to Transforms/Utils/Local.h (a draft of this) patch reviewed by Andrew, thanks. llvm-svn: 157261
OpenPOWER on IntegriCloud