[LLVMdev] Getting the pointer type from a Load/Store SDNode
sabre at nondot.org
Thu Nov 22 13:51:20 PST 2007
On Wed, 21 Nov 2007, Christopher Lamb wrote:
> I'm digging into this, but I'd like to know if it's feasible to get to the
> pointer type from a Load/Store SDNode? This would relieve me from having to
> put the address space information into those SDNodes.
> Is Load/StoreSDNode->getSrcValue()->getType() going to do what I want?
> If not, I can't see another way of getting to the pointer type.
Hrm, the codegen has a couple of interesting crazy issues. For example,
it thinks there is a current PointerTy() that is always valid.
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.
More information about the llvm-dev