[LLVMdev] "pure" functions"
Chris Lattner
sabre at nondot.org
Sun Jun 4 11:08:22 PDT 2006
On Sun, 4 Jun 2006, Reid Spencer wrote:
> That's a bit of a hack. Can we not deduce "pure" functions
> conservatively?
Yes, and we do.
> 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).
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list