<div dir="ltr">FWIW this is really increasing compile time of asan instrumented code with the new pass manager. We're looking, but sending a message just in case someone is aware here.<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Oct 16, 2018 at 5:23 PM Leonard Chan via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">No problem. Also looked into the tests for a bit.<br>
<br>
For atomic_ops.c, it seems that the test just needs to ignore or XFAIL<br>
for this target since the test just assumes all targets (except for<br>
hexagon and sparc) will have native atomic load support (ie load<br>
atomic vs call void @__atomic_load).<br>
<br>
For illegal-UTF8.m, I don't know objective C very well, but I think<br>
it's a similar issue where there is an unsupported feature for this<br>
target and it should be ignored/XFAIL'd also.<br>
<br>
And for the go test, I don't know what that is or why it's broken :p.<br>
<br>
- LeonardLooked into the remaining tests a bit. From what I can tell,<br>
it just seems like On Tue, Oct 16, 2018 at 4:47 PM Leonard Chan<br>
<<a href="mailto:leonardchan@google.com" target="_blank">leonardchan@google.com</a>> wrote:<br>
><br>
> I created a patch that has the fix and added you as a reviewer:<br>
> <a href="https://reviews.llvm.org/D53350" rel="noreferrer" target="_blank">https://reviews.llvm.org/D53350</a><br>
><br>
> This should fix all of the tests related to ASan, but I'm still unsure<br>
> about the remaining failing tests. For me, building with your cmake<br>
> invocation, I ended up with the following 18 errors:<br>
><br>
>    Clang :: CodeGen/address-safety-attr-flavors.cpp<br>
>     Clang :: CodeGen/address-safety-attr.cpp<br>
>     Clang :: CodeGen/address-sanitizer-and-array-cookie.cpp<br>
>     Clang :: CodeGen/asan-globals-gc.cpp<br>
>     Clang :: CodeGen/asan-globals.cpp<br>
>     Clang :: CodeGen/asan-no-globals-no-comdat.cpp<br>
>     Clang :: CodeGen/atomic_ops.c<br>
>     Clang :: CodeGen/lifetime-asan.c<br>
>     Clang :: CodeGen/sanitize-address-field-padding.cpp<br>
>     Clang :: CodeGen/sanitize-init-order.cpp<br>
>     Clang :: CodeGenCXX/catch-undef-behavior.cpp<br>
>     Clang :: CodeGenCXX/finegrain-bitfield-access.cpp<br>
>     Clang :: CodeGenCXX/lifetime-asan.cpp<br>
>     Clang :: CodeGenObjC/illegal-UTF8.m<br>
>     Clang :: CodeGenObjC/no-sanitize.m<br>
>     Clang :: CodeGenObjCXX/<a href="http://address-safety-attr.mm" rel="noreferrer" target="_blank">address-safety-attr.mm</a><br>
>     Clang :: Driver/asan.c<br>
>     LLVM :: Bindings/Go/go.test<br>
><br>
> of which, I was able to fix 15 with the fix in the patch. Although these 3,<br>
><br>
>     Clang :: CodeGen/atomic_ops.c<br>
>     Clang :: CodeGenObjC/illegal-UTF8.m<br>
>     LLVM :: Bindings/Go/go.test<br>
><br>
> are still broken. I don't think they have to do with my ASan patch,<br>
> but I'll still look into them for a bit.<br>
><br>
> - Leonard<br>
> On Tue, Oct 16, 2018 at 2:35 PM Leonard Chan <<a href="mailto:leonardchan@google.com" target="_blank">leonardchan@google.com</a>> wrote:<br>
> ><br>
> > I will take a look. Thanks for bringing this up.<br>
> ><br>
> > - Leonard<br>
> > On Tue, Oct 16, 2018 at 2:21 PM <<a href="mailto:douglas.yung@sony.com" target="_blank">douglas.yung@sony.com</a>> wrote:<br>
> > ><br>
> > > Hi Leonard,<br>
> > ><br>
> > > I encountered some test issues after attempting to build/test your changes on my local machine. I built on my linux machine your change with an ARM target and hit the following failure in multiple tests:<br>
> > ><br>
> > > FAIL: Clang :: CodeGen/address-safety-attr-flavors.cpp (5007 of 42408)<br>
> > > ******************** TEST 'Clang :: CodeGen/address-safety-attr-flavors.cpp' FAILED ********************<br>
> > > Script:<br>
> > > --<br>
> > > : 'RUN: at line 8';   /home/dyung/src/upstream/344274-linux-arm/bin/clang -cc1 -internal-isystem /home/dyung/src/upstream/344274-linux-arm/lib/clang/8.0.0/include -nostdsysteminc -triple i386-unknown-linux -disable-O0-optnone    -emit-llvm -o - /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp | /home/dyung/src/upstream/344274-linux-arm/bin/FileCheck -check-prefix=CHECK-NOASAN /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp<br>
> > > : 'RUN: at line 11';   /home/dyung/src/upstream/344274-linux-arm/bin/clang -cc1 -internal-isystem /home/dyung/src/upstream/344274-linux-arm/lib/clang/8.0.0/include -nostdsysteminc -triple i386-unknown-linux -fsanitize=address    -disable-O0-optnone -emit-llvm -o - /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp |    /home/dyung/src/upstream/344274-linux-arm/bin/FileCheck -check-prefix=CHECK-ASAN /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp<br>
> > > : 'RUN: at line 15';   /home/dyung/src/upstream/344274-linux-arm/bin/clang -cc1 -internal-isystem /home/dyung/src/upstream/344274-linux-arm/lib/clang/8.0.0/include -nostdsysteminc -triple i386-unknown-linux -fsanitize=kernel-address    -disable-O0-optnone -emit-llvm -o - /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp |    /home/dyung/src/upstream/344274-linux-arm/bin/FileCheck -check-prefix=CHECK-KASAN /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp<br>
> > > : 'RUN: at line 19';   /home/dyung/src/upstream/344274-linux-arm/bin/clang -cc1 -internal-isystem /home/dyung/src/upstream/344274-linux-arm/lib/clang/8.0.0/include -nostdsysteminc -triple i386-unknown-linux -fsanitize=hwaddress    -disable-O0-optnone -emit-llvm -o - /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp |    /home/dyung/src/upstream/344274-linux-arm/bin/FileCheck -check-prefix=CHECK-HWASAN /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp<br>
> > > : 'RUN: at line 23';   /home/dyung/src/upstream/344274-linux-arm/bin/clang -cc1 -internal-isystem /home/dyung/src/upstream/344274-linux-arm/lib/clang/8.0.0/include -nostdsysteminc -triple i386-unknown-linux -fsanitize=kernel-hwaddress    -disable-O0-optnone -emit-llvm -o - /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp |    /home/dyung/src/upstream/344274-linux-arm/bin/FileCheck -check-prefix=CHECK-KHWASAN /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp<br>
> > > --<br>
> > > Exit Code: 2<br>
> > ><br>
> > > Command Output (stderr):<br>
> > > --<br>
> > > Pass 'AddressSanitizerFunctionPass' is not initialized.<br>
> > > Verify if there is a pass dependency cycle.<br>
> > > Required Passes:<br>
> > > clang: /home/dyung/src/upstream/llvm_clean/lib/IR/LegacyPassManager.cpp:753: void llvm::PMTopLevelManager::schedulePass(llvm::Pass *): Assertion `PI && "Expected required passes to be initialized"' failed.<br>
> > > Stack dump:<br>
> > > 0.      Program arguments: /home/dyung/src/upstream/344274-linux-arm/bin/clang -cc1 -internal-isystem /home/dyung/src/upstream/344274-linux-arm/lib/clang/8.0.0/include -nostdsysteminc -triple i386-unknown-linux -fsanitize=address -disable-O0-optnone -emit-llvm -o - /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp<br>
> > > 1.      <eof> parser at end of file<br>
> > > #0 0x00000000014eec94 PrintStackTraceSignalHandler(void*) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x14eec94)<br>
> > > #1 0x00000000014ecb3e llvm::sys::RunSignalHandlers() (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x14ecb3e)<br>
> > > #2 0x00000000014eee52 SignalHandler(int) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x14eee52)<br>
> > > #3 0x00007fb98dfb5330 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x10330)<br>
> > > #4 0x00007fb98cdadc37 gsignal (/lib/x86_64-linux-gnu/libc.so.6+0x36c37)<br>
> > > #5 0x00007fb98cdb1028 abort (/lib/x86_64-linux-gnu/libc.so.6+0x3a028)<br>
> > > #6 0x00007fb98cda6bf6 (/lib/x86_64-linux-gnu/libc.so.6+0x2fbf6)<br>
> > > #7 0x00007fb98cda6ca2 (/lib/x86_64-linux-gnu/libc.so.6+0x2fca2)<br>
> > > #8 0x0000000000fe7079 llvm::PMTopLevelManager::schedulePass(llvm::Pass*) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0xfe7079)<br>
> > > #9 0x00000000016ba2a0 addAddressSanitizerPasses(llvm::PassManagerBuilder const&, llvm::legacy::PassManagerBase&) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x16ba2a0)<br>
> > > #10 0x0000000001fe7b9d llvm::PassManagerBuilder::addExtensionsToPM(llvm::PassManagerBuilder::ExtensionPointTy, llvm::legacy::PassManagerBase&) const (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x1fe7b9d)<br>
> > > #11 0x0000000001fe8f9f llvm::PassManagerBuilder::populateModulePassManager(llvm::legacy::PassManagerBase&) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x1fe8f9f)<br>
> > > #12 0x00000000016ae09a clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::unique_ptr<llvm::raw_pwrite_stream, std::default_delete<llvm::raw_pwrite_stream> >) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x16ae09a)<br>
> > > #13 0x0000000001f0b4bf clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x1f0b4bf)<br>
> > > #14 0x000000000279e283 clang::ParseAST(clang::Sema&, bool, bool) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x279e283)<br>
> > > #15 0x0000000001b792e0 clang::FrontendAction::Execute() (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x1b792e0)<br>
> > > #16 0x0000000001b208b1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x1b208b1)<br>
> > > #17 0x0000000001c19ca9 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x1c19ca9)<br>
> > > #18 0x00000000007efbe2 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x7efbe2)<br>
> > > #19 0x00000000007ed57a main (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x7ed57a)<br>
> > > #20 0x00007fb98cd98f45 __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21f45)<br>
> > > #21 0x00000000007ea4ed _start (/home/dyung/src/upstream/344274-linux-arm/bin/clang+0x7ea4ed)<br>
> > > FileCheck error: '-' is empty.<br>
> > > FileCheck command line:  /home/dyung/src/upstream/344274-linux-arm/bin/FileCheck -check-prefix=CHECK-ASAN /home/dyung/src/upstream/llvm_clean/tools/clang/test/CodeGen/address-safety-attr-flavors.cpp<br>
> > ><br>
> > > I build using a script which issues the following commands:<br>
> > ><br>
> > > 1. cmake -G Ninja -DLLVM_BUILD_RUNTIME=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_TIMESTAMPS=OFF -DLLVM_INCLUDE_EXAMPLES=OFF -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_VERSION_SUFFIX= -DLLVM_TARGETS_TO_BUILD=ARM -DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf -DLLVM_LIT_ARGS=--verbose -j80 --no-progress-bar -DCMAKE_BUILD_TYPE=Release <path to LLVM sources> -DLLVM_TOOL_LLD_BUILD=OFF<br>
> > ><br>
> > > 2. ninja all<br>
> > > 3. ninja check-all<br>
> > ><br>
> > > This builds and tests the compiler, and when the testing finishes, 14 of the 19 failures are for the reason above. Can you take a look?<br>
> > ><br>
> > > Douglas Yung<br>
> > ><br>
> > > > -----Original Message-----<br>
> > > > From: llvm-commits [mailto:<a href="mailto:llvm-commits-bounces@lists.llvm.org" target="_blank">llvm-commits-bounces@lists.llvm.org</a>] On<br>
> > > > Behalf Of Leonard Chan via llvm-commits<br>
> > > > Sent: Thursday, October 11, 2018 11:32<br>
> > > > To: <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> > > > Subject: [llvm] r344274 - [PassManager/Sanitizer] Port of<br>
> > > > AddresSanitizer pass from legacy to new PassManager<br>
> > > ><br>
> > > > Author: leonardchan<br>
> > > > Date: Thu Oct 11 11:31:51 2018<br>
> > > > New Revision: 344274<br>
> > > ><br>
> > > > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=344274&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=344274&view=rev</a><br>
> > > > Log:<br>
> > > > [PassManager/Sanitizer] Port of AddresSanitizer pass from legacy to new<br>
> > > > PassManager<br>
> > > ><br>
> > > > This patch ports the legacy pass manager to the new one to take<br>
> > > > advantage of<br>
> > > > the benefits of the new PM. This involved moving a lot of the<br>
> > > > declarations for<br>
> > > > `AddressSantizer` to a header so that it can be publicly used via<br>
> > > > PassRegistry.def which I believe contains all the passes managed by the<br>
> > > > new PM.<br>
> > > ><br>
> > > > This patch essentially decouples the instrumentation from the legacy PM<br>
> > > > such<br>
> > > > hat it can be used by both legacy and new PM infrastructure.<br>
> > > ><br>
> > > > Differential Revision: <a href="https://reviews.llvm.org/D52739" rel="noreferrer" target="_blank">https://reviews.llvm.org/D52739</a><br>
> > > ><br>
> > > > Added:<br>
> > > ><br>
> > > > llvm/trunk/include/llvm/Transforms/Instrumentation/AddressSanitizerPass<br>
> > > > .h<br>
> > > > Modified:<br>
> > > >     llvm/trunk/include/llvm/InitializePasses.h<br>
> > > >     llvm/trunk/lib/Passes/PassBuilder.cpp<br>
> > > >     llvm/trunk/lib/Passes/PassRegistry.def<br>
> > > >     llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
> > > >     llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp<br>
> > > >     llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll<br>
> > > ><br>
> > > > Modified: llvm/trunk/include/llvm/InitializePasses.h<br>
> > > > URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> > > > project/llvm/trunk/include/llvm/InitializePasses.h?rev=344274&r1=344273<br>
> > > > &r2=344274&view=diff<br>
> > > > =======================================================================<br>
> > > > =======<br>
> > > > --- llvm/trunk/include/llvm/InitializePasses.h (original)<br>
> > > > +++ llvm/trunk/include/llvm/InitializePasses.h Thu Oct 11 11:31:51 2018<br>
> > > > @@ -65,8 +65,8 @@ void initializeAAEvalLegacyPassPass(Pass<br>
> > > >  void initializeAAResultsWrapperPassPass(PassRegistry&);<br>
> > > >  void initializeADCELegacyPassPass(PassRegistry&);<br>
> > > >  void initializeAddDiscriminatorsLegacyPassPass(PassRegistry&);<br>
> > > > -void initializeAddressSanitizerModulePass(PassRegistry&);<br>
> > > > -void initializeAddressSanitizerPass(PassRegistry&);<br>
> > > > +void initializeAddressSanitizerModuleLegacyPassPass(PassRegistry &);<br>
> > > > +void initializeAddressSanitizerLegacyPassPass(PassRegistry &);<br>
> > > >  void initializeAggressiveInstCombinerLegacyPassPass(PassRegistry&);<br>
> > > >  void initializeAliasSetPrinterPass(PassRegistry&);<br>
> > > >  void initializeAlignmentFromAssumptionsPass(PassRegistry&);<br>
> > > ><br>
> > > > Added:<br>
> > > > llvm/trunk/include/llvm/Transforms/Instrumentation/AddressSanitizerPass<br>
> > > > .h<br>
> > > > URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> > > > project/llvm/trunk/include/llvm/Transforms/Instrumentation/AddressSanit<br>
> > > > izerPass.h?rev=344274&view=auto<br>
> > > > =======================================================================<br>
> > > > =======<br>
> > > > ---<br>
> > > > llvm/trunk/include/llvm/Transforms/Instrumentation/AddressSanitizerPass<br>
> > > > .h (added)<br>
> > > > +++<br>
> > > > llvm/trunk/include/llvm/Transforms/Instrumentation/AddressSanitizerPass<br>
> > > > .h Thu Oct 11 11:31:51 2018<br>
> > > > @@ -0,0 +1,41 @@<br>
> > > > +//===--------- Definition of the AddressSanitizer class ---------*-<br>
> > > > C++ -*-===//<br>
> > > > +//<br>
> > > > +//                     The LLVM Compiler Infrastructure<br>
> > > > +//<br>
> > > > +// This file is distributed under the University of Illinois Open<br>
> > > > Source<br>
> > > > +// License. See LICENSE.TXT for details.<br>
> > > > +//<br>
> > > > +//===-----------------------------------------------------------------<br>
> > > > -----===//<br>
> > > > +//<br>
> > > > +// This file declares the AddressSanitizer class which is a port of<br>
> > > > the legacy<br>
> > > > +// AddressSanitizer pass to use the new PassManager infrastructure.<br>
> > > > +//<br>
> > > > +//===-----------------------------------------------------------------<br>
> > > > -----===//<br>
> > > > +#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_ADDRESSSANITIZERPASS_H<br>
> > > > +#define LLVM_TRANSFORMS_INSTRUMENTATION_ADDRESSSANITIZERPASS_H<br>
> > > > +<br>
> > > > +#include "llvm/IR/Function.h"<br>
> > > > +#include "llvm/IR/Module.h"<br>
> > > > +#include "llvm/IR/PassManager.h"<br>
> > > > +<br>
> > > > +namespace llvm {<br>
> > > > +<br>
> > > > +/// Public interface to the address sanitizer pass for instrumenting<br>
> > > > code to<br>
> > > > +/// check for various memory bugs.<br>
> > > > +class AddressSanitizerPass : public<br>
> > > > PassInfoMixin<AddressSanitizerPass> {<br>
> > > > +public:<br>
> > > > +  explicit AddressSanitizerPass(bool CompileKernel = false,<br>
> > > > +                                bool Recover = false,<br>
> > > > +                                bool UseAfterScope = false);<br>
> > > > +  PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);<br>
> > > > +  PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM);<br>
> > > > +<br>
> > > > +private:<br>
> > > > +  bool CompileKernel;<br>
> > > > +  bool Recover;<br>
> > > > +  bool UseAfterScope;<br>
> > > > +};<br>
> > > > +<br>
> > > > +} // namespace llvm<br>
> > > > +<br>
> > > > +#endif<br>
> > > ><br>
> > > > Modified: llvm/trunk/lib/Passes/PassBuilder.cpp<br>
> > > > URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> > > > project/llvm/trunk/lib/Passes/PassBuilder.cpp?rev=344274&r1=344273&r2=3<br>
> > > > 44274&view=diff<br>
> > > > =======================================================================<br>
> > > > =======<br>
> > > > --- llvm/trunk/lib/Passes/PassBuilder.cpp (original)<br>
> > > > +++ llvm/trunk/lib/Passes/PassBuilder.cpp Thu Oct 11 11:31:51 2018<br>
> > > > @@ -61,7 +61,6 @@<br>
> > > >  #include "llvm/Support/Regex.h"<br>
> > > >  #include "llvm/Target/TargetMachine.h"<br>
> > > >  #include<br>
> > > > "llvm/Transforms/AggressiveInstCombine/AggressiveInstCombine.h"<br>
> > > > -#include "llvm/Transforms/Instrumentation/CGProfile.h"<br>
> > > >  #include "llvm/Transforms/IPO/AlwaysInliner.h"<br>
> > > >  #include "llvm/Transforms/IPO/ArgumentPromotion.h"<br>
> > > >  #include "llvm/Transforms/IPO/CalledValuePropagation.h"<br>
> > > > @@ -87,7 +86,9 @@<br>
> > > >  #include "llvm/Transforms/IPO/SyntheticCountsPropagation.h"<br>
> > > >  #include "llvm/Transforms/IPO/WholeProgramDevirt.h"<br>
> > > >  #include "llvm/Transforms/InstCombine/InstCombine.h"<br>
> > > > +#include "llvm/Transforms/Instrumentation/AddressSanitizerPass.h"<br>
> > > >  #include "llvm/Transforms/Instrumentation/BoundsChecking.h"<br>
> > > > +#include "llvm/Transforms/Instrumentation/CGProfile.h"<br>
> > > >  #include "llvm/Transforms/Instrumentation/ControlHeightReduction.h"<br>
> > > >  #include "llvm/Transforms/Instrumentation/GCOVProfiler.h"<br>
> > > >  #include "llvm/Transforms/Instrumentation/InstrProfiling.h"<br>
> > > ><br>
> > > > Modified: llvm/trunk/lib/Passes/PassRegistry.def<br>
> > > > URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> > > > project/llvm/trunk/lib/Passes/PassRegistry.def?rev=344274&r1=344273&r2=<br>
> > > > 344274&view=diff<br>
> > > > =======================================================================<br>
> > > > =======<br>
> > > > --- llvm/trunk/lib/Passes/PassRegistry.def (original)<br>
> > > > +++ llvm/trunk/lib/Passes/PassRegistry.def Thu Oct 11 11:31:51 2018<br>
> > > > @@ -40,6 +40,7 @@ MODULE_ALIAS_ANALYSIS("globals-aa", Glob<br>
> > > >  #define MODULE_PASS(NAME, CREATE_PASS)<br>
> > > >  #endif<br>
> > > >  MODULE_PASS("always-inline", AlwaysInlinerPass())<br>
> > > > +MODULE_PASS("asan", AddressSanitizerPass(false, false, true))<br>
> > > >  MODULE_PASS("called-value-propagation", CalledValuePropagationPass())<br>
> > > >  MODULE_PASS("cg-profile", CGProfilePass())<br>
> > > >  MODULE_PASS("constmerge", ConstantMergePass())<br>
> > > > @@ -147,6 +148,7 @@ FUNCTION_PASS("adce", ADCEPass())<br>
> > > >  FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())<br>
> > > >  FUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())<br>
> > > >  FUNCTION_PASS("alignment-from-assumptions",<br>
> > > > AlignmentFromAssumptionsPass())<br>
> > > > +FUNCTION_PASS("asan", AddressSanitizerPass(false, false, false))<br>
> > > >  FUNCTION_PASS("bdce", BDCEPass())<br>
> > > >  FUNCTION_PASS("bounds-checking", BoundsCheckingPass())<br>
> > > >  FUNCTION_PASS("break-crit-edges", BreakCriticalEdgesPass())<br>
> > > ><br>
> > > > Modified:<br>
> > > > llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
> > > > URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> > > > project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?<br>
> > > > rev=344274&r1=344273&r2=344274&view=diff<br>
> > > > =======================================================================<br>
> > > > =======<br>
> > > > --- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
> > > > (original)<br>
> > > > +++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Thu<br>
> > > > Oct 11 11:31:51 2018<br>
> > > > @@ -25,7 +25,6 @@<br>
> > > >  #include "llvm/ADT/Twine.h"<br>
> > > >  #include "llvm/Analysis/MemoryBuiltins.h"<br>
> > > >  #include "llvm/Analysis/TargetLibraryInfo.h"<br>
> > > > -#include "llvm/Transforms/Utils/Local.h"<br>
> > > >  #include "llvm/Analysis/ValueTracking.h"<br>
> > > >  #include "llvm/BinaryFormat/MachO.h"<br>
> > > >  #include "llvm/IR/Argument.h"<br>
> > > > @@ -70,8 +69,10 @@<br>
> > > >  #include "llvm/Support/ScopedPrinter.h"<br>
> > > >  #include "llvm/Support/raw_ostream.h"<br>
> > > >  #include "llvm/Transforms/Instrumentation.h"<br>
> > > > +#include "llvm/Transforms/Instrumentation/AddressSanitizerPass.h"<br>
> > > >  #include "llvm/Transforms/Utils/ASanStackFrameLayout.h"<br>
> > > >  #include "llvm/Transforms/Utils/BasicBlockUtils.h"<br>
> > > > +#include "llvm/Transforms/Utils/Local.h"<br>
> > > >  #include "llvm/Transforms/Utils/ModuleUtils.h"<br>
> > > >  #include "llvm/Transforms/Utils/PromoteMemToReg.h"<br>
> > > >  #include <algorithm><br>
> > > > @@ -597,26 +598,22 @@ static size_t RedzoneSizeForScale(int Ma<br>
> > > >  namespace {<br>
> > > ><br>
> > > >  /// AddressSanitizer: instrument the code in module to find memory<br>
> > > > bugs.<br>
> > > > -struct AddressSanitizer : public FunctionPass {<br>
> > > > -  // Pass identification, replacement for typeid<br>
> > > > -  static char ID;<br>
> > > > -<br>
> > > > -  explicit AddressSanitizer(bool CompileKernel = false, bool Recover =<br>
> > > > false,<br>
> > > > +struct AddressSanitizer {<br>
> > > > +  explicit AddressSanitizer(Module &M, DominatorTree *DT,<br>
> > > > +                            bool CompileKernel = false, bool Recover =<br>
> > > > false,<br>
> > > >                              bool UseAfterScope = false)<br>
> > > > -      : FunctionPass(ID), UseAfterScope(UseAfterScope ||<br>
> > > > ClUseAfterScope) {<br>
> > > > +      : UseAfterScope(UseAfterScope || ClUseAfterScope), DT(DT) {<br>
> > > >      this->Recover = ClRecover.getNumOccurrences() > 0 ? ClRecover :<br>
> > > > Recover;<br>
> > > >      this->CompileKernel = ClEnableKasan.getNumOccurrences() > 0 ?<br>
> > > >          ClEnableKasan : CompileKernel;<br>
> > > > -    initializeAddressSanitizerPass(*PassRegistry::getPassRegistry());<br>
> > > > -  }<br>
> > > ><br>
> > > > -  StringRef getPassName() const override {<br>
> > > > -    return "AddressSanitizerFunctionPass";<br>
> > > > -  }<br>
> > > > -<br>
> > > > -  void getAnalysisUsage(AnalysisUsage &AU) const override {<br>
> > > > -    AU.addRequired<DominatorTreeWrapperPass>();<br>
> > > > -    AU.addRequired<TargetLibraryInfoWrapperPass>();<br>
> > > > +    // Initialize the private fields. No one has accessed them before.<br>
> > > > +    GlobalsMD.init(M);<br>
> > > > +    C = &(M.getContext());<br>
> > > > +    LongSize = M.getDataLayout().getPointerSizeInBits();<br>
> > > > +    IntptrTy = Type::getIntNTy(*C, LongSize);<br>
> > > > +    TargetTriple = Triple(M.getTargetTriple());<br>
> > > > +    Mapping = getShadowMapping(TargetTriple, LongSize, CompileKernel);<br>
> > > >    }<br>
> > > ><br>
> > > >    uint64_t getAllocaSizeInBytes(const AllocaInst &AI) const {<br>
> > > > @@ -661,12 +658,12 @@ struct AddressSanitizer : public Functio<br>
> > > >                                   Value *SizeArgument, uint32_t Exp);<br>
> > > >    void instrumentMemIntrinsic(MemIntrinsic *MI);<br>
> > > >    Value *memToShadow(Value *Shadow, IRBuilder<> &IRB);<br>
> > > > -  bool runOnFunction(Function &F) override;<br>
> > > >    bool maybeInsertAsanInitAtFunctionEntry(Function &F);<br>
> > > >    void maybeInsertDynamicShadowAtFunctionEntry(Function &F);<br>
> > > >    void markEscapedLocalAllocas(Function &F);<br>
> > > > -  bool doInitialization(Module &M) override;<br>
> > > > -  bool doFinalization(Module &M) override;<br>
> > > > +<br>
> > > > +  /// Return true if the function changed.<br>
> > > > +  bool instrument(Function &F, const TargetLibraryInfo *TLI);<br>
> > > ><br>
> > > >    DominatorTree &getDominatorTree() const { return *DT; }<br>
> > > ><br>
> > > > @@ -724,16 +721,12 @@ private:<br>
> > > >    DenseMap<const AllocaInst *, bool> ProcessedAllocas;<br>
> > > >  };<br>
> > > ><br>
> > > > -class AddressSanitizerModule : public ModulePass {<br>
> > > > +class AddressSanitizerModule {<br>
> > > >  public:<br>
> > > > -  // Pass identification, replacement for typeid<br>
> > > > -  static char ID;<br>
> > > > -<br>
> > > >    explicit AddressSanitizerModule(bool CompileKernel = false,<br>
> > > >                                    bool Recover = false,<br>
> > > >                                    bool UseGlobalsGC = true)<br>
> > > > -      : ModulePass(ID),<br>
> > > > -        UseGlobalsGC(UseGlobalsGC && ClUseGlobalsGC),<br>
> > > > +      : UseGlobalsGC(UseGlobalsGC && ClUseGlobalsGC),<br>
> > > >          // Not a typo: ClWithComdat is almost completely pointless<br>
> > > > without<br>
> > > >          // ClUseGlobalsGC (because then it only works on modules<br>
> > > > without<br>
> > > >          // globals, which are rare); it is a prerequisite for<br>
> > > > ClUseGlobalsGC;<br>
> > > > @@ -742,14 +735,12 @@ public:<br>
> > > >          // ClWithComdat and ClUseGlobalsGC unless the frontend says<br>
> > > > it's ok to<br>
> > > >          // do globals-gc.<br>
> > > >          UseCtorComdat(UseGlobalsGC && ClWithComdat) {<br>
> > > > -          this->Recover = ClRecover.getNumOccurrences() > 0 ?<br>
> > > > -              ClRecover : Recover;<br>
> > > > -          this->CompileKernel = ClEnableKasan.getNumOccurrences() > 0<br>
> > > > ?<br>
> > > > -              ClEnableKasan : CompileKernel;<br>
> > > > -     }<br>
> > > > +    this->Recover = ClRecover.getNumOccurrences() > 0 ? ClRecover :<br>
> > > > Recover;<br>
> > > > +    this->CompileKernel =<br>
> > > > +        ClEnableKasan.getNumOccurrences() > 0 ? ClEnableKasan :<br>
> > > > CompileKernel;<br>
> > > > +  }<br>
> > > ><br>
> > > > -  bool runOnModule(Module &M) override;<br>
> > > > -  StringRef getPassName() const override { return<br>
> > > > "AddressSanitizerModule"; }<br>
> > > > +  bool instrument(Module &M);<br>
> > > ><br>
> > > >  private:<br>
> > > >    void initializeCallbacks(Module &M);<br>
> > > > @@ -1057,18 +1048,100 @@ struct FunctionStackPoisoner : public In<br>
> > > >                       Instruction *ThenTerm, Value *ValueIfFalse);<br>
> > > >  };<br>
> > > ><br>
> > > > +class AddressSanitizerLegacyPass : public FunctionPass {<br>
> > > > +public:<br>
> > > > +  static char ID;<br>
> > > > +<br>
> > > > +  explicit AddressSanitizerLegacyPass(bool CompileKernel = false,<br>
> > > > +                                      bool Recover = false,<br>
> > > > +                                      bool UseAfterScope = false)<br>
> > > > +      : FunctionPass(ID), CompileKernel(CompileKernel),<br>
> > > > Recover(Recover),<br>
> > > > +        UseAfterScope(UseAfterScope) {}<br>
> > > > +<br>
> > > > +  StringRef getPassName() const override {<br>
> > > > +    return "AddressSanitizerFunctionPass";<br>
> > > > +  }<br>
> > > > +<br>
> > > > +  void getAnalysisUsage(AnalysisUsage &AU) const override {<br>
> > > > +    AU.addRequired<DominatorTreeWrapperPass>();<br>
> > > > +    AU.addRequired<TargetLibraryInfoWrapperPass>();<br>
> > > > +  }<br>
> > > > +<br>
> > > > +  bool runOnFunction(Function &F) override {<br>
> > > > +    DominatorTree *DTree =<br>
> > > > +        &getAnalysis<DominatorTreeWrapperPass>().getDomTree();<br>
> > > > +    const TargetLibraryInfo *TLI =<br>
> > > > +        &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();<br>
> > > > +    AddressSanitizer Sanitizer(*F.getParent(), DTree, CompileKernel,<br>
> > > > Recover,<br>
> > > > +                               UseAfterScope);<br>
> > > > +    return Sanitizer.instrument(F, TLI);<br>
> > > > +  }<br>
> > > > +<br>
> > > > +private:<br>
> > > > +  bool CompileKernel;<br>
> > > > +  bool Recover;<br>
> > > > +  bool UseAfterScope;<br>
> > > > +};<br>
> > > > +<br>
> > > > +class AddressSanitizerModuleLegacyPass : public ModulePass {<br>
> > > > +public:<br>
> > > > +  static char ID;<br>
> > > > +<br>
> > > > +  explicit AddressSanitizerModuleLegacyPass(bool CompileKernel =<br>
> > > > false,<br>
> > > > +                                            bool Recover = false,<br>
> > > > +                                            bool UseAfterScope = true)<br>
> > > > +      : ModulePass(ID), CompileKernel(CompileKernel),<br>
> > > > Recover(Recover),<br>
> > > > +        UseAfterScope(UseAfterScope) {}<br>
> > > > +<br>
> > > > +  StringRef getPassName() const override { return<br>
> > > > "AddressSanitizerModule"; }<br>
> > > > +<br>
> > > > +  bool runOnModule(Module &M) override {<br>
> > > > +    AddressSanitizerModule Sanitizer(CompileKernel, Recover,<br>
> > > > UseAfterScope);<br>
> > > > +    return Sanitizer.instrument(M);<br>
> > > > +  }<br>
> > > > +<br>
> > > > +private:<br>
> > > > +  bool CompileKernel;<br>
> > > > +  bool Recover;<br>
> > > > +  bool UseAfterScope;<br>
> > > > +};<br>
> > > > +<br>
> > > >  } // end anonymous namespace<br>
> > > ><br>
> > > > -char AddressSanitizer::ID = 0;<br>
> > > > +AddressSanitizerPass::AddressSanitizerPass(bool CompileKernel, bool<br>
> > > > Recover,<br>
> > > > +                                           bool UseAfterScope)<br>
> > > > +    : CompileKernel(CompileKernel), Recover(Recover),<br>
> > > > +      UseAfterScope(UseAfterScope) {}<br>
> > > > +<br>
> > > > +PreservedAnalyses AddressSanitizerPass::run(Function &F,<br>
> > > > +                                            AnalysisManager<Function><br>
> > > > &AM) {<br>
> > > > +  DominatorTree *DT = &AM.getResult<DominatorTreeAnalysis>(F);<br>
> > > > +  const TargetLibraryInfo *TLI =<br>
> > > > &AM.getResult<TargetLibraryAnalysis>(F);<br>
> > > > +  AddressSanitizer Sanitizer(*F.getParent(), DT, CompileKernel,<br>
> > > > Recover,<br>
> > > > +                             UseAfterScope);<br>
> > > > +  if (Sanitizer.instrument(F, TLI))<br>
> > > > +    return PreservedAnalyses::none();<br>
> > > > +  return PreservedAnalyses::all();<br>
> > > > +}<br>
> > > > +<br>
> > > > +PreservedAnalyses AddressSanitizerPass::run(Module &M,<br>
> > > > +                                            AnalysisManager<Module><br>
> > > > &AM) {<br>
> > > > +  AddressSanitizerModule Sanitizer(CompileKernel, Recover,<br>
> > > > UseAfterScope);<br>
> > > > +  if (Sanitizer.instrument(M))<br>
> > > > +    return PreservedAnalyses::none();<br>
> > > > +  return PreservedAnalyses::all();<br>
> > > > +}<br>
> > > > +<br>
> > > > +char AddressSanitizerLegacyPass::ID = 0;<br>
> > > ><br>
> > > >  INITIALIZE_PASS_BEGIN(<br>
> > > > -    AddressSanitizer, "asan",<br>
> > > > +    AddressSanitizerLegacyPass, "asan",<br>
> > > >      "AddressSanitizer: detects use-after-free and out-of-bounds<br>
> > > > bugs.", false,<br>
> > > >      false)<br>
> > > >  INITIALIZE_PASS_DEPENDENCY(DominatorTreeWrapperPass)<br>
> > > >  INITIALIZE_PASS_DEPENDENCY(TargetLibraryInfoWrapperPass)<br>
> > > >  INITIALIZE_PASS_END(<br>
> > > > -    AddressSanitizer, "asan",<br>
> > > > +    AddressSanitizerLegacyPass, "asan",<br>
> > > >      "AddressSanitizer: detects use-after-free and out-of-bounds<br>
> > > > bugs.", false,<br>
> > > >      false)<br>
> > > ><br>
> > > > @@ -1076,13 +1149,13 @@ FunctionPass *llvm::createAddressSanitiz<br>
> > > >                                                         bool Recover,<br>
> > > >                                                         bool<br>
> > > > UseAfterScope) {<br>
> > > >    assert(!CompileKernel || Recover);<br>
> > > > -  return new AddressSanitizer(CompileKernel, Recover, UseAfterScope);<br>
> > > > +  return new AddressSanitizerLegacyPass(CompileKernel, Recover,<br>
> > > > UseAfterScope);<br>
> > > >  }<br>
> > > ><br>
> > > > -char AddressSanitizerModule::ID = 0;<br>
> > > > +char AddressSanitizerModuleLegacyPass::ID = 0;<br>
> > > ><br>
> > > >  INITIALIZE_PASS(<br>
> > > > -    AddressSanitizerModule, "asan-module",<br>
> > > > +    AddressSanitizerModuleLegacyPass, "asan-module",<br>
> > > >      "AddressSanitizer: detects use-after-free and out-of-bounds bugs."<br>
> > > >      "ModulePass",<br>
> > > >      false, false)<br>
> > > > @@ -1091,7 +1164,8 @@ ModulePass *llvm::createAddressSanitizer<br>
> > > >                                                     bool Recover,<br>
> > > >                                                     bool UseGlobalsGC)<br>
> > > > {<br>
> > > >    assert(!CompileKernel || Recover);<br>
> > > > -  return new AddressSanitizerModule(CompileKernel, Recover,<br>
> > > > UseGlobalsGC);<br>
> > > > +  return new AddressSanitizerModuleLegacyPass(CompileKernel, Recover,<br>
> > > > +                                              UseGlobalsGC);<br>
> > > >  }<br>
> > > ><br>
> > > >  static size_t TypeSizeToSizeIndex(uint32_t TypeSize) {<br>
> > > > @@ -2268,7 +2342,7 @@ int AddressSanitizerModule::GetAsanVersi<br>
> > > >    return Version;<br>
> > > >  }<br>
> > > ><br>
> > > > -bool AddressSanitizerModule::runOnModule(Module &M) {<br>
> > > > +bool AddressSanitizerModule::instrument(Module &M) {<br>
> > > >    C = &(M.getContext());<br>
> > > >    int LongSize = M.getDataLayout().getPointerSizeInBits();<br>
> > > >    IntptrTy = Type::getIntNTy(*C, LongSize);<br>
> > > > @@ -2387,25 +2461,6 @@ void AddressSanitizer::initializeCallbac<br>
> > > ><br>
> > > > ArrayType::get(IRB.getInt8Ty(), 0));<br>
> > > >  }<br>
> > > ><br>
> > > > -// virtual<br>
> > > > -bool AddressSanitizer::doInitialization(Module &M) {<br>
> > > > -  // Initialize the private fields. No one has accessed them before.<br>
> > > > -  GlobalsMD.init(M);<br>
> > > > -<br>
> > > > -  C = &(M.getContext());<br>
> > > > -  LongSize = M.getDataLayout().getPointerSizeInBits();<br>
> > > > -  IntptrTy = Type::getIntNTy(*C, LongSize);<br>
> > > > -  TargetTriple = Triple(M.getTargetTriple());<br>
> > > > -<br>
> > > > -  Mapping = getShadowMapping(TargetTriple, LongSize, CompileKernel);<br>
> > > > -  return true;<br>
> > > > -}<br>
> > > > -<br>
> > > > -bool AddressSanitizer::doFinalization(Module &M) {<br>
> > > > -  GlobalsMD.reset();<br>
> > > > -  return false;<br>
> > > > -}<br>
> > > > -<br>
> > > >  bool AddressSanitizer::maybeInsertAsanInitAtFunctionEntry(Function &F)<br>
> > > > {<br>
> > > >    // For each NSObject descendant having a +load method, this method<br>
> > > > is invoked<br>
> > > >    // by the ObjC runtime before any of the static constructors is<br>
> > > > called.<br>
> > > > @@ -2479,7 +2534,7 @@ void AddressSanitizer::markEscapedLocalA<br>
> > > >    }<br>
> > > >  }<br>
> > > ><br>
> > > > -bool AddressSanitizer::runOnFunction(Function &F) {<br>
> > > > +bool AddressSanitizer::instrument(Function &F, const TargetLibraryInfo<br>
> > > > *TLI) {<br>
> > > >    if (F.getLinkage() == GlobalValue::AvailableExternallyLinkage)<br>
> > > > return false;<br>
> > > >    if (!ClDebugFunc.empty() && ClDebugFunc == F.getName()) return<br>
> > > > false;<br>
> > > >    if (F.getName().startswith("__asan_")) return false;<br>
> > > > @@ -2498,7 +2553,6 @@ bool AddressSanitizer::runOnFunction(Fun<br>
> > > >    LLVM_DEBUG(dbgs() << "ASAN instrumenting:\n" << F << "\n");<br>
> > > ><br>
> > > >    initializeCallbacks(*F.getParent());<br>
> > > > -  DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();<br>
> > > ><br>
> > > >    FunctionStateRAII CleanupObj(this);<br>
> > > ><br>
> > > > @@ -2519,8 +2573,6 @@ bool AddressSanitizer::runOnFunction(Fun<br>
> > > >    bool IsWrite;<br>
> > > >    unsigned Alignment;<br>
> > > >    uint64_t TypeSize;<br>
> > > > -  const TargetLibraryInfo *TLI =<br>
> > > > -      &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();<br>
> > > ><br>
> > > >    // Fill the set of memory operations to instrument.<br>
> > > >    for (auto &BB : F) {<br>
> > > ><br>
> > > > Modified: llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp<br>
> > > > URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> > > > project/llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp?r<br>
> > > > ev=344274&r1=344273&r2=344274&view=diff<br>
> > > > =======================================================================<br>
> > > > =======<br>
> > > > --- llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp<br>
> > > > (original)<br>
> > > > +++ llvm/trunk/lib/Transforms/Instrumentation/Instrumentation.cpp Thu<br>
> > > > Oct 11 11:31:51 2018<br>
> > > > @@ -56,8 +56,8 @@ BasicBlock::iterator llvm::PrepareToSpli<br>
> > > >  /// initializeInstrumentation - Initialize all passes in the<br>
> > > > TransformUtils<br>
> > > >  /// library.<br>
> > > >  void llvm::initializeInstrumentation(PassRegistry &Registry) {<br>
> > > > -  initializeAddressSanitizerPass(Registry);<br>
> > > > -  initializeAddressSanitizerModulePass(Registry);<br>
> > > > +  initializeAddressSanitizerLegacyPassPass(Registry);<br>
> > > > +  initializeAddressSanitizerModuleLegacyPassPass(Registry);<br>
> > > >    initializeBoundsCheckingLegacyPassPass(Registry);<br>
> > > >    initializeControlHeightReductionLegacyPassPass(Registry);<br>
> > > >    initializeGCOVProfilerLegacyPassPass(Registry);<br>
> > > ><br>
> > > > Modified: llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll<br>
> > > > URL: <a href="http://llvm.org/viewvc/llvm-" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-</a><br>
> > > > project/llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll?rev=3<br>
> > > > 44274&r1=344273&r2=344274&view=diff<br>
> > > > =======================================================================<br>
> > > > =======<br>
> > > > --- llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll<br>
> > > > (original)<br>
> > > > +++ llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll Thu Oct<br>
> > > > 11 11:31:51 2018<br>
> > > > @@ -1,7 +1,9 @@<br>
> > > >  ; Test basic address sanitizer instrumentation.<br>
> > > >  ;<br>
> > > >  ; RUN: opt < %s -asan -asan-module -S | FileCheck --check-<br>
> > > > prefixes=CHECK,CHECK-S3 %s<br>
> > > > +; RUN: opt < %s -passes='function(asan),module(asan)' -S | FileCheck -<br>
> > > > -check-prefixes=CHECK,CHECK-S3 %s<br>
> > > >  ; RUN: opt < %s -asan -asan-module -asan-mapping-scale=5 -S |<br>
> > > > FileCheck --check-prefixes=CHECK,CHECK-S5 %s<br>
> > > > +; RUN: opt < %s -passes='function(asan),module(asan)' -asan-mapping-<br>
> > > > scale=5 -S | FileCheck --check-prefixes=CHECK,CHECK-S5 %s<br>
> > > ><br>
> > > >  target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-<br>
> > > > i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-<br>
> > > > f80:128:128-n8:16:32:64"<br>
> > > >  target triple = "x86_64-unknown-linux-gnu"<br>
> > > ><br>
> > > ><br>
> > > > _______________________________________________<br>
> > > > llvm-commits mailing list<br>
> > > > <a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
> > > > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div></div>