summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation
Commit message (Collapse)AuthorAgeFilesLines
* Sort all of the includes. Several files got checked in with mis-sortedChandler Carruth2013-01-194-4/+3
| | | | | | includes. llvm-svn: 172891
* 80 columnsAlexey Samsonov2013-01-181-1/+2
| | | | llvm-svn: 172813
* Move Blacklist.h to include/ to enable use from clang.Will Dietz2013-01-185-70/+13
| | | | llvm-svn: 172806
* ASan: add optional 'zero-based shadow' option to ASan passes. Always tell ↵Alexey Samsonov2013-01-171-35/+39
| | | | | | the values of shadow scale and offset to the runtime llvm-svn: 172709
* ASan: wrap mapping scale and offset in a struct and make it a member of ASan ↵Alexey Samsonov2013-01-161-51/+78
| | | | | | passes. Add test for non-default mapping scale and offset. No functionality change llvm-svn: 172610
* [msan] Fix handling of equality comparison of pointer vectors.Evgeniy Stepanov2013-01-151-6/+9
| | | | | | Also improve test coveration of the handling of relational comparisons. llvm-svn: 172539
* [msan] Change va_start/va_copy shadow memset alignment to 8.Peter Collingbourne2013-01-101-2/+2
| | | | | | | | | This fixes va_start/va_copy of a va_list field which happens to not be laid out at a 16-byte boundary. Differential Revision: http://llvm-reviews.chandlerc.com/D276 llvm-svn: 172128
* Actually update the CMake and Makefile builds correctly, and update theChandler Carruth2013-01-021-1/+1
| | | | | | | | | | code that includes Intrinsics.gen directly. This never showed up in my testing because the old Intrinsics.gen was still kicking around in the make build system and was correct there. =[ Thankfully, some of the bots to clean rebuilds and that caught this. llvm-svn: 171373
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-0211-53/+53
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Resort the #include lines in include/... and lib/... with theChandler Carruth2013-01-021-1/+1
| | | | | | | | | | utils/sort_includes.py script. Most of these are updating the new R600 target and fixing up a few regressions that have creeped in since the last time I sorted the includes. llvm-svn: 171362
* Remove the Function::getFnAttributes method in favor of using the AttributeSetBill Wendling2012-12-301-1/+2
| | | | | | | | | directly. This is in preparation for removing the use of the 'Attribute' class as a collection of attributes. That will shift to the AttributeSet class instead. llvm-svn: 171253
* Add proper support for -fsanitize-blacklist= flag for TSan and MSan. LLVM part.Alexey Samsonov2012-12-282-18/+24
| | | | llvm-svn: 171183
* [ASan] Fix lifetime intrinsics handling. Now for each intrinsic we check if ↵Alexey Samsonov2012-12-271-69/+91
| | | | | | it describes one of 'interesting' allocas. Assume that allocas can go through casts and phi-nodes before apperaring as llvm.lifetime arguments llvm-svn: 171153
* [msan] Raise alignment of origin stores/loads when possible.Evgeniy Stepanov2012-12-261-5/+11
| | | | | | | Origin alignment is as high as the alignment of the corresponding application location, but never less than 4. llvm-svn: 171110
* [msan] Expand the file comment with track-origins info.Evgeniy Stepanov2012-12-261-5/+27
| | | | llvm-svn: 171109
* [msan] Fix handling of vectors of pointers.Evgeniy Stepanov2012-12-251-2/+7
| | | | | | | VectorType::getInteger() can not be used with them, because pointer size depends on the target. llvm-svn: 171070
* [msan] Fix handling of select with vector condition.Evgeniy Stepanov2012-12-251-2/+11
| | | | llvm-svn: 171069
* ASan: initialize callbacks from ASan module pass in a separate function for ↵Alexey Samsonov2012-12-251-21/+28
| | | | | | consistency llvm-svn: 171061
* ASan: move stack poisoning logic into FunctionStackPoisoner structAlexey Samsonov2012-12-251-190/+220
| | | | llvm-svn: 171060
* Add LLVMContext::emitWarning methods and use them. <rdar://problem/12867368>Bob Wilson2012-12-243-6/+8
| | | | | | | | | When the backend is used from clang, it should produce proper diagnostics instead of just printing messages to errs(). Other clients may also want to register their own error handlers with the LLVMContext, and the same handler should work for warnings in the same way as the existing emitError methods. llvm-svn: 171041
* Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | llvm-svn: 170902
* [msan] Remove unreachable blocks before instrumenting a function.Evgeniy Stepanov2012-12-211-0/+8
| | | | llvm-svn: 170883
* [msan] Add track-origins argument to the pass constructor.Evgeniy Stepanov2012-12-191-24/+31
| | | | llvm-svn: 170544
* [msan] Heuristically instrument unknown intrinsics.Evgeniy Stepanov2012-12-191-1/+143
| | | | | | | | | | | | This changes adds shadow and origin propagation for unknown intrinsics by examining the arguments and ModRef behaviour. For now, only 3 classes of intrinsics are handled: - those that look like simple SIMD store - those that look like simple SIMD load - those that don't have memory effects and look like arithmetic/logic/whatever operation on simple types. llvm-svn: 170530
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-193-16/+16
| | | | | | single attribute in the future. llvm-svn: 170502
* Initialize NoRedZone and remove unused default values.Rafael Espindola2012-12-181-3/+4
| | | | llvm-svn: 170404
* [msan] Fix lint warning.Evgeniy Stepanov2012-12-171-1/+2
| | | | llvm-svn: 170347
* Fix lint warnings in MemorySanitizer.cpp.Evgeniy Stepanov2012-12-141-9/+12
| | | | llvm-svn: 170203
* [msan] Origin stores and loads do not need explicit alignment.Evgeniy Stepanov2012-12-141-9/+8
| | | | | | Origin address is always 4 byte aligned, and the access type is always i32. llvm-svn: 170199
* [msan] Refactor default shadow propagation and origin tracking.Evgeniy Stepanov2012-12-141-52/+117
| | | | | | | | This change moves the code for default shadow propagaition (handleShadowOr) and origin tracking (setOriginForNaryOp) into a new builder-like class. Also gets rid of handleShadowOrBinary. llvm-svn: 170192
* Improve debug info generated with enabled AddressSanitizer.Alexey Samsonov2012-12-121-0/+4
| | | | | | | | | | | | When ASan replaces <alloca instruction> with <offset into a common large alloca>, it should also patch llvm.dbg.declare calls and replace debug info descriptors to mark that we've replaced alloca with a value that stores an address of the user variable, not the user variable itself. See PR11818 for more context. llvm-svn: 169984
* [msan] Use explicitely aligned stores and loads with function argument shadow.Evgeniy Stepanov2012-12-111-8/+13
| | | | | | | | Use explicitely aligned store and load instructions to deal with argument and retval shadow. This matters when an argument's alignment is higher than __msan_param_tls alignment (which is the case with __m128i). llvm-svn: 169859
* Don't use a red zone for code coverage if the user specified `-mno-red-zone'.Bill Wendling2012-12-101-4/+17
| | | | | | | | | The `-mno-red-zone' flag wasn't being propagated to the functions that code coverage generates. This allowed some of them to use the red zone when that wasn't allowed. <rdar://problem/12843084> llvm-svn: 169754
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-2/+2
| | | | | | in the near future. llvm-svn: 169651
* [msan] Remove readonly/readnone attributes from all called functions.Evgeniy Stepanov2012-12-071-0/+13
| | | | | | | | | | MSan uses a TLS slot to pass shadow for function arguments and return values. This makes all instrumented functions not readonly, and at the same time requires that all callees of an instrumented function that may be MSan-instrumented do not have readonly attribute (otherwise some of the instrumentation may be optimized out). llvm-svn: 169591
* MemorySanitizer.cpp: Suppress a warning. [-Wunused-variable]NAKAMURA Takumi2012-12-061-0/+1
| | | | llvm-svn: 169504
* [msan] Fix a typo in a comment.Evgeniy Stepanov2012-12-061-1/+1
| | | | llvm-svn: 169491
* [msan] Do not store origin for clean values.Evgeniy Stepanov2012-12-061-17/+57
| | | | | | | | | | | | | | | | | | Instead of unconditionally storing origin with every application store, only do this when the shadow of the stored value is != 0. This change also delays instrumentation of stores until after the walk over function's instructions, because adding new basic blocks confuses InstVisitor. We only keep 1 origin value per 4 bytes of application memory. This change fixes the bug when a store of a single clean byte wiped the origin for the whole 4-byte area. Since stores of uninitialized values are relatively uncommon, this change improves performance of track-origins mode by 5% median and by up to 47% on specs. llvm-svn: 169490
* [msan] Instrument bswap intrinsic.Evgeniy Stepanov2012-12-051-6/+21
| | | | llvm-svn: 169383
* [msan] Initialize callbacks in runOnFunction as opposed to doInitialization.Evgeniy Stepanov2012-12-051-37/+49
| | | | | | This mirrors the change in ASan & TSan done in r168864. llvm-svn: 169378
* [msan] Change linkage type of __msan_track_origins.Evgeniy Stepanov2012-12-051-1/+1
| | | | | | | LinkOnceODRLinkage globals may be removed in GlobalOpt if not used in the current module. llvm-svn: 169377
* Sort includes for all of the .h files under the 'lib' tree. These wereChandler Carruth2012-12-041-2/+2
| | | | | | | | | | missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] llvm-svn: 169224
* [asan] add experimental -asan-realign-stack option (true by default, which ↵Kostya Serebryany2012-12-041-2/+7
| | | | | | does not change the current behavior) llvm-svn: 169216
* ASan: add initial support for handling llvm.lifetime intrinsics in ASan - ↵Alexey Samsonov2012-12-041-3/+108
| | | | | | emit calls into runtime library that poison memory for local variables when their lifetime is over and unpoison memory when their lifetime begins. llvm-svn: 169200
* ASan: add blacklist file to ASan pass options. Clang patch for this will follow.Alexey Samsonov2012-12-031-13/+22
| | | | llvm-svn: 169143
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-039-56/+51
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* fix stats for added checksNuno Lopes2012-12-031-1/+1
| | | | llvm-svn: 169119
* [asan] simplify the code around doesNotReturn call. It now magically works. Kostya Serebryany2012-11-301-8/+1
| | | | llvm-svn: 168995
* Move the InstVisitor utility into VMCore where it belongs. It heavilyChandler Carruth2012-11-301-1/+1
| | | | | | | | | | | | depends on the IR infrastructure, there is no sense in it being off in Support land. This is in preparation to start working to expand InstVisitor into more special-purpose visitors that are still generic and can be re-used across different passes. The expansion will go into the Analylis tree though as nothing in VMCore needs it. llvm-svn: 168972
* [ASan] Simplify check added in r168861. Bail out from module pass early if ↵Alexey Samsonov2012-11-291-2/+2
| | | | | | the module is blacklisted. llvm-svn: 168913
OpenPOWER on IntegriCloud