[LLVMdev] How to use property 'isCommutable' in target description file?
Heyu Zhu
zhu.heyu at gmail.com
Mon Dec 7 22:18:31 PST 2009
Thanks to Anton.
Frankly said i don't know the exact meaning and purpose of 'isCommutable'.
By my opinion "add.w r6, r7" != "add.w r7, r6", so we shouldn't set
isCommutable = 1.
Who would like give an example to demonstrate what benifit it has if
'isCommuatble=1' in instruction selection, register allocation or other
process?
Regards
2009/12/7, Anton Korobeynikov <anton at korobeynikov.info>:
>
> Hello
>
> > *** Another question: Why set isCommutable = 1 in ADD16rr but NOT set in
> > ADD16ri?
> Because all msp430 instructions are two-address, this means that
> output register is tied to first input. That's why you cannot swap
> operands for reg-imm operations.
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091208/3b7fbde6/attachment.html>
More information about the llvm-dev
mailing list