[PATCH] D52739: [PassManager/Sanitizer] Port of AddresSanitizer pass from legacy to new PassManager
Philip Pfaffe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 8 15:06:12 PDT 2018
philip.pfaffe added a comment.
In https://reviews.llvm.org/D52739#1258171, @leonardchan wrote:
> This I'm not sure of since it seems that they both do different things that work independently of each other, though I can't find an example/test where they are used on their own.
I meant just merging the //passes//. In the sense that you have one pass class with one module run() method and one function run() method. The question then is whether you'll ever want to use different options for the different IRUnits.
================
Comment at: lib/Transforms/Instrumentation/AddressSanitizer.cpp:2538
+ const TargetLibraryInfo *TLI) {
+ if (!Inited) {
+ // Initialize the private fields. No one has accessed them before.
----------------
leonardchan wrote:
> philip.pfaffe wrote:
> > Instead of doing this kind of lazy initialization, just do it in the constructor.
> This initialization requires access to the Module that this pass runs over but I don't think I have access to that in the constructor.
Yes you do. You're now constructing one instance of this per pass run, you can just pass along the module there.
Repository:
rL LLVM
https://reviews.llvm.org/D52739
More information about the llvm-commits
mailing list