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