search for: passregistri

Displaying 20 results from an estimated 177 matches for "passregistri".

Did you mean: passregistry
2015 Feb 24
2
[LLVMdev] Removing contention in PassRegistry accesses to speed up compiles
Hi, We use LLVM libraries to compile C++ code and noticed slow downs when multiple threads of a process were compiling at once. *perf *indicated that most of the CPU time was spent in a spin lock, which was being locked/unlocked from llvm::PassRegistry::getPassInfo(). We read the relevant LLVM code and found out that PassRegistry is a ManagedStatic and is shared among all threads in case of a
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
2015 Feb 26
0
[LLVMdev] Removing contention in PassRegistry accesses to speed up compiles
We have root caused the segfault - it was due to a caching layer we have in our code, which is to avoid duplicate compilations. Basically, llvm::JIT::getPointerToFunction() looks up PassRegistry, but as our change introduces a separate PassRegistry for each thread, this means that the thread that calls llvm::JIT::getPointerToFunction() should have appropriate PassRegistry setup. In our setup, some
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
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
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 24
3
Porting Pass to New PassManager
Hi all, I'm attempting to move the AddressSanitizer pass from the legacy PassManager to the new one because the new one has various benefits over legacy and wanted to clarify on something. Does creating the static RegisterPass struct register the pass with the new PassManager? It seems that RegisterPass does the same things that the INITIALIZE_PASS_* macros do but it registers the pass with
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, >
2011 Nov 08
2
[LLVMdev] loadable passes with dependencies?
Sorry to keep dragging this out on you. Im now getting: Assertion failed: (ResultPass && "getAnalysis*() called on an analysis that was not " "'required' by pass!"), function getAnalysisID But I already have: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<DominatorTree>(); } And changed the bottom of my pass too: char Hello::ID =
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());
2012 Jan 30
0
[LLVMdev] initializeNAMEPass(llvm::PassRegistry&) should have been declared inside 'llvm'
Hey all, So I've been working to fix a problem I had wherein I could not properly initialize AliasAnalysis profiling information. In order to fix it, I've had to rewrite how my pass operates, such that it contains this in the FunctionPass declaration; RelRecovery() : FunctionPass(ID) { llvm::initializeRelRecoveryPass(*PassRegistry::getPassRegistry()); } and contains these
2012 Jan 13
2
[LLVMdev] Memory leaks in LLVM on linux
I am trying to figure out how to free up some memory that seems to be lost when running valgrind under our internal application. The stack traces I get are: ==19966== 4 bytes in 1 blocks are still reachable in loss record 1 of 12 ==19966== at 0x402569A: operator new(unsigned int) (vg_replace_malloc.c:255) ==19966== by 0x5D9BBE8: void* llvm::object_creator<llvm::PassRegistry>()
2016 Mar 24
0
Adding PassInfo to PassRegistry
How do i create PassInfo for a Pass and then register it on the PassRegistry? I need to add TargetLibraryInfoWrapperPass to the registry, because addImmutablePass() function asserts because it doesn't find Info for the pass.
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
2016 Feb 19
3
target triple in 3.8
I added your suggestion and am using this now llvm::legacy::FunctionPassManager *functionPassManager = new llvm::legacy::FunctionPassManager(Mod); llvm::PassRegistry &registry = *llvm::PassRegistry::getPassRegistry(); initializeScalarOpts(registry); functionPassManager->add( new llvm::TargetLibraryInfoWrapperPass(llvm::TargetLibraryInfoImpl(targetMachine->getTargetTriple())) );
2015 Jun 04
5
[LLVMdev] Removing AvailableExternal values in GlobalDCE (was Re: RFC: ThinLTO Impementation Plan)
On Thu, Jun 4, 2015 at 3:58 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote: > > > Personally, I think the right approach is to add a bool to > createGlobalDCEPass defaulting to true named something like > IsAfterInlining. In most standard pass pipelines, GlobalDCE runs after > inlining for obvious reasons, so the default makes sense. The special case > is
2016 Apr 16
2
[TSAN] LLVM statistics and pass initialization trigger race detection
Hello, I trying TSAN on Darwin on LLVM itself (sanitizing multi-threaded ThinLTO link). However I see two main issues on my debug build: 1) Statistics: the pre/post increment is not safe, it seems to be acknowledge in the code itself: // FIXME: This function and all those that follow carefully use an // atomic operation to update the value safely in the presence of // concurrent
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
2011 Jan 18
1
[LLVMdev] adding a codegen pass into llvm
Thanks for your last reply. Could I understand the way to adding a pass (built into the llvm rather than dynamic loadable) includes: 1. Declaring a creator function for this pass 2. Implementing the creator function for this pass 3. Instantiating this pass and get a object of it 3. Register this pass into the PassRegistry Then, for a built-into bytecode pass, task 1(declaration of the