Displaying 20 results from an estimated 9000 matches similar to: "Porting Pass to New PassManager"
2018 Sep 25
2
Porting Pass to New PassManager
Hi Leonard, Fedor,
while it's true that RegisterPass is not applicable for new-pm passes,
PassRegistry.def is not the whole story. Passes in PassRegistry are
available for the opt tool. The sanitizers are passes that usually get
added to the pipeline by the frontend. There, you need to use PassBuilder's
callbacks mechanism to hook the sanitizer into the optimizer.
Assuming you're
2018 Sep 25
2
Porting Pass to New PassManager
Frontends _are_ using PassBuilder, but they need to hook into the default
pipeline creation to insert the sanitizer passes.
On Tue, Sep 25, 2018 at 12:15 PM Fedor Sergeev <fedor.sergeev at azul.com>
wrote:
> Hmm... frontends should be using PassBuilder anyway.
> And if they are using PassBuilder then they are using PassRegistry.def as
> well - all the
>
2018 Sep 27
2
Porting Pass to New PassManager
>
> `opt < %s -passed='asan' -asan-module -S`
>
asan-module is another ModulePass, not a commandline option. You can't mix
that like this.
Cheers,
Philip
> doesn't produce the same IR as
>
> `opt < %s -asan -asan-module -S`
>
> More specifically, the only thing missing seems to be the
> `asan.module_ctor` that should get added to the global
2018 Sep 28
3
Porting Pass to New PassManager
Is there a reason for why `-asan` and `-asan-module` can be mixed but
Function passes and Module passes with the new PM can't be mixed?
- Leo
On Thu, Sep 27, 2018 at 3:21 AM Fedor Sergeev <fedor.sergeev at azul.com> wrote:
>
> On 09/27/2018 12:25 PM, Philip Pfaffe wrote:
>>
>> `opt < %s -passed='asan' -asan-module -S`
>
> asan-module is another
2018 Oct 01
2
OptBisect implementation for new pass manager
On 10/01/2018 08:39 PM, David Greene wrote:
> "Kaylor, Andrew" <andrew.kaylor at intel.com> writes:
>
>> What if in the registration interface we had three options: skippable,
>> not skippable, and run at OptLevel::None.
> I kind of like this idea. If necessary, the pass could even query the
> target (or some other entity) about what OptLevel::None means.
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
I'm confused by your code. StaticInitializer seems to exist so you can
create InitializeEverything, which doesn't get used.
Do I need to do something along the lines of:
static void registerPollyPasses(const llvm::PassManagerBuilder &Builder,
llvm::PassManagerBase &PM) {
PM.add(llvm::createPromoteMemoryToRegisterPass());
2020 Jan 24
3
Module::createRNG() and new PassManager
Correct me if I'm wrong, but is Module::CreateRNG(Pass *) unusable with
the new PassManager? Since each pass is defined as a
llvm::PassInfoMixIn<DerivedT> instead of inheriting from llvm::Pass, it
doesn't seem possible to obtain the underlying llvm::Pass * from e.g.
llvm::ModuleAnalysisManager. Would it make sense to change the
definition/implementation to Module::CreateRNG(StringRef
2013 Mar 15
2
[LLVMdev] write a simple MachineFunctionPass
Hello everyone,
I have written several complex passes till now, but I cannot write a
MachineFunctionPass pass. It just gives me segfault. Hence I reduced the
pass to the following form :
using namespace llvm;
namespace {
class CFGexplorator : public MachineFunctionPass {
public:
static char ID; // Pass identification, replacement for typeid
CFGexplorator() : MachineFunctionPass(ID)
2016 Mar 24
2
Help with pass manager
So we come back to my earlier comment: can you produce a one-file, < 100 lines that reproduce the issue?
--
Mehdi
> On Mar 24, 2016, at 10:16 AM, Lorenzo Laneve <lore97drk at icloud.com> wrote:
>
> Those lines of code are in a function that is called before calling the moduleToObjectFile() function
>
> On Mar 24, 2016, at 6:07 PM, Mehdi Amini <mehdi.amini at
2014 Jun 01
3
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
+cc original authors of these changes.
Is PassRegistry intended to be thread-safe? The header file explicitly
says that PassRegistry is not thread-safe, but there are mutexes and
locking used in the code. This is actually creating a problem, because of
a subtle bug involving static initialization order and shutdown.
In particular, the RegisterPass<> static template will get invoked
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
I actually had an idea about how to fix this in a relatively painless
manner. Although given my experience over the past 4 days, it might not be
best to call it painless without first trying :)
The idea is to make a StaticPassRegistry. RegisterPass<> only touches the
StaticPassRegistry, and nothing else touches the StaticPassRegistry. So
once you enter main(), StaticPassRegistry can be
2011 May 03
4
[LLVMdev] 2.9 segfault when requesting for both LoopInfo and DominatorTree analyses.
When migrating my project to 2.9, I've encountered a strange segfault
where if a ModulePass's getAnalysisUsage adds LoopInfo and
DominatorTree, then llvm::PMTopLevelManager::findAnalysisUsage will
segfault. What's odd is that if I rearrange this (add required for
DominatorTree before LoopInfo), it does not segfault. I realize that
LoopInfo requires and preserves DominatorTree, but this
2016 Mar 24
0
Help with pass manager
The problems happens because PMTopLevelManager::findAnalysisPassInfo(AnalysisID AID) returns nullptr in PMTopLevelManager::addImmutablePass(ImmutablePass *P).
This because PassRegistry::getPassRegistry()->getPassInfo(AID) call in it returns nullptr as well.
Should I probably register the pass I want to add with PassRegistry::registerPass(const PassInfo &PI, bool ShouldFree) ?
I didn’t do it
2016 Mar 30
1
Help with pass manager
Passes all need to be initialized before they are added into a pass manager.
Are you calling TargetLibraryInfoWrapperPass::initializePass anywhere?
-Chris
> On Mar 24, 2016, at 10:41 AM, Lorenzo Laneve via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> The problems happens because PMTopLevelManager::findAnalysisPassInfo(AnalysisID AID) returns nullptr in
2014 Jun 02
2
[LLVMdev] PassRegistry thread safety and ManagedStatic interaction
The mutex could be made an actual global static instead of a ManagedStatic.
This guarantees it would be constructed before main, and live until the
end of main. So even in PassRegistry's destructor, which would get call
during llvm_shutdown(), it would always have the same mutex. Ideally I'd
like to just delete the mutex, as it doesn't seem like anyone is using it
in a
2011 Nov 08
0
[LLVMdev] loadable passes with dependencies?
On 11/08/2011 03:40 PM, ret val wrote:
> I'm confused by your code. StaticInitializer seems to exist so you can
> create InitializeEverything, which doesn't get used.
>
> Do I need to do something along the lines of:
> static void registerPollyPasses(const llvm::PassManagerBuilder&Builder,
>
2013 Mar 15
0
[LLVMdev] write a simple MachineFunctionPass
I found that : "Code generator passes are registered and initialized
specially by TargetMachine::addPassesToEmitFile and similar routines, so
they cannot generally be run from the *opt* or *bugpoint* commands."...So
how I can run a MachineFunctionPass? In the end, I just want to apply a DFS
on a CFG of a function. And I need oriented edges and wanted to use
2019 Dec 12
3
Adding custom callback function before/after passes
Hello Fedor.
Thank you for the information.
I made a simple patch that exposes PassInstrumentationCallback so
llvmGetPassPluginInfo can use it: https://reviews.llvm.org/D71086 . Would
this change make sense?
Thanks,
Juneyoung Lee
On Thu, Dec 12, 2019 at 12:44 AM Fedor Sergeev <fedor.sergeev at azul.com>
wrote:
>
>
> On 12/3/19 8:01 PM, Juneyoung Lee via llvm-dev wrote:
>
>
2018 Sep 02
2
possible inconsistency in PassManagerInternal.h
Hello,
(fairly new around here, apologies if the question has an obvious answer)
I've been studying the structure of the new PassManager in the hopes of using it soon. After watching a couple of talks (Chandler / Sergeev), I decided to start with the Concept/Model classes in PassManagerInternal.h
While I could make sense of almost everything there, two details caught my attention:
1- The
2013 Jun 22
2
[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
I write my pass in a mix way of NVPTXAllocaHoisting, NVPTXSplitBBatBar and
transforms/Hello.
The following is part of the codes:
in NVPTXTargetMachine.cpp
bool NVPTXPassConfig::addPreEmitPass()
{
addPass(createTest());
return false;
}
in NVPTXTest.h
namespace llvm{