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

Issue 10918144: Avoid allocating unnecessary result locations for some instructions. (Closed)

Created:
8 years, 3 months ago by Florian Schneider
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Avoid allocating unnecessary result locations for some instructions. If the result of an instruction is not needed, we don't need to assign a result location. I fixed StoreStatic and StoreVMField. For calls, it does not hurt since all registers are blocked anyway. Other instructions that don't have side effects usually don't occur in an effect context and should be removed by a separate pass before entering the register allocator. Committed: http://code.google.com/p/dart/source/detail?r=12111

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -8 lines) Patch
M runtime/vm/intermediate_language.cc View 1 chunk +5 lines, -4 lines 0 comments Download
M runtime/vm/intermediate_language_ia32.cc View 2 chunks +4 lines, -2 lines 2 comments Download
M runtime/vm/intermediate_language_x64.cc View 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Florian Schneider
8 years, 3 months ago (2012-09-10 12:16:26 UTC) #1
Kevin Millikin (Google)
LGTM. https://chromiumcodereview.appspot.com/10918144/diff/1/runtime/vm/intermediate_language_ia32.cc File runtime/vm/intermediate_language_ia32.cc (right): https://chromiumcodereview.appspot.com/10918144/diff/1/runtime/vm/intermediate_language_ia32.cc#newcode1036 runtime/vm/intermediate_language_ia32.cc:1036: locs->set_out(is_used() This should be: locs->set_out(is_used() ? Location::SameAsFirstInput() : ...
8 years, 3 months ago (2012-09-10 12:28:01 UTC) #2
Florian Schneider
8 years, 3 months ago (2012-09-10 13:05:40 UTC) #3
https://chromiumcodereview.appspot.com/10918144/diff/1/runtime/vm/intermediat...
File runtime/vm/intermediate_language_ia32.cc (right):

https://chromiumcodereview.appspot.com/10918144/diff/1/runtime/vm/intermediat...
runtime/vm/intermediate_language_ia32.cc:1036: locs->set_out(is_used()
On 2012/09/10 12:28:02, kmillikin wrote:
> This should be:
> 
> locs->set_out(is_used()
>                   ? Location::SameAsFirstInput()
>                   : Location::NoLocation());
> 
> or:
> 
> locs->set_out(is_used() ? Location::SameAsFirstInput()
>                         : Location::NoLocation());
> 
> or:
> 
> locs->set_out(
>     is_used() ? Location::SameAsFirstInput() : Location::NoLocation());
> 

Done.

Powered by Google App Engine
This is Rietveld 408576698