aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation
Commit message (Collapse)AuthorAgeFilesLines
...
| * [msan] Instrument bswap intrinsic.Evgeniy Stepanov2012-12-051-6/+21
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169383 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169378 91177308-0d34-0410-b5e6-96231b3b80d8
| * [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169377 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169224 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] add experimental -asan-realign-stack option (true by default, which ↵Kostya Serebryany2012-12-041-2/+7
| | | | | | | | | | | | does not change the current behavior) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169216 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169200 91177308-0d34-0410-b5e6-96231b3b80d8
| * ASan: add blacklist file to ASan pass options. Clang patch for this will follow.Alexey Samsonov2012-12-031-13/+22
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169143 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169131 91177308-0d34-0410-b5e6-96231b3b80d8
| * fix stats for added checksNuno Lopes2012-12-031-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169119 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] simplify the code around doesNotReturn call. It now magically works. Kostya Serebryany2012-11-301-8/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168995 91177308-0d34-0410-b5e6-96231b3b80d8
| * 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168972 91177308-0d34-0410-b5e6-96231b3b80d8
| * [ASan] Simplify check added in r168861. Bail out from module pass early if ↵Alexey Samsonov2012-11-291-2/+2
| | | | | | | | | | | | the module is blacklisted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168913 91177308-0d34-0410-b5e6-96231b3b80d8
| * Apply Takumi's patch to suppress unused-variable warnings in -Asserts builds.Matt Beaumont-Gay2012-11-291-2/+7
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168911 91177308-0d34-0410-b5e6-96231b3b80d8
| * Add options to AddressSanitizer passes to make them configurable by frontend.Alexey Samsonov2012-11-291-11/+28
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168910 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Handle vector manipulation instructions.Evgeniy Stepanov2012-11-291-0/+25
| | | | | | | | | | | | | | Handle insertelement, extractelement, shufflevector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168889 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Fix getOriginForNaryOp.Evgeniy Stepanov2012-11-291-2/+3
| | | | | | | | | | | | | | | | | | | | | | The old version failed on a 3-arg instruction with (-1, 0, 0) shadows (it would pick the 3rd operand origin irrespective of its shadow). The new version always picks the origin of the rightmost poisoned operand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168887 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Basic handling of inline asm.Evgeniy Stepanov2012-11-291-1/+10
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168884 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Propagate shadow through (x<0) and (x>=0) comparisons.Evgeniy Stepanov2012-11-291-0/+30
| | | | | | | | | | | | | | | | This is a special case of signed relational comparison where result only depends on the sign of x. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168881 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Fix shadow & origin store & load alignment.Evgeniy Stepanov2012-11-291-4/+4
| | | | | | | | | | | | | | | | This change ensures that shadow memory accesses have the same alignment as corresponding app memory accesses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168880 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Optimize getOriginPtr.Evgeniy Stepanov2012-11-291-3/+4
| | | | | | | | | | | | | | | | | | | | Rewrite getOriginPtr in a way that lets subsequent optimizations factor out the common part of Shadow and Origin address calculation. Improves perf by up to 5%. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168879 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Fix a few compilation warnings.Evgeniy Stepanov2012-11-291-2/+4
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168878 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Transform memcpy and memset to library calls.Evgeniy Stepanov2012-11-291-34/+35
| | | | | | | | | | | | | | | | | | | | This was already done for memmove, where it is required for correctness. This change improves performance by avoiding copyingthe same memory twice. Also, the library functions are given __msan_ prefix to prevent instcombine pass from converting them back to intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168876 91177308-0d34-0410-b5e6-96231b3b80d8
| * [msan] Make sure that report callbacks do not get merged.Evgeniy Stepanov2012-11-291-0/+8
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168873 91177308-0d34-0410-b5e6-96231b3b80d8
| * Initial commit of MemorySanitizer.Evgeniy Stepanov2012-11-293-0/+1421
| | | | | | | | | | | | | | Compiler pass only. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168866 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan/tsan] initialize the asan/tsan callbacks in runOnFunction as opposed ↵Kostya Serebryany2012-11-292-37/+48
| | | | | | | | | | | | to doInitialization. This is required to allow the upcoming changes in PassManager behavior git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168864 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] when checking the noreturn attribute on the call, also check it on ↵Kostya Serebryany2012-11-291-1/+9
| | | | | | | | | | | | the callee git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168861 91177308-0d34-0410-b5e6-96231b3b80d8
| * Issue a fatal error if the line doesn't have a regular expression.Nick Lewycky2012-11-291-6/+12
| | | | | | | | | | | | | | | | Also a couple not-user-visible changes; using empty() instead of size(), and make inSection() not insert NULL Regex*'s into StringMap when doing a lookup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168833 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] Split AddressSanitizer into two passes (FunctionPass, ModulePass), ↵Kostya Serebryany2012-11-282-25/+26
| | | | | | | | | | | | LLVM part. This requires a clang part which will follow. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168781 91177308-0d34-0410-b5e6-96231b3b80d8
| * tsan: instrument atomic nand operationDmitry Vyukov2012-11-271-0/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168684 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove stray trailing backslashMatt Beaumont-Gay2012-11-261-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168592 91177308-0d34-0410-b5e6-96231b3b80d8
| * tsan: fix lint warningsDmitry Vyukov2012-11-261-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168590 91177308-0d34-0410-b5e6-96231b3b80d8
| * [tsan] add fail order to compare_exchangeDmitry Vyukov2012-11-261-3/+27
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168586 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove unused parameter Penalty from the BoundsChecking pass.Joey Gouly2012-11-231-4/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168511 91177308-0d34-0410-b5e6-96231b3b80d8
| * llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp: Prune ↵NAKAMURA Takumi2012-11-221-1/+0
| | | | | | | | | | | | AddressSanitizerCreateGlobalRedzonesPass::ID. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168499 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] rip off the creation of global redzones from the main ↵Kostya Serebryany2012-11-221-52/+75
| | | | | | | | | | | | AddressSanitizer class into a separate class. The intent is to make it a separate ModulePass in the following commmits git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168484 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] use names of globals instead of an external set to distinguish the ↵Kostya Serebryany2012-11-201-4/+8
| | | | | | | | | | | | globals generated by asan git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168368 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] don't instrument linker-initialized globals even with external ↵Kostya Serebryany2012-11-201-5/+3
| | | | | | | | | | | | linkage in -asan-initialization-order mode git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168367 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] make sure that linker-initialized globals (non-extern) are not ↵Kostya Serebryany2012-11-201-31/+31
| | | | | | | | | | | | instrumented even in -asan-initialization-order mode. This time with a test git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168366 91177308-0d34-0410-b5e6-96231b3b80d8
| * Plug a memory leak in the GCOV profiling emitter, which never released the ↵Benjamin Kramer2012-11-171-5/+5
| | | | | | | | | | | | edge table memory. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168259 91177308-0d34-0410-b5e6-96231b3b80d8
| * [TSan] fix indentationAlexey Samsonov2012-11-141-1/+1
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167928 91177308-0d34-0410-b5e6-96231b3b80d8
| * [ASan] fixup for r167725: Don't fetch name of StructType if it is literalAlexey Samsonov2012-11-121-2/+3
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167729 91177308-0d34-0410-b5e6-96231b3b80d8
| * [ASan]: Add minimalistic support for turning off initialization-order ↵Alexey Samsonov2012-11-122-2/+16
| | | | | | | | | | | | checking for globals of specified types. Tests for this behavior will go to ASan test suite in compiler-rt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167725 91177308-0d34-0410-b5e6-96231b3b80d8
| * tsan: switch to new memory_order constants (ABI compatible)Dmitry Vyukov2012-11-091-8/+7
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167615 91177308-0d34-0410-b5e6-96231b3b80d8
| * tsan: instrument all atomics (including fetch_add, exchange, cas, etc)Dmitry Vyukov2012-11-091-8/+76
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167612 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] fix bug 14277 (asan needs to fail with fata error if an __asan ↵Kostya Serebryany2012-11-071-2/+3
| | | | | | | | | | | | interface function is being redefined. Before this fix asan asserts) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167529 91177308-0d34-0410-b5e6-96231b3b80d8
| * Fix whitespacesAlexey Samsonov2012-11-021-2/+2
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167295 91177308-0d34-0410-b5e6-96231b3b80d8
| * [asan] don't instrument globals that we've created ourselves (reduces the ↵Kostya Serebryany2012-11-011-3/+6
| | | | | | | | | | | | binary size a bit) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167230 91177308-0d34-0410-b5e6-96231b3b80d8
| * Revert the majority of the next patch in the address space series:Chandler Carruth2012-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r165941: Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. Despite this commit log, this change primarily changed stuff outside of VMCore, and those changes do not carry any tests for correctness (or even plausibility), and we have consistently found questionable or flat out incorrect cases in these changes. Most of them are probably correct, but we need to devise a system that makes it more clear when we have handled the address space concerns correctly, and ideally each pass that gets updated would receive an accompanying test case that exercises that pass specificaly w.r.t. alternate address spaces. However, from this commit, I have retained the new C API entry points. Those were an orthogonal change that probably should have been split apart, but they seem entirely good. In several places the changes were very obvious cleanups with no actual multiple address space code added; these I have not reverted when I spotted them. In a few other places there were merge conflicts due to a cleaner solution being implemented later, often not using address spaces at all. In those cases, I've preserved the new code which isn't address space dependent. This is part of my ongoing effort to clean out the partial address space code which carries high risk and low test coverage, and not likely to be finished before the 3.2 release looms closer. Duncan and I would both like to see the above issues addressed before we return to these changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167222 91177308-0d34-0410-b5e6-96231b3b80d8
| * Remove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (theDuncan Sands2012-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | wrapper returns a vector of integers when passed a vector of pointers) by having getIntPtrType itself return a vector of integers in this case. Outside of this wrapper, I didn't find anywhere in the codebase that was relying on the old behaviour for vectors of pointers, so give this a whirl through the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166939 91177308-0d34-0410-b5e6-96231b3b80d8
| * Back out r166591, not sure why this made it through since I cancelled the ↵Micah Villmow2012-10-243-8/+6
| | | | | | | | | | | | command. Bleh, sorry about this! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166596 91177308-0d34-0410-b5e6-96231b3b80d8