 Chromium Code Reviews
 Chromium Code Reviews Issue 2118183002:
  [interpeter] Move to table based peephole optimizer.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master
    
  
    Issue 2118183002:
  [interpeter] Move to table based peephole optimizer.  (Closed) 
  Base URL: https://chromium.googlesource.com/v8/v8.git@master| Index: BUILD.gn | 
| diff --git a/BUILD.gn b/BUILD.gn | 
| index a11b1467e286fdc799183bca0d3c358bc29fcb31..63fdc79733b89901706c880ec47e5e55c6bf228b 100644 | 
| --- a/BUILD.gn | 
| +++ b/BUILD.gn | 
| @@ -71,6 +71,7 @@ declare_args() { | 
| v8_random_seed = "314159265" | 
| v8_toolset_for_shell = "host" | 
| +generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc" | 
| ############################################################################### | 
| # Configurations | 
| @@ -632,6 +633,29 @@ action("run_mksnapshot") { | 
| } | 
| } | 
| +action("run_mkpeephole") { | 
| + visibility = [ ":*" ] # Only targets in this file can depend on this. | 
| + | 
| + deps = [ | 
| + ":mkpeephole($v8_snapshot_toolchain)", | 
| + ] | 
| + | 
| + outputs = [ | 
| + generated_peephole_source | 
| + ] | 
| + | 
| + sources = [] | 
| + | 
| + script = "tools/run.py" | 
| + | 
| + args = [ | 
| + "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)", | 
| + "root_out_dir") + "/mkpeephole", | 
| + root_build_dir), | 
| + rebase_path(generated_peephole_source, root_build_dir), | 
| + ] | 
| +} | 
| + | 
| action("v8_dump_build_config") { | 
| script = "tools/testrunner/utils/dump_build_config.py" | 
| outputs = [ | 
| @@ -1286,6 +1310,7 @@ v8_source_set("v8_base") { | 
| "src/interpreter/bytecode-label.h", | 
| "src/interpreter/bytecode-peephole-optimizer.cc", | 
| "src/interpreter/bytecode-peephole-optimizer.h", | 
| + "src/interpreter/bytecode-peephole-table.h", | 
| "src/interpreter/bytecode-pipeline.cc", | 
| "src/interpreter/bytecode-pipeline.h", | 
| "src/interpreter/bytecode-register-allocator.cc", | 
| @@ -1871,8 +1896,11 @@ v8_source_set("v8_base") { | 
| deps = [ | 
| ":v8_libbase", | 
| ":v8_libsampler", | 
| + ":run_mkpeephole", | 
| ] | 
| + sources += [ generated_peephole_source ] | 
| + | 
| if (is_win) { | 
| # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. | 
| cflags = [ "/wd4267" ] | 
| @@ -2096,6 +2124,26 @@ if (current_toolchain == v8_snapshot_toolchain) { | 
| } | 
| } | 
| +v8_executable("mkpeephole") { | 
| + # mkpeephole needs to be built for the build host so the peephole lookup | 
| + # table can built during build. The table depends on the properties of | 
| + # bytecodes that are described in bytecodes.{cc,h}. | 
| + visibility = [ ":*" ] # Only targets in this file can depend on this. | 
| + | 
| + sources = [ | 
| + "src/interpreter/bytecode-peephole-optimizer.h", | 
| + "src/interpreter/bytecodes.cc", | 
| + "src/interpreter/bytecodes.h", | 
| + "src/interpreter/mkpeephole.cc", | 
| + ] | 
| + | 
| + configs = [ ":internal_config" ] | 
| 
Michael Achenbach
2016/07/11 10:54:07
You also need ":external_config" like in other exe
 
oth
2016/07/12 10:08:53
Ack, done. Thanks!
 | 
| + | 
| + deps = [ | 
| + ":v8_libbase", | 
| 
Michael Achenbach
2016/07/11 14:08:40
also "//build/win:default_exe_manifest" should be
 
oth
2016/07/12 10:08:53
Ack, done. Thanks!
 | 
| + ] | 
| +} | 
| + | 
| ############################################################################### | 
| # Public targets | 
| # |