[LLVMdev] Selecting FrameIndex
Scott Michel
scottm at aero.org
Wed Mar 18 12:00:47 PDT 2009
someguy wrote:
> But there is no explicit pattern to match FrameIndex in the .td files,
> even though I've specified 'frameindex' in the 'roots' of the
> addressing mode ComplexPattern. The result is that I get a
> CannotYetSelect on the FrameIndex operand during selection.
>
> Anyone know what i'm doing wrong?
>
You're not doing anything wrong, you've just made friends with the
common subexpression eliminator. :-)
Have a look at the PPC or CellSPU backends' SelectionDAGISel::Select()
method.. You end up catching the ISD::FrameIndex node during instruction
selection and then doing something "useful" with it. In the CellSPU's
case, the ISD::FrameIndex node is turned into an add and the result
stored in a register.
-scooter
More information about the llvm-dev
mailing list