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

Issue 2433093002: MIPS: Fix bad RegisterConfiguration usage in InstructionSequence unit tests. (Closed)

Created:
4 years, 2 months ago by ivica.bogosavljevic
Modified:
4 years ago
CC:
v8-reviews_googlegroups.com, v8-mips-ports_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

MIPS: Fix bad RegisterConfiguration usage in InstructionSequence unit tests. Test InstructionSequenceTest has been initialized with a testing RegisterConfiguration instance defined in instruction-sequence-unittest.h, whereas class ExplicitOperand which is being tested used RegisterConfiguration from instruction.cc. In case these two instances are different, the tests would fail. The issue is fixed by using the same instance of RegisterConfiguration both for test code and code under test. Additionally, the tests in register-allocator-unittest.cc use hardcoded values for register and begin failing is the hardcoded register is not available for allocation. Fix by forcing the use of allocatable registers only. TEST=unittests.MoveOptimizerTest.RemovesRedundantExplicit,unittests.RegisterAllocatorTest.SpillPhi BUG= Committed: https://crrev.com/0cf56232209d4c9c669b8426680de18806f6c29a Cr-Commit-Position: refs/heads/master@{#40862}

Patch Set 1 #

Total comments: 5

Patch Set 2 : MIPS: Added GetRegisterConfigurationForTesting method #

Patch Set 3 : Rebase to master #

Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -22 lines) Patch
M src/compiler/instruction.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/instruction.cc View 1 2 2 chunks +7 lines, -1 line 0 comments Download
M test/unittests/compiler/instruction-sequence-unittest.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M test/unittests/compiler/instruction-sequence-unittest.cc View 1 2 2 chunks +2 lines, -18 lines 0 comments Download
M test/unittests/compiler/register-allocator-unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 29 (12 generated)
ivica.bogosavljevic
PTAL Notice that this is a draft, not a final solution. I needed to define ...
4 years, 2 months ago (2016-10-19 14:30:40 UTC) #2
ivica.bogosavljevic
Reminder...
4 years, 1 month ago (2016-10-25 07:18:11 UTC) #3
ivica.bogosavljevic
4 years, 1 month ago (2016-10-28 08:17:24 UTC) #5
ivica.bogosavljevic
Reminder...
4 years, 1 month ago (2016-11-03 12:51:58 UTC) #7
titzer
https://codereview.chromium.org/2433093002/diff/1/test/unittests/compiler/instruction-sequence-unittest.cc File test/unittests/compiler/instruction-sequence-unittest.cc (right): https://codereview.chromium.org/2433093002/diff/1/test/unittests/compiler/instruction-sequence-unittest.cc#newcode83 test/unittests/compiler/instruction-sequence-unittest.cc:83: extern const RegisterConfiguration* (*GetRegConfig)(); On 2016/10/19 14:30:40, ivica.bogosavljevic wrote: ...
4 years, 1 month ago (2016-11-03 13:00:12 UTC) #8
ivica.bogosavljevic
Uploaded a new CL, PTAL https://codereview.chromium.org/2433093002/diff/1/test/unittests/compiler/instruction-sequence-unittest.cc File test/unittests/compiler/instruction-sequence-unittest.cc (right): https://codereview.chromium.org/2433093002/diff/1/test/unittests/compiler/instruction-sequence-unittest.cc#newcode83 test/unittests/compiler/instruction-sequence-unittest.cc:83: extern const RegisterConfiguration* (*GetRegConfig)(); ...
4 years, 1 month ago (2016-11-03 15:22:54 UTC) #9
titzer
On 2016/11/03 15:22:54, ivica.bogosavljevic wrote: > Uploaded a new CL, PTAL > > https://codereview.chromium.org/2433093002/diff/1/test/unittests/compiler/instruction-sequence-unittest.cc > ...
4 years, 1 month ago (2016-11-07 09:53:13 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433093002/20001
4 years, 1 month ago (2016-11-09 07:29:00 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_rel_ng/builds/15851) v8_linux_gcc_compile_rel on master.tryserver.v8 (JOB_FAILED, ...
4 years, 1 month ago (2016-11-09 07:30:11 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2433093002/40001
4 years, 1 month ago (2016-11-09 13:45:36 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 1 month ago (2016-11-09 13:47:35 UTC) #22
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/0cf56232209d4c9c669b8426680de18806f6c29a Cr-Commit-Position: refs/heads/master@{#40862}
4 years, 1 month ago (2016-11-17 22:27:35 UTC) #24
Mircea Trofin
On 2016/11/17 22:27:35, commit-bot: I haz the power wrote: > Patchset 3 (id:??) landed as ...
4 years ago (2016-12-16 22:39:24 UTC) #25
Mircea Trofin
On 2016/11/17 22:27:35, commit-bot: I haz the power wrote: > Patchset 3 (id:??) landed as ...
4 years ago (2016-12-16 22:39:27 UTC) #26
Mircea Trofin
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2587593002/ by mtrofin@chromium.org. ...
4 years ago (2016-12-16 22:41:50 UTC) #27
ivica.bogosavljevic
On 2016/12/16 22:41:50, Mircea Trofin wrote: > A revert of this CL (patchset #3 id:40001) ...
4 years ago (2016-12-21 15:50:42 UTC) #28
Mircea Trofin
4 years ago (2016-12-21 16:26:42 UTC) #29
Message was sent while issue was closed.
On 2016/12/21 15:50:42, ivica.bogosavljevic wrote:
> On 2016/12/16 22:41:50, Mircea Trofin wrote:
> > A revert of this CL (patchset #3 id:40001) has been created in
> > https://codereview.chromium.org/2587593002/ by mailto:mtrofin@chromium.org.
> > 
> > The reason for reverting is: This change rendered
> > InstructionSequenceTest::SetNumRegs ineffectual, thus
> > loosening the tests that were using that API to ensure correct register
> > allocation under intentionally constrained setups. 
> > 
> > For the problem stated in this CL, a solution needs to continue supporting
the
> > intentionally set-up test configuration..
> 
> Hi Mircea!
> 
> The reason why this patch landed in the first place is that testing code and
> code
> under test were using different instances of RegisterConfiguration for
testing.
> Without the patch
> ExplicitOperand uses the RegisterConfiguration from instruction.cc, whereas 
> Instruction-Sequence-Unittest uses its own version of RegisterConfiguration.
> Even when
> all test pass, they pass by accident
> (unittests.MoveOptimizerTest.RemovesRedundantExplicit fails on 
> MIPS).

I understand. I was suggesting the solution should continue using the test
register configuration, meaning, getting ExplicitOperand to support the
injection of a test register configuration, akin to what the register allocator
does. Is this something you'd be interested in looking at?

Thanks!

Powered by Google App Engine
This is Rietveld 408576698