<div dir="ltr"><div>Seems like this information would be readily available in the DAG, at least in as far as outs and ins?</div><div><br></div><div>I just need to check if the inputs are all registers or not. I was looking at many different ways to do this but basically that's all I need.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 21, 2017 at 7:11 PM, Matthias Braun <span dir="ltr"><<a href="mailto:mbraun@apple.com" target="_blank">mbraun@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The generic code in lib/CodeGen has no knowledge of these semantic differences. This knowledge is only available on a per-target basis.<br>
Typical query functions would be X86InstrInfo::<wbr>getMemOpBaseRegImmOfs(...) or AArch64::getMemOpInfo(...).<br>
<br>
Doing this in a common way accross targets requires callbacks in TargetInstrInfo, there seem to be some in that direction but they appear to be rarely used so depending on what you want to do you may need to implement more of them.<br>
<br>
- Matthias<br>
<div><div class="h5"><br>
> On Sep 21, 2017, at 1:27 PM, Ryan Taylor via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
><br>
> So I'd like to be able to tell the difference between an imm and an imm used in mem offset in MachineInstr.<br>
><br>
> Or, it would be nice to tell the difference between src and dst operands.<br>
><br>
> I must be missing something trivial?<br>
><br>
> For example,<br>
><br>
> int *b, a;<br>
><br>
> b[10] = a + 2; // is there any marker/flag between 2 and 10 to tell the difference?<br>
><br>
> Thanks.<br>
</div></div>> ______________________________<wbr>_________________<br>
> LLVM Developers mailing list<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank" rel="noreferrer">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br>
</blockquote></div><br></div>