[PATCH] D39848: [RISCV] Support lowering FrameIndex
Alex Bradbury via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 13:34:37 PST 2017
asb added a comment.
In https://reviews.llvm.org/D39848#932109, @kparzysz wrote:
> FrameIndex cannot be matched directly in patterns, but it can be matched by a ComplexPattern, which then can be used in selection patterns.
>
> We have this in Hexagon (the relevant part is the getTargetFrameIndex):
Thanks Krzysztof. This patch does something similar, in that I define a ComplexPattern in order to match a FrameIndex. The bit I remember having problems with was using the operand produced by the complex pattern with my targets standard GPR+imm load instructions. Of course my complexpattern was trying to get both the base and offset from the frameindex. Sticking to _just_ matching the frameindex in the ComplexPattern like your Hexagon snippets does seems more promising. I'll have another look tomorrow.
https://reviews.llvm.org/D39848
More information about the llvm-commits
mailing list