[llvm-commits] LoadSDNode invariance

Evan Cheng evan.cheng at apple.com
Fri Nov 4 13:44:53 PDT 2011


On Nov 4, 2011, at 11:56 AM, Peter Cooper wrote:

> Hi
> 
> I've added new metadata to load IR instructions to say if they are invariant, i.e., don't change at runtime.
> 
> The IR change was simple but i'm not sure about the MachineInstr/DAG level.  I've attached the change which encodes the invariant flag in the MemSDNodeFlags next to the volatile flag.
> 
> Please have a look and tell me if this is ideal?  The main thing i wasn't happy doing was adding another DAG.getLoad method with the invariant flag, but the alternative was changing the existing method which would lead to changing dozens of calls.

If it's only dozens of calls, then I vote for changing the existing method.

Evan

> 
> Thanks,
> Pete
> 
> <p.patch>_______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list