[LLVMdev] About writing a modulePass in addPreEmitPass() for NVPTX
Antony Yu
swpenim at gmail.com
Tue Jun 25 00:35:52 PDT 2013
So that's how it is !! Thanks!
Hmm, in fact, I want to get Call Graph information in machine code stage,
is there any way to get this?
I try CallGraph &g= getAnalysis<CallGraph>, but it prints the same error and
doesn't work as expected.
Antony Yu
Justin Holewinski-2 wrote
> Sorry for the delay. Yeah, that error message is a bit confusing. What's
> happening is that your pass sequence is invalid. Once the IR has been
> lowered to machine code, its too late to run LLVM IR passes (ModulePass,
> FunctionPass, CallGraphSCCPass, etc.). At that point, you need to run a
> Machine*Pass, e.g. MachineFunctionPass. If you need to run an IR level
> pass, you need to use addIRPasses().
>
> --
>
> Thanks,
>
> Justin Holewinski
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at .uiuc
> http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
--
View this message in context: http://llvm.1065342.n5.nabble.com/About-writing-a-modulePass-in-addPreEmitPass-for-NVPTX-tp58701p58813.html
Sent from the LLVM - Dev mailing list archive at Nabble.com.
More information about the llvm-dev
mailing list