[llvm-dev] Loop identification

Catello Cioffi via llvm-dev llvm-dev at lists.llvm.org
Mon Jan 16 00:23:10 PST 2017


The result in the example I made doesn't need to be exactly like that; that
is I want to recognize the inner loop and translate it into a machine
instruction. I thought that translating it into an intrinsic could be
easier but it seems not.
What I was thinking to do is to modify the Mips backend adding a Loop Pass
or a Function Pass. Do you think that this could work?

2017-01-14 23:57 GMT+01:00 Krzysztof Parzyszek via llvm-dev <
llvm-dev at lists.llvm.org>:

> On 1/13/2017 7:08 PM, Hal Finkel wrote:
>
>> This is integer multiplication or floating-point multiplication? If it
>> is integer multiplication, I'd expect that using SCEV would be the
>> easiest way to recognize the relevant patterns. SCEV is supposed to
>> understand all of the unobfuscation tricks.
>>
>> Do these instructions contain an implicit loop (of runtime trip count)
>> or are you trying to match loops of some fixed trip count?
>>
>
> It's binary polynomial multiplication. The loops are usually with a
> compile-time constant iteration count.
>
> I posted a specific patch with that code:
> https://reviews.llvm.org/D28694
>
> -Krzysztof
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170116/b7e169a6/attachment.html>


More information about the llvm-dev mailing list