aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation
Commit message (Collapse)AuthorAgeFilesLines
...
| * Revert r173678.Evgeniy Stepanov2013-01-281-1/+1
| | | | | | | | | | | | | | Broken tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173679 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Make msan-handle-icmp-exact=0 by default.Evgeniy Stepanov2013-01-281-1/+1
| | | | | | | | | | | | | | 50% slowdown on one of the specs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173678 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] A comment on ICmp handling logic.Evgeniy Stepanov2013-01-251-0/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173453 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Implement exact shadow propagation for relational ICmp.Evgeniy Stepanov2013-01-251-0/+70
| | | | | | | | | | | | | | | | | | Only for integers, pointers, and vectors of those. No floats. Instrumentation seems very heavy, and may need to be replaced with some approximation in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173452 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] fix 32-bit buildsKostya Serebryany2013-01-241-3/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173338 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] adaptive redzones for globals (the larger the global the larger is ↵Kostya Serebryany2013-01-241-3/+13
| | | | | | | | | | | | the redzone) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173335 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] use ADD instead of OR when applying shadow offset of PowerPC. See ↵Kostya Serebryany2013-01-231-4/+15
| | | | | | | | | | | | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975 for details git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173258 91177308-0d34-0410-b5e6-96231b3b80d8
| * Use the AttributeSet when removing multiple attributes. Use Attribute::AttrKindBill Wendling2013-01-231-4/+7
| | | | | | | | | | | | | | when removing one attribute. This further encapsulates the use of the attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173214 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Export the value of msan-keep-going flag for the runtime.Evgeniy Stepanov2013-01-221-0/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173156 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Do not insert check on volatile store.Evgeniy Stepanov2013-01-221-4/+1
| | | | | | | | | | | | | | Volatile bitfields can cause valid stores of uninitialized bits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173153 91177308-0d34-0410-b5e6-96231b3b80d8
| * Sort all of the includes. Several files got checked in with mis-sortedChandler Carruth2013-01-194-4/+3
| | | | | | | | | | | | includes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172891 91177308-0d34-0410-b5e6-96231b3b80d8
| * 80 columnsAlexey Samsonov2013-01-181-1/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172813 91177308-0d34-0410-b5e6-96231b3b80d8
| * Move Blacklist.h to include/ to enable use from clang.Will Dietz2013-01-185-70/+13
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172806 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172709 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172610 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172539 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172128 91177308-0d34-0410-b5e6-96231b3b80d8
* | Update LLVM for merge to r171905.Stephen Hines2013-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android.mk lib/Analysis/Android.mk lib/CodeGen/Android.mk lib/CodeGen/MachineScheduler.cpp - specify std::pop_heap() lib/IR/Android.mk - new from lib/VMCore lib/MC/Android.mk lib/MC/MCAssembler.cpp - put back pointer param (from reference). lib/Support/DeltaAlgorithm.cpp - iterator -> const_iterator ! lib/TableGen/Android.mk lib/Target/ARM/ARMJITInfo.cpp - Removed unused legacy JIT changes lib/Target/ARM/Android.mk lib/Target/ARM/AsmParser/Android.mk lib/Target/ARM/Disassembler/Android.mk lib/Target/ARM/MCTargetDesc/Android.mk lib/Target/Android.mk lib/Target/Mips/Android.mk lib/Target/Mips/Disassembler/Android.mk lib/Target/Mips/MCTargetDesc/Android.mk lib/Target/X86/Android.mk lib/Target/X86/AsmParser/Android.mk lib/Target/X86/Disassembler/Android.mk lib/Transforms/IPO/Android.mk lib/Transforms/Instrumentation/Android.mk lib/Transforms/Scalar/Android.mk lib/Transforms/Utils/Android.mk lib/Transforms/Vectorize/Android.mk lib/VMCore/Android.mk - moved to lib/IR llvm-gen-intrinsics.mk - new Intrinsics.td location utils/TableGen/Android.mk Change-Id: Ifebdb1716c372fd917a844c44be9d10df66434b0
* | Merge remote-tracking branch 'upstream/master' into merge-llvmStephen Hines2013-01-2114-475/+2724
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | Conflicts: lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp lib/MC/MCAssembler.cpp lib/Support/Atomic.cpp lib/Support/Memory.cpp lib/Target/ARM/ARMJITInfo.cpp Change-Id: Ib339baf88df5b04870c8df1bedcfe1f877ccab8d
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171373 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171362 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171253 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add proper support for -fsanitize-blacklist= flag for TSan and MSan. LLVM part.Alexey Samsonov2012-12-282-18/+24
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171183 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171153 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171110 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Expand the file comment with track-origins info.Evgeniy Stepanov2012-12-261-5/+27
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171109 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171070 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Fix handling of select with vector condition.Evgeniy Stepanov2012-12-251-2/+11
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171069 91177308-0d34-0410-b5e6-96231b3b80d8
| * ASan: initialize callbacks from ASan module pass in a separate function for ↵Alexey Samsonov2012-12-251-21/+28
| | | | | | | | | | | | consistency git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171061 91177308-0d34-0410-b5e6-96231b3b80d8
| * ASan: move stack poisoning logic into FunctionStackPoisoner structAlexey Samsonov2012-12-251-190/+220
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171060 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171041 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove duplicate includes.Roman Divacky2012-12-211-1/+0
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170902 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Remove unreachable blocks before instrumenting a function.Evgeniy Stepanov2012-12-211-0/+8
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170883 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Add track-origins argument to the pass constructor.Evgeniy Stepanov2012-12-191-24/+31
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170544 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170530 91177308-0d34-0410-b5e6-96231b3b80d8
| * Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-193-16/+16
| | | | | | | | | | | | single attribute in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8
| * Initialize NoRedZone and remove unused default values.Rafael Espindola2012-12-181-3/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170404 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Fix lint warning.Evgeniy Stepanov2012-12-171-1/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170347 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix lint warnings in MemorySanitizer.cpp.Evgeniy Stepanov2012-12-141-9/+12
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170203 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170199 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170192 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169984 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169859 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169754 91177308-0d34-0410-b5e6-96231b3b80d8
| * s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-2/+2
| | | | | | | | | | | | in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169591 91177308-0d34-0410-b5e6-96231b3b80d8
| * MemorySanitizer.cpp: Suppress a warning. [-Wunused-variable]NAKAMURA Takumi2012-12-061-0/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169504 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Fix a typo in a comment.Evgeniy Stepanov2012-12-061-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169491 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169490 91177308-0d34-0410-b5e6-96231b3b80d8