search for: loaderpass

Displaying 9 results from an estimated 9 matches for "loaderpass".

2009 Jun 04
1
[LLVMdev] Get Analysis from PassManager
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I try to write a tool that uses the PassManager to load profiling information for a module like this: ... ModulePass *LoaderPass = createProfileLoaderPass(); PassMgr.add(LoaderPass); PassMgr.run(*M); ... I can verify that the pass was run, but how to I get to the ProfileInfo implemented by that pass? I tried ... ProfileInfo PI = LoaderPass->getAnalysis<ProfileInfo>(); ... but this does not seem to return t...
2005 Mar 17
2
[LLVMdev] Loading ProfileInfo
...can generate the CFGs using 'analyze', but I am having trouble loading the profile data. I added the line AU.addRequired<ProfileInfo>(); to the getAnalysisUsage. It is returning zero for all the edge counts. In llvm/Analysis/ProfileInfo.h, I noticed a prototype: Pass *createProfileLoaderPass(const std::string &Filename); The ProfileInfoLoaderPass does not appear in the list of analyses, presumably because it is registered as an "Opt". Do I need to explicitly request a LoaderPass in addition to ProfileInfo? What is the right way to do this? Thanks.
2009 Sep 10
2
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
Shuguang Feng wrote: >> What does "llc -debug-pass=Structure" say? Is the ProfileLoaderPass >> really the last pass to touch the ProfileInfo before you are using it? > > Below is the sequence of passes that I see. Although the > NoProfileInfo pass is being run, it should be subsequently overridden > by ProfileInfoLoaderPass (LoaderPass) correct? Yes. > Target Data...
2009 Sep 10
0
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
> It *is* allowed to access ModulePass analysis information from an > FunctionPass? BasicBlockPlacement (a FunctionPass) also accesses the profile information and I assumed it worked (but haven't independently verified this). > Can you try to manually override the PI value in the > MyCodeGenPass::runOnMachineFunction() to the value seen in llc and then > access the
2005 Mar 17
0
[LLVMdev] Loading ProfileInfo
...'analyze', but I am having trouble > loading the profile data. I added the line > AU.addRequired<ProfileInfo>(); to the getAnalysisUsage. It is > returning zero for all the edge counts. > > In llvm/Analysis/ProfileInfo.h, I noticed a prototype: > Pass *createProfileLoaderPass(const std::string &Filename); > > The ProfileInfoLoaderPass does not appear in the list of analyses, > presumably because it is registered as an "Opt". Do I need to > explicitly request a LoaderPass in addition to ProfileInfo? What is > the right way to do this? Run...
2009 Sep 10
0
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
> What does "llc -debug-pass=Structure" say? Is the ProfileLoaderPass > really the last pass to touch the ProfileInfo before you are using it? Below is the sequence of passes that I see. Although the NoProfileInfo pass is being run, it should be subsequently overridden by ProfileInfoLoaderPass (LoaderPass) correct? Target Data Layout Create Garbage Collector Mo...
2009 Sep 10
1
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
...ion pass. I access the profiling > information at each MachineBasicBlock with the following code, where > "bb" is a reference to the current MachineBasicBlock: > > PI->getExecutionCount(bb.getBasicBlock()) What does "llc -debug-pass=Structure" say? Is the ProfileLoaderPass really the last pass to touch the ProfileInfo before you are using it? Also, does bb.getBasicBlock() for sure always returns a valid block refrerence? You are getting the PI by getAnalysis<ProfileInfo>() I presume? Is this really the instance created by ProfileLoaderPass? (I guess for the...
2005 Mar 18
2
[LLVMdev] Loading ProfileInfo
...am having trouble > >loading the profile data. I added the line > >AU.addRequired<ProfileInfo>(); to the getAnalysisUsage. It is > >returning zero for all the edge counts. > > > >In llvm/Analysis/ProfileInfo.h, I noticed a prototype: > >Pass *createProfileLoaderPass(const std::string &Filename); > > > >The ProfileInfoLoaderPass does not appear in the list of analyses, > >presumably because it is registered as an "Opt". Do I need to > >explicitly request a LoaderPass in addition to ProfileInfo? What is > >the right...
2009 Sep 09
2
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
Thanks for such a rapid response! > Don't know about Passes in the backend, but this could be a problem of > an FunctionPassManager trying to use a ModulePass. I manually applied the patch you provided for llc (I'm using the 2.5 release of LLVM not ToT) and it fixed my compilation error. When your patch replaced the FunctionPassManager used by llc with a PassManager the error went