[LLVMdev] some superoptimizer results

Philip Reames listmail at philipreames.com
Thu Jul 23 10:11:09 PDT 2015



On 07/23/2015 07:24 AM, John Regehr wrote:
>> I guess another way to select interesting transformations could be to 
>> look for sequences where the
>> result uses a "subset" of the input instruction sequence.
>
> Yeah, I had been noticing those subsets too.  It sounds like it's 
> worth a try doing a run that looks only for those.
>
> One nice thing is that if we're just looking for subsets, we will not 
> even give the syntehsizer the option to use instructions that aren't 
> in the subset -- this should give a nice speedup, and probably will 
> even make synthesis more likely to succeed (assuming that an 
> optimization exists within the subset).
+1 - This sounds like a very interesting approach.  I suspect it might 
also find cases which are easier to hand generalize, but that's just a 
guess.

Another option would be exclude extensions of i1 and non cmov-like 
selects from the candidate set.  A lot of the examples in this set end 
up converting conditional codes to register values which is non-ideal.  
I saw a couple of examples which had obvious cmov implementations which 
just weren't expressed that way in the output.

A couple of small suggestions on the output formatting:
- Give each entry a unique ID (result set 3 #25 would be fine). That 
would make them much easier to discuss.
- Exclude examples where only a prefix changes.  There were several 
instances where the last instruction in the sequence was duplicated 
exactly.  This is essentially an instance of synthesizing the subproblem 
and results in duplicates in the output.
- Group all inputs at the beginning.  Follow with an instructions which 
are shared between input and output.  This'll make it easier to scan the 
output.
>
> John
> _______________________________________________
> 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