[LLVMdev] Whether GEP fits an addressing mode

Jingyue Wu jingyue at google.com
Mon Mar 9 11:16:23 PDT 2015


Hi,

I wonder there's an API that determines whether an getelementptr can be
completely folded into an addressing mode. I need one such interface in my
own transformation pass. I saw TTI has a low-level interface on addressing
mode (isLegalAddressingMode), but requires the user to compute the base
register, offset, scale, and etc.

I am writing one such interface right now that computes low-level info
(e.g. base and offset) from a GEP and calls isLegalAddressingMode, but
please shout out if you know any existing/better way.

Thanks,
Jingyue
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150309/2decad7e/attachment.html>


More information about the llvm-dev mailing list