[LLVMdev] rol/ror llvm instruction set
Kasra
kasra_n500 at yahoo.com
Tue Feb 3 16:37:33 PST 2009
--- On Tue, 2/3/09, Owen Anderson <resistor at mac.com> wrote:
> From: Owen Anderson <resistor at mac.com>
> Subject: Re: [LLVMdev] rol/ror llvm instruction set
> To: kasra_n500 at yahoo.com, "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Date: Tuesday, February 3, 2009, 4:20 PM
> On Feb 3, 2009, at 3:54 PM, Kasra wrote:
> > I guess the backends could know about the
> instructions. But I am not convinced why it is beneficial
> not to have ROR and ROL instructions within llvm.
> >
>
> How would it be beneficial to have them, if we already
> generate them at the target level properly? Adding
> instructions "just because" doesn't seem wise.
>
> -Owen
If you look at it the way you are it sounds fine. :D
However, if we have 1 instruction we reduce the amount of time we will spend optomising.
I argued on my previous post that rotations are implemented on most machine (x86 platform). Thus it seems right to include 1 instruction in llvm and translate it to 3 instruction older architectures that have not implemented the rotation instruction yet.
I am sure that it is only matter of time before architectures without rotation instruction implementing it. Because of cryptography, it is becoming much more popular about 500% growth over the past decade (AES competitors against SHA-3 competitors). Crypto algorithms really like rotations since it is easily analysed and could be implemented efficiently
-- Kasra
More information about the llvm-dev
mailing list