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

Side by Side Diff: BUILD.gn

Issue 2118183002: [interpeter] Move to table based peephole optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Minor renaming and re-grouping. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/arm.gni") 6 import("//build/config/arm.gni")
7 import("//build/config/dcheck_always_on.gni") 7 import("//build/config/dcheck_always_on.gni")
8 import("//build/config/mips.gni") 8 import("//build/config/mips.gni")
9 import("//build/config/sanitizers/sanitizers.gni") 9 import("//build/config/sanitizers/sanitizers.gni")
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 # tools/gen-postmortem-metadata.py for details. 62 # tools/gen-postmortem-metadata.py for details.
63 v8_postmortem_support = false 63 v8_postmortem_support = false
64 64
65 # Similar to vfp but on MIPS. 65 # Similar to vfp but on MIPS.
66 v8_can_use_fpu_instructions = true 66 v8_can_use_fpu_instructions = true
67 67
68 # Similar to the ARM hard float ABI but on MIPS. 68 # Similar to the ARM hard float ABI but on MIPS.
69 v8_use_mips_abi_hardfloat = true 69 v8_use_mips_abi_hardfloat = true
70 } 70 }
71 71
72 v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc"
72 v8_random_seed = "314159265" 73 v8_random_seed = "314159265"
73 v8_toolset_for_shell = "host" 74 v8_toolset_for_shell = "host"
74 75
75 ############################################################################### 76 ###############################################################################
76 # Configurations 77 # Configurations
77 # 78 #
78 config("internal_config") { 79 config("internal_config") {
79 visibility = [ ":*" ] # Only targets in this file can depend on this. 80 visibility = [ ":*" ] # Only targets in this file can depend on this.
80 81
81 include_dirs = [ "." ] 82 include_dirs = [ "." ]
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), 626 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir),
626 ] 627 ]
627 } 628 }
628 629
629 if (v8_embed_script != "") { 630 if (v8_embed_script != "") {
630 sources += [ v8_embed_script ] 631 sources += [ v8_embed_script ]
631 args += [ rebase_path(v8_embed_script, root_build_dir) ] 632 args += [ rebase_path(v8_embed_script, root_build_dir) ]
632 } 633 }
633 } 634 }
634 635
636 action("run_mkpeephole") {
637 visibility = [ ":*" ] # Only targets in this file can depend on this.
638
639 deps = [ ":mkpeephole($v8_snapshot_toolchain)" ]
640
641 outputs = [ v8_generated_peephole_source ]
642
643 sources = []
644
645 script = "tools/run.py"
646
647 args = [
648 "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)",
649 "root_out_dir") + "/mkpeephole",
650 root_build_dir),
651 rebase_path(v8_generated_peephole_source, root_build_dir),
652 ]
653 }
654
635 action("v8_dump_build_config") { 655 action("v8_dump_build_config") {
636 script = "tools/testrunner/utils/dump_build_config.py" 656 script = "tools/testrunner/utils/dump_build_config.py"
637 outputs = [ 657 outputs = [
638 "$root_out_dir/v8_build_config.json", 658 "$root_out_dir/v8_build_config.json",
639 ] 659 ]
640 args = [ 660 args = [
641 rebase_path("$root_out_dir/v8_build_config.json", root_build_dir), 661 rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
642 "dcheck_always_on=$dcheck_always_on", 662 "dcheck_always_on=$dcheck_always_on",
643 "is_asan=$is_asan", 663 "is_asan=$is_asan",
644 "is_cfi=$is_cfi", 664 "is_cfi=$is_cfi",
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 "src/interpreter/bytecode-dead-code-optimizer.h", 1303 "src/interpreter/bytecode-dead-code-optimizer.h",
1284 "src/interpreter/bytecode-decoder.cc", 1304 "src/interpreter/bytecode-decoder.cc",
1285 "src/interpreter/bytecode-decoder.h", 1305 "src/interpreter/bytecode-decoder.h",
1286 "src/interpreter/bytecode-flags.cc", 1306 "src/interpreter/bytecode-flags.cc",
1287 "src/interpreter/bytecode-flags.h", 1307 "src/interpreter/bytecode-flags.h",
1288 "src/interpreter/bytecode-generator.cc", 1308 "src/interpreter/bytecode-generator.cc",
1289 "src/interpreter/bytecode-generator.h", 1309 "src/interpreter/bytecode-generator.h",
1290 "src/interpreter/bytecode-label.h", 1310 "src/interpreter/bytecode-label.h",
1291 "src/interpreter/bytecode-peephole-optimizer.cc", 1311 "src/interpreter/bytecode-peephole-optimizer.cc",
1292 "src/interpreter/bytecode-peephole-optimizer.h", 1312 "src/interpreter/bytecode-peephole-optimizer.h",
1313 "src/interpreter/bytecode-peephole-table.h",
1293 "src/interpreter/bytecode-pipeline.cc", 1314 "src/interpreter/bytecode-pipeline.cc",
1294 "src/interpreter/bytecode-pipeline.h", 1315 "src/interpreter/bytecode-pipeline.h",
1295 "src/interpreter/bytecode-register-allocator.cc", 1316 "src/interpreter/bytecode-register-allocator.cc",
1296 "src/interpreter/bytecode-register-allocator.h", 1317 "src/interpreter/bytecode-register-allocator.h",
1297 "src/interpreter/bytecode-register-optimizer.cc", 1318 "src/interpreter/bytecode-register-optimizer.cc",
1298 "src/interpreter/bytecode-register-optimizer.h", 1319 "src/interpreter/bytecode-register-optimizer.h",
1299 "src/interpreter/bytecode-register.cc", 1320 "src/interpreter/bytecode-register.cc",
1300 "src/interpreter/bytecode-register.h", 1321 "src/interpreter/bytecode-register.h",
1301 "src/interpreter/bytecode-traits.h", 1322 "src/interpreter/bytecode-traits.h",
1302 "src/interpreter/bytecodes.cc", 1323 "src/interpreter/bytecodes.cc",
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 } 1893 }
1873 1894
1874 configs = [ ":internal_config" ] 1895 configs = [ ":internal_config" ]
1875 1896
1876 defines = [] 1897 defines = []
1877 deps = [ 1898 deps = [
1878 ":v8_libbase", 1899 ":v8_libbase",
1879 ":v8_libsampler", 1900 ":v8_libsampler",
1880 ] 1901 ]
1881 1902
1903 sources += [ v8_generated_peephole_source ]
1904 deps += [ ":run_mkpeephole" ]
1905
1882 if (is_win) { 1906 if (is_win) {
1883 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1907 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1884 cflags = [ "/wd4267" ] 1908 cflags = [ "/wd4267" ]
1885 } 1909 }
1886 1910
1887 if (v8_enable_i18n_support) { 1911 if (v8_enable_i18n_support) {
1888 deps += [ "//third_party/icu" ] 1912 deps += [ "//third_party/icu" ]
1889 if (is_win) { 1913 if (is_win) {
1890 deps += [ "//third_party/icu:icudata" ] 1914 deps += [ "//third_party/icu:icudata" ]
1891 } 1915 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2095 deps = [ 2119 deps = [
2096 ":v8_base", 2120 ":v8_base",
2097 ":v8_libplatform", 2121 ":v8_libplatform",
2098 ":v8_nosnapshot", 2122 ":v8_nosnapshot",
2099 "//build/config/sanitizers:deps", 2123 "//build/config/sanitizers:deps",
2100 "//build/win:default_exe_manifest", 2124 "//build/win:default_exe_manifest",
2101 ] 2125 ]
2102 } 2126 }
2103 } 2127 }
2104 2128
2129 v8_executable("mkpeephole") {
2130 # mkpeephole needs to be built for the build host so the peephole lookup
2131 # table can built during build. The table depends on the properties of
2132 # bytecodes that are described in bytecodes.{cc,h}.
2133 visibility = [ ":*" ] # Only targets in this file can depend on this.
2134
2135 sources = [
2136 "src/interpreter/bytecode-peephole-optimizer.h",
2137 "src/interpreter/bytecodes.cc",
2138 "src/interpreter/bytecodes.h",
2139 "src/interpreter/mkpeephole.cc",
2140 ]
2141
2142 configs = [
2143 ":external_config",
2144 ":internal_config"
2145 ]
2146
2147 deps = [
2148 ":v8_libbase",
2149 "//build/config/sanitizers:deps",
2150 "//build/win:default_exe_manifest",
2151 ]
2152 }
2153
2105 ############################################################################### 2154 ###############################################################################
2106 # Public targets 2155 # Public targets
2107 # 2156 #
2108 2157
2109 want_v8_shell = 2158 want_v8_shell =
2110 (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || 2159 (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
2111 (current_toolchain == v8_snapshot_toolchain && 2160 (current_toolchain == v8_snapshot_toolchain &&
2112 v8_toolset_for_shell == "host") || 2161 v8_toolset_for_shell == "host") ||
2113 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target") 2162 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
2114 2163
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2401 2450
2402 deps = [ 2451 deps = [
2403 ":fuzzer_support", 2452 ":fuzzer_support",
2404 ] 2453 ]
2405 2454
2406 configs = [ ":internal_config" ] 2455 configs = [ ":internal_config" ]
2407 } 2456 }
2408 2457
2409 v8_fuzzer("wasm_asmjs_fuzzer") { 2458 v8_fuzzer("wasm_asmjs_fuzzer") {
2410 } 2459 }
OLDNEW
« no previous file with comments | « no previous file | src/interpreter/bytecode-peephole-optimizer.h » ('j') | src/interpreter/bytecode-peephole-optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698