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

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: Broader check for host and target arch wanting separate toolchain. 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
« no previous file with comments | « no previous file | gypfiles/standalone.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 } 79 }
80 } 80 }
81 if (v8_enable_gdbjit == "") { 81 if (v8_enable_gdbjit == "") {
82 if (defined(v8_enable_gdbjit_default)) { 82 if (defined(v8_enable_gdbjit_default)) {
83 v8_enable_gdbjit = v8_enable_gdbjit_default 83 v8_enable_gdbjit = v8_enable_gdbjit_default
84 } else { 84 } else {
85 v8_enable_gdbjit = false 85 v8_enable_gdbjit = false
86 } 86 }
87 } 87 }
88 88
89 v8_generated_peephole_source = "$target_gen_dir/bytecode-peephole-table.cc"
89 v8_random_seed = "314159265" 90 v8_random_seed = "314159265"
90 v8_toolset_for_shell = "host" 91 v8_toolset_for_shell = "host"
91 92
92 ############################################################################### 93 ###############################################################################
93 # Configurations 94 # Configurations
94 # 95 #
95 config("internal_config") { 96 config("internal_config") {
96 visibility = [ ":*" ] # Only targets in this file can depend on this. 97 visibility = [ ":*" ] # Only targets in this file can depend on this.
97 98
98 include_dirs = [ "." ] 99 include_dirs = [ "." ]
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after
642 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir), 643 rebase_path("$root_out_dir/snapshot_blob.bin", root_build_dir),
643 ] 644 ]
644 } 645 }
645 646
646 if (v8_embed_script != "") { 647 if (v8_embed_script != "") {
647 sources += [ v8_embed_script ] 648 sources += [ v8_embed_script ]
648 args += [ rebase_path(v8_embed_script, root_build_dir) ] 649 args += [ rebase_path(v8_embed_script, root_build_dir) ]
649 } 650 }
650 } 651 }
651 652
653 action("run_mkpeephole") {
654 visibility = [ ":*" ] # Only targets in this file can depend on this.
655
656 deps = [ ":mkpeephole($v8_snapshot_toolchain)" ]
657
658 outputs = [ v8_generated_peephole_source ]
659
660 sources = []
661
662 script = "tools/run.py"
663
664 args = [
665 "./" + rebase_path(get_label_info(":mkpeephole($v8_snapshot_toolchain)",
666 "root_out_dir") + "/mkpeephole",
667 root_build_dir),
668 rebase_path(v8_generated_peephole_source, root_build_dir),
669 ]
670 }
671
652 action("v8_dump_build_config") { 672 action("v8_dump_build_config") {
653 script = "tools/testrunner/utils/dump_build_config.py" 673 script = "tools/testrunner/utils/dump_build_config.py"
654 outputs = [ 674 outputs = [
655 "$root_out_dir/v8_build_config.json", 675 "$root_out_dir/v8_build_config.json",
656 ] 676 ]
657 args = [ 677 args = [
658 rebase_path("$root_out_dir/v8_build_config.json", root_build_dir), 678 rebase_path("$root_out_dir/v8_build_config.json", root_build_dir),
659 "dcheck_always_on=$dcheck_always_on", 679 "dcheck_always_on=$dcheck_always_on",
660 "is_asan=$is_asan", 680 "is_asan=$is_asan",
661 "is_cfi=$is_cfi", 681 "is_cfi=$is_cfi",
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1304 "src/interpreter/bytecode-dead-code-optimizer.h", 1324 "src/interpreter/bytecode-dead-code-optimizer.h",
1305 "src/interpreter/bytecode-decoder.cc", 1325 "src/interpreter/bytecode-decoder.cc",
1306 "src/interpreter/bytecode-decoder.h", 1326 "src/interpreter/bytecode-decoder.h",
1307 "src/interpreter/bytecode-flags.cc", 1327 "src/interpreter/bytecode-flags.cc",
1308 "src/interpreter/bytecode-flags.h", 1328 "src/interpreter/bytecode-flags.h",
1309 "src/interpreter/bytecode-generator.cc", 1329 "src/interpreter/bytecode-generator.cc",
1310 "src/interpreter/bytecode-generator.h", 1330 "src/interpreter/bytecode-generator.h",
1311 "src/interpreter/bytecode-label.h", 1331 "src/interpreter/bytecode-label.h",
1312 "src/interpreter/bytecode-peephole-optimizer.cc", 1332 "src/interpreter/bytecode-peephole-optimizer.cc",
1313 "src/interpreter/bytecode-peephole-optimizer.h", 1333 "src/interpreter/bytecode-peephole-optimizer.h",
1334 "src/interpreter/bytecode-peephole-table.h",
1314 "src/interpreter/bytecode-pipeline.cc", 1335 "src/interpreter/bytecode-pipeline.cc",
1315 "src/interpreter/bytecode-pipeline.h", 1336 "src/interpreter/bytecode-pipeline.h",
1316 "src/interpreter/bytecode-register-allocator.cc", 1337 "src/interpreter/bytecode-register-allocator.cc",
1317 "src/interpreter/bytecode-register-allocator.h", 1338 "src/interpreter/bytecode-register-allocator.h",
1318 "src/interpreter/bytecode-register-optimizer.cc", 1339 "src/interpreter/bytecode-register-optimizer.cc",
1319 "src/interpreter/bytecode-register-optimizer.h", 1340 "src/interpreter/bytecode-register-optimizer.h",
1320 "src/interpreter/bytecode-register.cc", 1341 "src/interpreter/bytecode-register.cc",
1321 "src/interpreter/bytecode-register.h", 1342 "src/interpreter/bytecode-register.h",
1322 "src/interpreter/bytecode-traits.h", 1343 "src/interpreter/bytecode-traits.h",
1323 "src/interpreter/bytecodes.cc", 1344 "src/interpreter/bytecodes.cc",
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1902 } 1923 }
1903 1924
1904 configs = [ ":internal_config" ] 1925 configs = [ ":internal_config" ]
1905 1926
1906 defines = [] 1927 defines = []
1907 deps = [ 1928 deps = [
1908 ":v8_libbase", 1929 ":v8_libbase",
1909 ":v8_libsampler", 1930 ":v8_libsampler",
1910 ] 1931 ]
1911 1932
1933 sources += [ v8_generated_peephole_source ]
1934 deps += [ ":run_mkpeephole" ]
1935
1912 if (is_win) { 1936 if (is_win) {
1913 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. 1937 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
1914 cflags = [ "/wd4267" ] 1938 cflags = [ "/wd4267" ]
1915 } 1939 }
1916 1940
1917 if (v8_enable_i18n_support) { 1941 if (v8_enable_i18n_support) {
1918 deps += [ "//third_party/icu" ] 1942 deps += [ "//third_party/icu" ]
1919 if (is_win) { 1943 if (is_win) {
1920 deps += [ "//third_party/icu:icudata" ] 1944 deps += [ "//third_party/icu:icudata" ]
1921 } 1945 }
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
2125 deps = [ 2149 deps = [
2126 ":v8_base", 2150 ":v8_base",
2127 ":v8_libplatform", 2151 ":v8_libplatform",
2128 ":v8_nosnapshot", 2152 ":v8_nosnapshot",
2129 "//build/config/sanitizers:deps", 2153 "//build/config/sanitizers:deps",
2130 "//build/win:default_exe_manifest", 2154 "//build/win:default_exe_manifest",
2131 ] 2155 ]
2132 } 2156 }
2133 } 2157 }
2134 2158
2159 v8_executable("mkpeephole") {
2160 # mkpeephole needs to be built for the build host so the peephole lookup
2161 # table can built during build. The table depends on the properties of
2162 # bytecodes that are described in bytecodes.{cc,h}.
2163 visibility = [ ":*" ] # Only targets in this file can depend on this.
2164
2165 sources = [
2166 "src/interpreter/bytecode-peephole-optimizer.h",
2167 "src/interpreter/bytecodes.cc",
2168 "src/interpreter/bytecodes.h",
2169 "src/interpreter/mkpeephole.cc",
2170 ]
2171
2172 configs = [
2173 ":external_config",
2174 ":internal_config",
2175 ]
2176
2177 deps = [
2178 ":v8_libbase",
2179 "//build/config/sanitizers:deps",
2180 "//build/win:default_exe_manifest",
2181 ]
2182 }
2183
2135 ############################################################################### 2184 ###############################################################################
2136 # Public targets 2185 # Public targets
2137 # 2186 #
2138 2187
2139 want_v8_shell = 2188 want_v8_shell =
2140 (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") || 2189 (current_toolchain == host_toolchain && v8_toolset_for_shell == "host") ||
2141 (current_toolchain == v8_snapshot_toolchain && 2190 (current_toolchain == v8_snapshot_toolchain &&
2142 v8_toolset_for_shell == "host") || 2191 v8_toolset_for_shell == "host") ||
2143 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target") 2192 (current_toolchain != host_toolchain && v8_toolset_for_shell == "target")
2144 2193
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2431 2480
2432 deps = [ 2481 deps = [
2433 ":fuzzer_support", 2482 ":fuzzer_support",
2434 ] 2483 ]
2435 2484
2436 configs = [ ":internal_config" ] 2485 configs = [ ":internal_config" ]
2437 } 2486 }
2438 2487
2439 v8_fuzzer("wasm_asmjs_fuzzer") { 2488 v8_fuzzer("wasm_asmjs_fuzzer") {
2440 } 2489 }
OLDNEW
« no previous file with comments | « no previous file | gypfiles/standalone.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698