search for: profileloaderpass

Displaying 11 results from an estimated 11 matches for "profileloaderpass".

2009 Sep 10
1
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
...neFunction 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...
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 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
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 09
2
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
...4bd65dbe84394bb7 noted that accessing execution counts in a MachineFunction pass (using the BasicBlock* corresponding to the respective MachineBasicBlock) returned 0 for all blocks. Running llc with --debug-pass=Structure I noticed that the NoProfileInfo pass was being executed. I tried adding a ProfileLoaderPass in the addPreRegAlloc function of the X86 target machine to load the profile information but receive the following runtime error when the pass manager attempts to add the ProfileLoader pass: llc: <path to llvm>/llvm/lib/VMCore/PassManager.cpp:1597: virtual void llvm::ModulePass::assignPassMa...
2009 Sep 08
0
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
On Sep 8, 2009, at 1:27 AM, Andreas Neustifter wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Hi, > > the second part of my work is to preserve the profiling information > through all the transformation passes and make it available to the > backend machinery. > > Attached is an example patch on how I plan to preserve the information > for a given
2010 Feb 25
0
[LLVMdev] Using Profile Information
Ah BTW... On 25.02.2010, at 17:33, ambika wrote: > ProfileInfo *PI; > PI = &getAnalysis<ProfileInfo>(); If this _in_ your pass, then you have to register the usage of this in the getAnalysisUsage() method: void getAnalysisUsage(AnalysisUsage &AU) const { AU.addRequired<ProfileInfo>(); } Also you have to ensure that the pass you are using is executed right
2009 Sep 09
0
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
...respective MachineBasicBlock) > returned 0 for all blocks. Running llc with I > noticed that the NoProfileInfo pass was being executed. Yes, llc currently does not support the loading of profiles, but I attach a patch that does that, can you try that please? > I tried > adding a ProfileLoaderPass in the addPreRegAlloc function of the X86 > target machine to load the profile information but receive the > following runtime error when the pass manager attempts to add the > ProfileLoader pass: > > llc: <path to llvm>/llvm/lib/VMCore/PassManager.cpp:1597: virtual void >...
2010 Feb 25
3
[LLVMdev] Using Profile Information
...forming some analysis. I tried something like: PassManager PassMgr = PassManager(); cl::opt<std::string> ProfileDataFile(cl::Positional, cl::desc("<llvmprof.out file>"), cl::Optional, cl::init("llvmprof.out")); PassMgr.add(createProfileLoaderPass(ProfileDataFile)); PassMgr.run(M); ProfileInfo *PI; PI = &getAnalysis<ProfileInfo>(); But this dosent seem to work. I want to perform profile guided analysis and thus want to use profile info. regards, Ambika
2010 Feb 26
1
[LLVMdev] Using Profile Information
I have not made a separate pass. I have done it in single pass ie added ProfileLoaderPass , got information in PI and now I am planning to perform the analysis here itself. I was trying to print information using ProfileInfoPrinter pass but was unable to do it. namespace { class MyAna : public ModulePass { ProfileInfo *PI; public: static char ID; // Class identification, rep...
2009 Sep 08
2
[LLVMdev] [PATCH] & Question: Preserving ProfileInfo for backend.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, the second part of my work is to preserve the profiling information through all the transformation passes and make it available to the backend machinery. Attached is an example patch on how I plan to preserve the information for a given transformation pass. And now comes the question into place: whats the best way to attach the profile info