[LLVMdev] Get Analysis from PassManager

Andreas Neustifter e0325716 at student.tuwien.ac.at
Thu Jun 4 03:17:47 PDT 2009


-----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 information.

Thanks, Andi
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkonn0sACgkQPiYq0rq7s/AqawCgjwS5F8z33kjO/cFuDc/CcBeC
d+UAn2ZXnqTCOAVO0Ib1Qu/QvEDO7wmG
=0cmm
-----END PGP SIGNATURE-----



More information about the llvm-dev mailing list