[llvm-commits] LoadSDNode invariance

Peter Cooper peter_cooper at apple.com
Mon Nov 7 18:27:19 PST 2011


I've made the changes to add invariance to the getLoad method and all the calls.  There were more calls than i realized, but its an easy change to make to other backends.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 6027699.patch
Type: application/octet-stream
Size: 91368 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111107/b4158905/attachment.obj>
-------------- next part --------------


Attached the patch for review.  The optimizer changes to LICM will follow in a separate patch once this refactoring one is committed.

Pete
On Nov 4, 2011, at 1:52 PM, Peter Cooper wrote:

> I'm happy doing that.  Hopefully it doesn't end up as too many changes for people with their own backends.
> 
> Pete
> 
> On Nov 4, 2011, at 1:44 PM, Evan Cheng wrote:
> 
>> 
>> 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
>> 
> 
> _______________________________________________
> 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