Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Issue 11262019: Intrinsify Mint/Smi combined comparisons by extending a Smi to a 64 bit integer and doing a 64-bit … (Closed)

Created:
8 years, 2 months ago by srdjan
Modified:
8 years, 1 month ago
Reviewers:
regis
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Intrinsify Mint/Smi combined comparisons by extending a Smi to a 64 bit integer and doing a 64-bit integer compare (ia32 only). Committed: https://code.google.com/p/dart/source/detail?r=14051

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+135 lines, -7 lines) Patch
M runtime/vm/intrinsifier_ia32.cc View 1 2 1 chunk +75 lines, -7 lines 0 comments Download
A tests/language/mint_compares.dart View 1 chunk +60 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
srdjan
8 years, 2 months ago (2012-10-24 21:48:16 UTC) #1
regis
LGTM, but the code would be simpler and more efficient if the extended 64-bit value ...
8 years, 2 months ago (2012-10-24 22:36:09 UTC) #2
srdjan
On 2012/10/24 22:36:09, regis wrote: > LGTM, but the code would be simpler and more ...
8 years, 2 months ago (2012-10-25 00:15:23 UTC) #3
regis
On 2012/10/25 00:15:23, srdjan wrote: > On 2012/10/24 22:36:09, regis wrote: > > LGTM, but ...
8 years, 2 months ago (2012-10-25 00:42:55 UTC) #4
Florian Schneider
8 years, 1 month ago (2012-10-25 10:33:31 UTC) #5
I'm not sure, whether it is worth optimizing smi/mint comparisons in the
intrinsifier because in optimized code unboxed mints already provide fast
smi/mint comparisons.

On 2012/10/25 00:42:55, regis wrote:
> On 2012/10/25 00:15:23, srdjan wrote:
> > On 2012/10/24 22:36:09, regis wrote:
> > > LGTM, but the code would be simpler and more efficient if the extended
> 64-bit
> > > value was not pushed, but loaded in a pair of given registers. I think you
> > > should have barely enough registers to do it this way.
> > 
> > I do not think that we have enough registers. EDX and ECX must be preserved
> > until we know that we are not falling through, ESI is context, that leaves
us
> > with three registers: EAX, EBX and EDI. Once we load left into two
registers,
> we
> > still need two registers to be able to do the class check, and we have only
> one
> > left.
> > 
> > Also receiving result on stack makes for more robust code, IMO.
> > 
> > When we do inline the code, we can use more registers and skip the pushing.
> 
> I see.
> Actually, you could rewrite CompareClassId to use the cmpw instruction,
> comparing directly the 16-bit tag in memory with the immediate 16-bit value,
> instead of loading it in a scratch register :-)
> 
> This would help with register pressure in other places as well.
> 
> It's your call. Maybe it is for a later cl.

Powered by Google App Engine
This is Rietveld 408576698