[LLVMdev] Re: "pure" functions"
Vladimir Prus
ghost at cs.msu.su
Mon Jun 5 01:07:16 PDT 2006
Reid Spencer wrote:
> On Sun, 2006-06-04 at 13:08 -0500, Chris Lattner wrote:
>> On Sun, 4 Jun 2006, Reid Spencer wrote:
>> > Basically, anything that doesn't do any load or store
>> > outside of its parameters and no malloc or free? Maybe a few other
>> > constraints. Sounds fairly easy to deduce and might be useful for
>> > optimization.
>>
>> We already do that, but it doesn't help for external functions (e.g.
>> strlen).
>
> I see. Just another reason why *everything* should be compiled with
> LLVM :)
In my case, the function is much more "pure" then you can imagine -- its
body does not exist anywhere. It's just some "marker" I put in code during
certain transformation to communicate information to further
transformations. After those transformations are done the markers should be
optimized out.
- Volodya
More information about the llvm-dev
mailing list