similar to: Adding PassInfo to PassRegistry

Displaying 20 results from an estimated 40000 matches similar to: "Adding PassInfo to PassRegistry"

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
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 24
0
Help with pass manager
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 apple.com> wrote: > > You may want to try adding this code (copy/pasted from llc.cpp): > > // Initialize targets first, so that --version shows registered targets. > InitializeAllTargets(); >
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
2016 Mar 24
2
Help with pass manager
You may want to try adding this code (copy/pasted from llc.cpp): // Initialize targets first, so that --version shows registered targets. InitializeAllTargets(); InitializeAllTargetMCs(); InitializeAllAsmPrinters(); InitializeAllAsmParsers(); // Initialize codegen and IR passes used by llc so that the -print-after, // -print-before, and -stop-after options work. PassRegistry
2016 Mar 24
0
Help with pass manager
Update: Sorry my bad. I built llvm and tried it with debugging version. It was an assertion (IR/LegacyPassManager.cpp:764) saying that it expects all immutable passes to be initialized. > On Mar 24, 2016, at 2:00 AM, Lorenzo Laneve <lore97drk at icloud.com> wrote: > > I’m using LLVM 3.8.0, and no, it’s the precompiled version > That’s why it doesn’t give me enough info for
2016 Mar 24
2
Help with pass manager
I’m using LLVM 3.8.0, and no, it’s the precompiled version That’s why it doesn’t give me enough info for debug > On 24 Mar 2016, at 1:53 AM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > This code path is not likely to crash usually. Did you build LLVM yourself? Which version are you using and can you reduce the test case to be "minimal" so that someone can
2016 Mar 24
0
Help with pass manager
> On Mar 23, 2016, at 5:41 PM, Lorenzo Laneve <lore97drk at icloud.com> wrote: > > The stack trace: > llvm::PMTopLevelManager::addImmutablePass(llvm::ImmutablePass*) > llvm::PMTopLevelManager::schedulePass(llvm::Pass*) > moduleToObjectFile(llvm::Module*,std::string&,llvm::LLVMContext&) Without mapping to line numbers this is not very helpful: moduleToObjectFile
2016 Mar 24
0
Help with pass manager
This code path is not likely to crash usually. Did you build LLVM yourself? Which version are you using and can you reduce the test case to be "minimal" so that someone can reproduce? (for instance you don't need a module to create a pass manager) -- Mehdi > On Mar 23, 2016, at 5:50 PM, Lorenzo Laneve <lore97drk at icloud.com> wrote: > > Sorry, that's a pure
2016 Mar 24
2
Help with pass manager
The stack trace: llvm::PMTopLevelManager::addImmutablePass(llvm::ImmutablePass*) llvm::PMTopLevelManager::schedulePass(llvm::Pass*) moduleToObjectFile(llvm::Module*,std::string&,llvm::LLVMContext&) Sometimes it doesn't crash because TargetRegistry::lookupTarget() returns an error which says it doesn't support the current target > On Mar 24, 2016, at 1:14 AM, Mehdi Amini
2016 Mar 24
2
Help with pass manager
Sorry, that's a pure crash I think, assertions are not triggered. Xcode doesn’t map those 2 functions to line numbers because they’re in precompiled libraries On Mar 24, 2016, at 1:44 AM, Mehdi Amini <mehdi.amini at apple.com <mailto:mehdi.amini at apple.com>> wrote: > >> On Mar 23, 2016, at 5:41 PM, Lorenzo Laneve <lore97drk at icloud.com <mailto:lore97drk at
2016 Mar 24
0
Help with pass manager
Assuming you are talking about this line: passmanager.add(tliwp); I don't see anything obviously wrong. Are you hitting an assertion or a pure crash? (if LLVM not built with assertions, please rebuild). What does your debugger gives you as a stracktrace? -- Mehdi > On Mar 23, 2016, at 3:44 PM, Lorenzo Laneve via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Sorry in
2016 Mar 23
2
Help with pass manager
Sorry in advance for the stupid question, i still don’t understand some concepts like passes. I took a piece of code from llc, and I used it to write a function that creates an object (or assembly) file from an IR module. It compiles without any problems. But program crashes when it reaches add() method of the pass manager. Can you help me figuring out what’s the problem please? here is my
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
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())) );
2013 Dec 03
0
[LLVMdev] Segmentation fault when traverse call graph
I recall having a similar problem while coding my own special-purpose "opt". My guess: try adding the following lines before your pass is inserted into the PassManager: PassRegistry &Registry = *PassRegistry::getPassRegistry(); initializeIPA(Registry); You might require other library initializations. Have a look at the "opt" source code. On 02/12/13 10:36,
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>()
2011 Dec 06
0
[LLVMdev] Assertion `PI && "Expected required passes to be initialized"' failed for AliasAnalysis.
Hi Alexander, I had the same error: sincos: /home/marcusmae/rpmbuild/BUILD/llvm/lib/VMCore/PassManager.cpp:635: void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI && "Expected required passes to be initialized"' failed. The solution was to add: PassRegistry &Registry = *PassRegistry::getPassRegistry(); initializeCore(Registry);
2012 Oct 23
0
[LLVMdev] Error building llvm on AIX 7.1
I was able to process further by making some code changes and replacing export-dynamic with -bexpfull in Makefile.config. Now, i am getting following error while linking .. llvm[3]: Linking Release+Asserts Loadable Module LLVMHello.so ld: 0706-027 The -R $ORIGIN flag is ignored. ld: 0711-317 ERROR: Undefined symbol: llvm::Pass::getPassName() const ld: 0711-317 ERROR: Undefined symbol: