[LLVMdev] post-inc loads/stores

Jim Grosbach grosbach at apple.com
Mon Feb 7 08:57:41 PST 2011


Hi Jonas,

There's not really a very clean way to do this currently. The ARM backend does it as you indicate with the writeback register listed as an output as well as an input and marked as a tied operand constraint. Search for _PRE and _POST in ARMInstrInfo.td for examples. For most instances, instruction selection is done via custom lowering, not an ISel pattern on the pattern; see ARMISelLowering.cpp for that.

-Jim

On Feb 7, 2011, at 8:42 AM, Jonas Paulsson wrote:

> Hi,
> 
> I would like to know how I should define these types of instructions in LLVM. 
> 
> I have for instance a load instruction that increments the address-register. I do not know how I should mark this - should the address register as well be in the outs list, or should some other flag be set, perhaps?
> 
> Thank you,
> 
> /Jonas
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list