Last Comment Bug 779361 - IonMonkey: Reuse input in LAbsD and LSqrtD.
: IonMonkey: Reuse input in LAbsD and LSqrtD.
Status: RESOLVED FIXED
[ion:t]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: unspecified
: All Linux
: -- normal (vote)
: ---
Assigned To: general
:
Mentors:
Depends on:
Blocks:
  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:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


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

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

LAbsD and LSqrtD can trivially reuse the input register.
Comment 1 Sean Stangl [:sstangl] 2012-07-31 20:49:21 PDT
http://hg.mozilla.org/projects/ionmonkey/rev/f35b90ed0b8d
Comment 2 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);
// ..no 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 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.