Displaying 5 results from an estimated 5 matches for "mycodegenpass".
2009 Sep 10
2
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
...94) at <path to llvm>/tools/
> llc/llc.cpp:293
> 293 Passes.add(tmp);
> (gdb) p tmp
> $2 = (class llvm::Pass *) 0x8feeaf0
>
> So the address of the ProfileLoaderPass should be 0x8feeaf0 correct?
> But I see the following inside my own pass:
>
> Breakpoint 3, MyCodeGenPass::runOnMachineFunction (this=0x90be200,
> MF=@0x90ca280) at <path to llvm>/lib/Target/X86/MyCodeGenPass.cpp:108
> 108 <random line of code after PI =
> &getAnalysis<ProfileInfo>() executes>
> (gdb) p PI
> $3 = (class llvm::ProfileInfo *) 0x90be...
2009 Sep 10
0
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
....
Breakpoint 2, main (argc=11, argv=0xbfffd394) at <path to llvm>/tools/
llc/llc.cpp:293
293 Passes.add(tmp);
(gdb) p tmp
$2 = (class llvm::Pass *) 0x8feeaf0
So the address of the ProfileLoaderPass should be 0x8feeaf0 correct?
But I see the following inside my own pass:
Breakpoint 3, MyCodeGenPass::runOnMachineFunction (this=0x90be200,
MF=@0x90ca280) at <path to llvm>/lib/Target/X86/MyCodeGenPass.cpp:108
108 <random line of code after PI =
&getAnalysis<ProfileInfo>() executes>
(gdb) p PI
$3 = (class llvm::ProfileInfo *) 0x90be438
> (I guess for t...
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
2009 Sep 10
0
[LLVMdev] Loading ProfileInfo in Backend. (Was: [PATCH] & Question: Preserving ProfileInfo for backend.)
...gt; 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 ProfileInfo?
Good suggestion. Unfortunately the end result is that for some blocks
instead of seeing the sentinel value of "-1" I see other bogus
execution counts instead. For example, llvm-prof prints out the
fo...
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