[LLVMdev] some superoptimizer results
Sean Silva
chisophugis at gmail.com
Wed Jul 22 23:09:10 PDT 2015
On Wed, Jul 22, 2015 at 9:27 PM, John Regehr <regehr at cs.utah.edu> wrote:
> I just noticed: most of the results in this batch seem to be about
>> exploiting `[zs]ext i1` having cost 1
>> in order to replace a select of cost 3.
>> Could you do a run where select has cost 1 and [zs]ext i1 (and trunc to
>> i1) has cost 2 or 3?
>>
>
> I tried this (or something quite similar) earlier and it caused Souper to
> introduce *a lot* of selects. So the problem is that Souper's preferences
> become skewed too far in the other direction.
>
Interesting. Do you happen to have some examples laying around?
>
> How about for the next run I give everything (except maybe div/rem) cost 1?
That seems reasonable. Probably give mul >1 cost too due to the increased
latency.
> Then the only thing Souper will tell us about is when it can eliminate
> instructions, which seems to be a generally desirable thing.
>
Except for decode-limited situations, in general decreasing the critical
path length is more important than eliminating instructions. The critical
path length is a target-independent lower bound on the maximum achievable
execution speed; the number of instructions is not.
(assuming our chips don't start doing significant algebraic simplifications
on the fly, which seems like a safe bet)
-- Sean Silva
>
> As I said in the blog post, in the next batch Souper will exploit known
> bits. I'm excited to see what kind of results come out of Philip's
> value-tracking-dom-conditions.
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150722/0279c84f/attachment.html>
More information about the llvm-dev
mailing list