[LLVMdev] Profile Info with Machine Function Pass Fails

Ranajoy Pal ranajoy.pal at gmail.com
Mon Sep 17 14:54:19 PDT 2012


Hi,


I am trying to run a profiling pass for each Machine Basic Block so that I
can get execution count for them, but I am getting assertion error when I
run it through clang. I have used MachineProfileInfo and Profile estimator
as dependent passes over my pass. I am sending you the code for my pass.
the error says:
void llvm::PMTopLevelManager::schedulePass(llvm::Pass*): Assertion `PI &&
"Expected required passes to be initialized"' failed.

In *ARMTargetMachine.cpp, function bool
ARMPassConfig::addPreEmitPass() *the following has been added

*PassRegistry &Registry=*PassRegistry::getPassRegistry();
initializeARMInstrStatsPass(Registry);*


The program is executed with the following command :

*clang -march=armv7-a -mfloat-abi=soft -ccc-host-triple arm-elf
-integrated-as simple.c -c -o simple.o*

I am attaching the code for the pass. Can you help me out? also can you
suggest better ways for getting execution count of loops corresponding to
each machine basic block?

Thanks and Regards,
Ranajoy Pal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120918/e69d5dbc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ARMInstrStats.cpp
Type: text/x-c++src
Size: 2896 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120918/e69d5dbc/attachment.cpp>


More information about the llvm-dev mailing list