OSDN Git Service

[NewPM] Second attempt at porting ASan
authorLeonard Chan <leonardchan@google.com>
Wed, 13 Feb 2019 22:22:48 +0000 (22:22 +0000)
committerLeonard Chan <leonardchan@google.com>
Wed, 13 Feb 2019 22:22:48 +0000 (22:22 +0000)
commitc6bc69a573077ffdfba833b34944d5494847295b
tree84df85bb797863a82a4dec6e49aa2dbac5722911
parent5077597e0d5b86d9f9c27286d8b28f8b3645a74c
[NewPM] Second attempt at porting ASan

This is the second attempt to port ASan to new PM after D52739. This takes the
initialization requried by ASan from the Module by moving it into a separate
class with it's own analysis that the new PM ASan can use.

Changes:
- Split AddressSanitizer into 2 passes: 1 for the instrumentation on the
  function, and 1 for the pass itself which creates an instance of the first
  during it's run. The same is done for AddressSanitizerModule.
- Add new PM AddressSanitizer and AddressSanitizerModule.
- Add legacy and new PM analyses for reading data needed to initialize ASan with.
- Removed DominatorTree dependency from ASan since it was unused.
- Move GlobalsMetadata and ShadowMapping out of anonymous namespace since the
  new PM analysis holds these 2 classes and will need to expose them.

Differential Revision: https://reviews.llvm.org/D56470

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353985 91177308-0d34-0410-b5e6-96231b3b80d8
bindings/go/llvm/InstrumentationBindings.cpp
include/llvm/InitializePasses.h
include/llvm/Transforms/Instrumentation.h
include/llvm/Transforms/Instrumentation/AddressSanitizer.h [new file with mode: 0644]
lib/Passes/PassBuilder.cpp
lib/Passes/PassRegistry.def
lib/Transforms/Instrumentation/AddressSanitizer.cpp
lib/Transforms/Instrumentation/Instrumentation.cpp
test/Instrumentation/AddressSanitizer/basic.ll