<p dir="ltr">This one is a getting the address space of the type of instruction instead of an operand, so didn't rename it. </p>
<div class="gmail_quote">On Oct 9, 2012 3:41 PM, "Eli Friedman" <<a href="mailto:eli.friedman@gmail.com">eli.friedman@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Tue, Oct 9, 2012 at 3:27 PM, Micah Villmow <<a href="mailto:villmow@gmail.com">villmow@gmail.com</a>> wrote:<br>
> Author: mvillmow<br>
> Date: Tue Oct 9 17:27:29 2012<br>
> New Revision: 165554<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=165554&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=165554&view=rev</a><br>
> Log:<br>
> Add in some interfaces that will allow easier access to the pointer address space.<br>
><br>
> Modified:<br>
> llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h<br>
> llvm/trunk/include/llvm/Instructions.h<br>
> llvm/trunk/include/llvm/Operator.h<br>
><br>
> Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=165554&r1=165553&r2=165554&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h?rev=165554&r1=165553&r2=165554&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h (original)<br>
> +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGNodes.h Tue Oct 9 17:27:29 2012<br>
> @@ -956,7 +956,12 @@<br>
> const MachinePointerInfo &getPointerInfo() const {<br>
> return MMO->getPointerInfo();<br>
> }<br>
> -<br>
> +<br>
> + /// getAddressSpace - Return the address space for the associated pointer<br>
> + unsigned getAddressSpace() const {<br>
> + return getPointerInfo().getAddrSpace();<br>
> + }<br>
> +<br>
> /// refineAlignment - Update this MemSDNode's MachineMemOperand information<br>
> /// to reflect the alignment of NewMMO, if it has a greater alignment.<br>
> /// This must only be used when the new alignment applies to all users of<br>
><br>
> Modified: llvm/trunk/include/llvm/Instructions.h<br>
> URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=165554&r1=165553&r2=165554&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Instructions.h?rev=165554&r1=165553&r2=165554&view=diff</a><br>
> ==============================================================================<br>
> --- llvm/trunk/include/llvm/Instructions.h (original)<br>
> +++ llvm/trunk/include/llvm/Instructions.h Tue Oct 9 17:27:29 2012<br>
> @@ -778,7 +778,7 @@<br>
> static Type *getIndexedType(Type *Ptr, ArrayRef<Constant *> IdxList);<br>
> static Type *getIndexedType(Type *Ptr, ArrayRef<uint64_t> IdxList);<br>
><br>
> - /// getIndexedType - Returns the address space used by the GEP pointer.<br>
> + /// getAddressSpace - Returns the address space used by the GEP pointer.<br>
> ///<br>
> static unsigned getAddressSpace(Value *Ptr);<br>
><br>
> @@ -798,7 +798,7 @@<br>
> }<br>
><br>
> unsigned getPointerAddressSpace() const {<br>
> - return cast<PointerType>(getType())->getAddressSpace();<br>
> + return cast<PointerType>(getPointerOperandType())->getAddressSpace();<br>
> }<br>
><br>
> /// getPointerOperandType - Method to return the pointer operand as a<br>
> @@ -3640,6 +3640,11 @@<br>
> /// @brief Clone an identical IntToPtrInst<br>
> virtual IntToPtrInst *clone_impl() const;<br>
><br>
> + /// @brief return the address space of the pointer.<br>
> + unsigned getAddressSpace() const {<br>
> + return cast<PointerType>(getType())->getAddressSpace();<br>
> + }<br>
<br>
It looks like you half-implemented renaming from getAddressSpace -><br>
getPointerAddressSpace?<br>
<br>
-Eli<br>
</blockquote></div>