Displaying 3 results from an estimated 3 matches for "selectaddrfi".
2019 Jun 26
2
How to handle ISD::STORE when both operands are FrameIndex?
...}
>
> It's pretty simple to implement matching, you generally just need to
> convert it to some add instruction that can do SP+imm.
For the sake of simplicity I decided not to bother with stack register yet
and instead I just emit FrameIndex as immediate:
bool MyBackendDAGToDAGISel::SelectAddrFI(SDValue &N, SDValue &R) {
if (N.getOpcode() != ISD::FrameIndex)
return false;
MachineFrameInfo &MFI = MF->getFrameInfo();
int FX = cast<FrameIndexSDNode>(N)->getIndex();
R = CurDAG->getTargetFrameIndex(FX, MVT::i32);
return true;
}
This way I end up with
s...
2019 Jun 26
2
How to handle ISD::STORE when both operands are FrameIndex?
...Maybe with an
> "llc -debug" log on a simple example. We might be able to give more
> specific advice with the actual error.
>
Sigh. I'm completely confused and lost. Thanks for bearing with me.
Here's my current definition:
def AddrFI: ComplexPattern<i32, 1, "SelectAddrFI", [frameindex], []>;
class StackAddress : CodePatPred<[{
return cast<MemSDNode>(N)->getAddressSpace() == 1;
}]>;
class StoreFrag<SDPatternOperator op> : PatFrag <
(ops node:$value, node:$ptr), (op node:$value, node:$ptr)
>;
class StackStore <SDPatternOpe...
2019 Jun 25
2
How to handle ISD::STORE when both operands are FrameIndex?
On Mon, Jun 24, 2019 at 4:08 PM Tim Northover <t.p.northover at gmail.com>
wrote:
> On Mon, 24 Jun 2019 at 12:16, Gleb Popov via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > 1. Where does it come from? Can I do anything to make it not appear?
>
> It comes from something like:
>
> %ptr = alloca i8
> %var = alloca i8*
> store i8* %ptr, i8**