[LLVMdev] Getting the pointer type from a Load/Store SDNode

Chris Lattner clattner at apple.com
Sun Nov 25 17:02:27 PST 2007

>> I see a couple ways to handle this.  One is to require that the  
>> targets
>> custom expand the load/store to alternate address space at SDISel  
>> time.
>> This way they could do any crazy thing they want, including  
>> lowering them
>> into intrinsics, etc.
> Forcing custom lowering for ISD::LOAD/STORE means that you lose lots  
> of the information carried along with the Load/StoreSDNode that  
> makes writing instruction patterns (particularly the ext/trunc  
> predicates) simple.
> Another possibility is to add a utility function to Load/ 
> StoreSDNodes that returns the address space of the pointer being  
> used. For my use I think this way is probably best, though there's  
> nothing preventing a target from doing custom lowering.

That sounds fine to me,


More information about the llvm-dev mailing list