[LLVMdev] How to add a pass inside LLVM pass list
Soumya_Prasad_Ukil
ukil.soumya at gmail.com
Mon Aug 23 00:20:32 PDT 2010
My PRE pass is invoked using "opt -load -path-to-*.so-file" -my-pre-pass
. In that case, I was not required to change include/llvm/LinkAllPasses.h
and include/llvm/Transforms/Scalar.h --these two files. What needs to be
done to simply run opt "-my-pre-pass"? In the previous, the required pass
file is loaded first and then run.
On 23 August 2010 00:28, Nick Lewycky <nicholas at mxc.ca> wrote:
> Soumya_Prasad_Ukil wrote:
>
>> Look I have written a PRE pass. opt is running that pass. I have
>> included my pass name there in include/llvm/Support/StandardPasses.h
>> file. To do that, I have got some error. Because it also requires the
>> definition of the pass in some other file also. I observed how gvn pre
>> pass is added to the pass list. I had followed the same way, but failed.
>> Cna you kindly tell what needs to be done in this regard?
>>
>
> What's the error you're getting?
>
> There are two other files, include/llvm/LinkAllPasses.h and
> include/llvm/Transforms/Scalar.h which I think you would've already added
> your pass to if "opt -your-pre-pass" was working, but I'll mention them
> anyway.
>
> Nick
>
> On 23 August 2010 00:13, Nick Lewycky <nicholas at mxc.ca
>> <mailto:nicholas at mxc.ca>> wrote:
>>
>> Soumya_Prasad_Ukil wrote:
>>
>> Pls help.
>>
>>
>> You didn't say what was actually running the passes. (llvm-gcc?
>> clang? opt -some -passes?) What you probably want is to modify one
>> of the lists in include/llvm/Support/StandardPasses.h.
>>
>> Nick
>>
>>
>> On 21 August 2010 17:32, Soumya_Prasad_Ukil
>> <ukil.soumya at gmail.com <mailto:ukil.soumya at gmail.com>
>> <mailto:ukil.soumya at gmail.com <mailto:ukil.soumya at gmail.com>>>
>>
>> wrote:
>>
>> I have written a simple pass. I have been successful to
>> execute it.
>> I want LLVM to execute it. I don't know how to include a pass
>> in
>> llvm actual pass list, such it automatically invokes it just
>> like
>> GVNPre pass or some other pass. They have already been limked
>> in
>> llvm actual pass list.
>>
>> --
>> regards,
>> soumya prasad ukil
>>
>>
>>
>>
>> --
>> regards,
>> soumya prasad ukil
>>
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>
>>
>> http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>
>>
>>
>>
>> --
>> regards,
>> soumya prasad ukil
>>
>
>
--
regards,
soumya prasad ukil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100823/2314b4b4/attachment.html>
More information about the llvm-dev
mailing list