[LLVMdev] folding x * 0 = 0

David Greene dag at cray.com
Wed Mar 3 12:36:16 PST 2010


On Wednesday 03 March 2010 13:13:50 Chris Lattner wrote:
> > Why not at first create a compile time option for this so that the
> > code is already available for special purposes?
>
> I'm not sure how that would work, but it most likely wouldn't fit with the
> design of llvm.  If this is important, I'd rather fix the representational
> issue.

I agree.  The option should control the kind of IR generated as Chris outlined 
in the document.

We need to figure out exactly what "strict" means.  Is it like "restrict" in C 
where it only has meaning with respect to other things marked "restrict"
or is it more general?  Can I reassociate a strict with a relaxed?  Is it
possible that "strict" will mean different things for different operations?

We may need something akin to a fence over which no code motion can
occur.

Some compilers use special operations to represent parentheses for Fortran 
codes.  I don't think that will work very well for LLVM, however.

I think the proposal is heading in the right direction.  We just need to fill 
in the details.

                                                       -Dave




More information about the llvm-dev mailing list