Displaying 20 results from an estimated 20 matches for "createprofileloaderpass".
2005 Mar 18
2
[LLVMdev] Loading ProfileInfo
...', 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...
2005 Mar 17
2
[LLVMdev] Loading ProfileInfo
...ile data.
I 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 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 the correct profiling infor...
2005 Mar 17
0
[LLVMdev] Loading ProfileInfo
...e 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?
Run...
2005 Mar 18
0
[LLVMdev] Loading ProfileInfo
...Ah, very reasonable :). If you update CVS, it should be available in both
opt and analyze now.
> Also, rather than requesting the pass interactively, can I somehow use
> the constructor provided in ProfileInfo.h? Here is the prototype, but
> I'm not sure how to use it:
> Pass *createProfileLoaderPass(const std::string &Filename);
That is only useful if you have a PassManager object. Given that, you
could do something (roughly) like this:
PassManager PM;
PM.add(createProfileLoaderPass("foo.llvmprof"));
PM.add(createMyProfileUsingPass());
PM.run(MyModule);
-Chris
--
http://no...
2009 Sep 10
0
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
...I by getAnalysis<ProfileInfo>() I presume? Is this
> really the instance created by ProfileLoaderPass?
Yes, I have "PI = &getAnalysis<ProfileInfo>()" in my code (modeled
after BasicBlockPlacement.cpp). However, when I run gdb the value of
the Pass* pointer returned by createProfileLoaderPass() does not match
the value of PI (of type ProfileInfo*) that I see inside my
MachineFunctionPass. The abbreviated output of gdb is found below:
Breakpoint 1, main (argc=11, argv=0xbfffd394) at <path to llvm>/tools/
llc/llc.cpp:292
292 Pass* tmp = createProfileLoaderPass();
(gdb) p tmp...
2010 Feb 25
3
[LLVMdev] Using Profile Information
...or performing 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
2009 Sep 10
1
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
Hi,
Shuguang Feng wrote:
> 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
2010 Feb 26
1
[LLVMdev] Using Profile Information
...fileInfo>();
}
bool runOnModule(Module &M) {
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));
PI = &getAnalysis<ProfileInfo>();
}
};
}
char MyAna::ID = 0;
static RegisterPass<MyAna> X("my-ana", "Testing prof info");
What I basically want is to use block profile information in this pass
to perform my analysis. Here I...
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.)
...ileInfo>() I presume? Is this
>> really the instance created by ProfileLoaderPass?
>
> Yes, I have "PI = &getAnalysis<ProfileInfo>()" in my code (modeled
> after BasicBlockPlacement.cpp). However, when I run gdb the value of
> the Pass* pointer returned by createProfileLoaderPass() does not match
> the value of PI (of type ProfileInfo*) that I see inside my
> MachineFunctionPass. The abbreviated output of gdb is found below:
>
> Breakpoint 1, main (argc=11, argv=0xbfffd394) at <path to llvm>/tools/
> llc/llc.cpp:292
> 292 Pass* tmp = createPr...
2009 Jul 01
0
[LLVMdev] Profiling in LLVM Patch
...od on the MST, and rename it to dump. Also, please use Support/raw_ostream.h
for output instead of C++ iostreams.
> --- llvm-van/include/llvm/Analysis/Passes.h 2009-06-29 13:49:13.000000000 +0200
> +++ llvm-c7/include/llvm/Analysis/Passes.h 2009-06-26 16:48:02.000000000 +0200
> // createProfileLoaderPass - This pass loads information from a profile dump
> - // file.
> + // file. Since its possible to use the ProfileInfoLoaderPass not only from
> + // opt but also e.g. from llvm-prof and with different profile info filenames
> + // a creator is provided where the toolname and profile...
2009 Jul 14
0
[LLVMdev] Profiling in LLVM Patch Followup 1
...e (original) patch below...
Thanks,
- Daniel
> Index: include/llvm/Analysis/Passes.h
> ===================================================================
> --- include/llvm/Analysis/Passes.h (revision 74697)
> +++ include/llvm/Analysis/Passes.h (working copy)
...
> + ModulePass *createProfileLoaderPass(ProfileInfoLoader *PIL);
I avoided the need for this by just loading the profile info twice, as
a sort of intermediate step.
> + std::vector<unsigned> ECs = PIL->getRawEdgeCounts();
This copies the vector, it should be a (const) refererence.
> + // Instrument all of the edges.....
2009 Jun 29
7
[LLVMdev] Profiling in LLVM Patch
Hi all,
as proposed in
http://lists.cs.uiuc.edu/pipermail/llvmdev/2009-February/020396.html
I implemented the algorithm presented in [Ball94]. It only instruments
the minimal number of edges necessary for edge profiling.
The main changes introduced by this patch are:
*) a interface compatible rewrite of ProfileInfo
*) a cleanup of ProfileInfoLoader
(some functionality in ProfileInfoLoader
2009 Jul 02
1
[LLVMdev] Profiling in LLVM Patch Followup 1
Hi,
this is the first in a series of patches to cleanup and improve the LLVM Profiling Infrastructure.
First and foremost this patch removes duplicate functionality from ProfileInfoLoader and ProfileInfo:
The ProfileInfoLoader performed not only the loading of the profile information but also some synthesis of block and function execution counts from edge profiling information. Since the
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
2012 Sep 26
0
[LLVMdev] Error while loading profile information
...ot;);
if(fp)
fscanf(fp,"%s\n",BitcodeFile);
if (!(ec = MemoryBuffer::getFileOrSTDIN(BitcodeFile, Buffer))) {
M = ParseBitcodeFile(Buffer.get(), Context, &ErrorMessage);
}
ProfileInfoLoader PIL("llvm-prof","llvmprof.out",*M);
PM->add(createProfileLoaderPass("llvmprof.out"));
printf("\n%s:%d",__FILE__,__LINE__);
fflush(stdout);
PM->add(createARMInstrStatsPass(PIL));
printf("\n%s:%d",__FILE__,__LINE__);
fflush(stdout);
return true;
}
Can anyone find what is wrong with this approach and c?
Thank...
2009 Jul 01
12
[LLVMdev] Profiling in LLVM Patch
...to dump. Also, please use Support/raw_ostream.h
> for output instead of C++ iostreams.
Okay.
>
>> --- llvm-van/include/llvm/Analysis/Passes.h 2009-06-29 13:49:13.000000000 +0200
>> +++ llvm-c7/include/llvm/Analysis/Passes.h 2009-06-26 16:48:02.000000000 +0200
>> // createProfileLoaderPass - This pass loads information from a profile dump
>> - // file.
>> + // file. Since its possible to use the ProfileInfoLoaderPass not only from
>> + // opt but also e.g. from llvm-prof and with different profile info filenames
>> + // a creator is provided where the tool...
2009 Jul 22
4
[LLVMdev] Profiling in LLVM Patch Followup 1
...out files?
> [...]
>> Index: include/llvm/Analysis/Passes.h
>> ===================================================================
>> --- include/llvm/Analysis/Passes.h (revision 74697)
>> +++ include/llvm/Analysis/Passes.h (working copy)
> ...
>> + ModulePass *createProfileLoaderPass(ProfileInfoLoader *PIL);
>
> I avoided the need for this by just loading the profile info twice, as
> a sort of intermediate step.
>
>> + std::vector<unsigned> ECs = PIL->getRawEdgeCounts();
>
> This copies the vector, it should be a (const) refererence.
>
&...
2011 Apr 05
3
[LLVMdev] Building LLVM on Solaris/Sparc
...objects/tools/opt/Debug+Asserts/opt.o
llvm::createLowerInvokePass(llvm::TargetLowering
const*)/n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/opt.o
llvm::createOptimalEdgeProfilerPass()
/n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/opt.o
llvm::createProfileLoaderPass()
/n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/opt.o
llvm::createLoopStrengthReducePass(llvm::TargetLowering
const*)/n/fs/scratch/tpondich/ParallelAssert/llvm-objects/tools/opt/Debug+Asserts/opt.o
vtable for llvm::raw_ostream
/n/fs/scratch/tpondich/ParallelAssert/llvm...