Last Comment Bug 779361 - IonMonkey: Reuse input in LAbsD and LSqrtD.
: IonMonkey: Reuse input in LAbsD and LSqrtD.
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All Linux
-- normal (vote)
: ---
Assigned To: general
: Jason Orendorff [:jorendorff]
Depends on:
  Show dependency treegraph
Reported: 2012-07-31 17:03 PDT by Sean Stangl [:sstangl]
Modified: 2012-08-01 10:55 PDT (History)
3 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

patch (3.86 KB, patch)
2012-07-31 17:03 PDT, Sean Stangl [:sstangl]
nicolas.b.pierron: review+
Details | Diff | Splinter Review

Description User image Sean Stangl [:sstangl] 2012-07-31 17:03:20 PDT
Created attachment 647770 [details] [diff] [review]

LAbsD and LSqrtD can trivially reuse the input register.
Comment 1 User image Sean Stangl [:sstangl] 2012-07-31 20:49:21 PDT
Comment 2 User image Jan de Mooij [:jandem] 2012-08-01 00:05:00 PDT
This constrains regalloc a bit though, if you have

var y = sqrt(x);
var z = abs(x);
// other uses of x..

Regalloc could do

x in r0
sqrt: r0 -> r1
abs : r0 -> r0

Now it has to use an explicit move:

x in r0
move: r0 -> r1
sqrt: r1 -> r1
abs : r0 -> r0

I thought defineReuseInput was only used in cases where the hardware requires it (most non-FP instructions on x86).
Comment 3 User image Nicolas B. Pierron [:nbp] 2012-08-01 10:55:39 PDT
So the useAtStart is good, but not the defineReuseInput ?

Note You need to log in before you can comment on or make changes to this bug.