We will prioritize this, but I doubt we can land a quick fix today. I think the 
MIPS bot gates rolls, so I suggest we put this test on the skip list for now. 
(I'll do that)

A little more background on branches: normal MIPS conditional branches have a 
16-bit branch offset, with corresponding branch range of +/-128K. When a single 
function exceeds that size, we go to long-branch mode, which is inefficient, as 
Dusan said. (branches to bound (backwards) short-distance labels can still be 
short, but all forward branches to unbound labels have to emit the 
long-branch.)  More typical regexps don't trigger long-branch mode, but of 
course this test does.

Thanks for pointing out the code sequence below that can be improved, we'll fix 
that and look for more optimizations.

paul

From: Dusan Milosavljevic 
<[email protected]<mailto:[email protected]>>
Date: Wednesday, June 10, 2015 at 9:07 AM
To: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Cc: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: Re: MIPS regexp code

We had similar problem with exceeding code size limit on misp64 because the 
long branches were inefficient on mips64 . The mips64 code required 6 
instructions for unconditional long branch, but this is now addressed in  
https://codereview.chromium.org/1147503002/.

The same Cl can be applied to mips32 and it will reduce code size, but it 
appears the code size emerged on mips32 due to other code inefficiencies.
We start looking at this issue, and will try to find out what is the main cause 
for increased code size.


On Wednesday, June 10, 2015 at 4:49:28 PM UTC+2, Erik Corry wrote:
There's currently a failure on the buildbot because MIPS is generating about 3x 
as much regexp code as other platforms.  Part of it is that MIPS always loads 
just one character at a time because of unaligned access.  But some of the code 
could be better.  One of the culprits is LoadCurrentCharacterUnchecked, which 
generates:

addiu   t7, t2, cp_offset
addu    t5, t6, t7
lbu     t3, 0(t5)

This should just be

addu t5, t6, t2
lbu t3, cp_offset(t5)

Probably fixing this won't be enough to let MIPS pass the test though.  There's 
other stuff going on there that I haven't looked at.

--
Erik Corry

Google UK Limited Registered Office: Belgrave House, 76 Buckingham Palace Road, 
London SW1W 9TQ Registered in England Number: 3977902

--
You received this message because you are subscribed to the Google Groups 
"v8-mips-ports" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To post to this group, send email to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-mips-ports/58629720-b60e-422b-98c1-c5cadc249223%40googlegroups.com<https://groups.google.com/d/msgid/v8-mips-ports/58629720-b60e-422b-98c1-c5cadc249223%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to