- 12 Oct, 2021 1 commit
-
-
Jakob Kummerow authored
Walking the dominator tree can be slow when that tree is very deep, and since it's typically done at least once for every BasicBlock, overall cost is approximately quadratic. With some (sparse) caching, we can get significant speedups for very little extra memory consumption. In the specific function I looked at, tree depth was around 11,500, and this patch speeds up the Scheduling phase from 42 seconds to 0.2 seconds, while increasing its memory consumption from 113.1 to 113.4 megabytes. Change-Id: Iaa32d249a30f62269858d090fbd8924d16d3a9f4 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3218157 Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by:
Maya Lekova <mslekova@chromium.org> Cr-Commit-Position: refs/heads/main@{#77356}
-
- 05 May, 2021 1 commit
-
-
Ross McIlroy authored
Simplifies the traversal of nodes in Scheduler::PrepareUses to avoid having to carefully order stack traversal for pre/post ordering visits. Instead simply pre visit when pushing a node onto the stack, then post visit the node when popping it from the stack and then visiting it's inputs. This keeps the same invariants required, but reduces visit overhead. In addition, move checking for CoupledControlEdges out of Increment/DecrementUnscheduledUseCounts such that the coupled control edge calculation only needs to be done once per node, rather than once for every input of the node. Also remove unecessary recursion from these functions. All told, these optimizations reduce the PrepareUses overhead by 40-50%. BUG=v8:9684 Change-Id: I934523a732892a1f66d7e77f8d04e200169080f1 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2863602 Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Nico Hartmann <nicohartmann@chromium.org> Cr-Commit-Position: refs/heads/master@{#74373}
-
- 22 Jul, 2020 1 commit
-
-
Seth Brenith authored
Design doc: https://docs.google.com/document/d/1szInbXZfaErWW70d30hJsOLL0Es-l5_g8d2rXm1ZBqI/edit?usp=sharing V8 can already collect data about how many times each basic block in the builtins is run. This change enables using that data for profile-guided optimization. New comments in BUILD.gn describe how to use this feature. A few implementation details worth mentioning, which aren't covered in the design doc: - BasicBlockProfilerData currently contains an array of RPO numbers. However, this array is always just [0, 1, 2, 3, ...], so this change removes that array. A new DCHECK in BasicBlockInstrumentor::Instrument ensures that the removal is valid. - RPO numbers, while useful for printing data that matches with the stringified schedule, are not useful for matching profiling data with blocks that haven't been scheduled yet. This change adds a new array of block IDs in BasicBlockProfilerData, so that block counters can be used for PGO. - Basic block counters need to be written to a file so that they can be provided to a subsequent run of mksnapshot, but the design doc doesn't specify the transfer format or what file is used. In this change, I propose using the existing v8.log file for that purpose. Block count records look like this: block,TestLessThanHandler,37,29405 This line indicates that block ID 37 in TestLessThanHandler was run 29405 times. If multiple lines refer to the same block, the reader adds them all together. I like this format because it's easy to use: - V8 already has robust logic for creating the log file, naming it to avoid conflicts in multi-process situations, etc. - Line order doesn't matter, and interleaved writes from various logging sources are fine, given that V8 writes each line atomically. - Combining multiple sources of profiling data is as simple as concatenating their v8.log files together. - It is a good idea to avoid making any changes based on profiling data if the function being compiled doesn't match the one that was profiled, since it is common to use profiling data downloaded from a central lab which is updated only periodically. To check whether a function matches, I propose using a hash of the Graph state right before scheduling. This might be stricter than necessary, as some changes to the function might be small enough that the profile data is still relevant, but I'd rather err on the side of not making incorrect changes. This hash is also written to the v8.log file, in a line that looks like this: builtin_hash,LdaZeroHandler,3387822046 Bug: v8:10470 Change-Id: I429e5ce5efa94e01e7489deb3996012cf860cf13 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2220765 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#69008}
-
- 28 Oct, 2019 1 commit
-
-
Ross McIlroy authored
Add support to verify the update schedule after ScheduledEffectControlLinearization and ScheduledMachineLowering phases. To do so, we need to recompute the immediate dominator tree of the scheduled blocks. BUG=v8:9684 Change-Id: I849fb7e3e699ca56c5115d90a53006d517cf3fe5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1881160 Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#64596}
-
- 17 Jul, 2019 1 commit
-
-
Tobias Tebbi authored
This adds a simple counter to Turbofan that's incremented throughout the compilation, hopefully frequently enough so we can use it to detect divergence and performance bugs. In addition, we assert that this counter never gets too high. That's the equivalent of a simple timeout, just more deterministic. The limitations on Turbofan input size should guarantee that we never exceed this limit. Since we probably do exceed it rarely, this check is only a DCHECK and intended to detect performance and divergence issues, but not supposed to be performed in release builds. In addition, this CL adds UMA stats to observe the real world distribution of the tick measurement. Bug: v8:9444 Change-Id: I182dac6ecac64715e3f5885ff5c7c17549351cd0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1695475 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Georg Neis <neis@chromium.org> Reviewed-by:
Michael Stanton <mvstanton@chromium.org> Cr-Commit-Position: refs/heads/master@{#62754}
-
- 24 May, 2019 1 commit
-
-
Yang Guo authored
TBR=mvstanton@chromium.org,neis@chromium.org,ahaas@chromium.org Bug: v8:9247 Change-Id: I5433c863a54f3412d73df0d38aba3fdbcfac7ebe Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627973 Commit-Queue: Yang Guo <yangguo@chromium.org> Auto-Submit: Yang Guo <yangguo@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#61830}
-
- 29 Mar, 2019 1 commit
-
-
Clemens Hammacher authored
Even though both are allowed in the style guide, it recommends to use 'using', as its syntax is more consistent with the rest of C++. This CL turns all typedefs in compiler code to 'using' declarations. R=mstarzinger@chromium.org Bug: v8:8834 Change-Id: I3baf3ecbfe2c853cb17bb479ebbf140382193b5c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1545896 Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#60527}
-
- 26 Nov, 2018 1 commit
-
-
Tobias Tebbi authored
This reverts commit 41ad531f. Reason for revert: https://crbug.com/907498 Original change's description: > [turbofan] in-block scheduling: schedule non-effect-chain nodes late > > By giving higher priority to processing non-effect-chain nodes, this > changes the scheduling inside of basic blocks to place nodes before the > latest possible effect chain node. > > Change-Id: I8b130904a1bb2360b995eb9de4f471a911a4e388 > Reviewed-on: https://chromium-review.googlesource.com/c/1337743 > Commit-Queue: Tobias Tebbi <tebbi@chromium.org> > Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> > Cr-Commit-Position: refs/heads/master@{#57656} TBR=mstarzinger@chromium.org,tebbi@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I76e57a25c157beed364455b0f1b55380305ef6c0 Reviewed-on: https://chromium-review.googlesource.com/c/1350989Reviewed-by:
Tobias Tebbi <tebbi@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#57834}
-
- 20 Nov, 2018 1 commit
-
-
Tobias Tebbi authored
By giving higher priority to processing non-effect-chain nodes, this changes the scheduling inside of basic blocks to place nodes before the latest possible effect chain node. Change-Id: I8b130904a1bb2360b995eb9de4f471a911a4e388 Reviewed-on: https://chromium-review.googlesource.com/c/1337743 Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#57656}
-
- 04 Sep, 2017 1 commit
-
-
Jaroslav Sevcik authored
We encode the reachability/liveness in the placement. After we prepare use counts, the kUnknown placement means that the noe is unreachable. Bug: v8:5267 Change-Id: Iad27159508f0aefb812b6394a257055f789fbe13 Reviewed-on: https://chromium-review.googlesource.com/646247 Commit-Queue: Jaroslav Sevcik <jarin@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#47795}
-
- 27 Mar, 2017 2 commits
-
-
Ross McIlroy authored
When node splitting is enabled new nodes could be created during scheduling. The Scheduler::node_data_ and Schedule::nodeid_to_block_ zone vectors reserve enough space for the node count before splitting, however will have to reallocate space when node splitting occurs. The vectors double in space by default, meaning the peak zone usage is 3x the required amount for these vectors as soon as a single node is split. Avoid this in the common case by reserving 10% extra space for split nodes. The value 10% was choosen since it covers 98.7% of the optimized functions in Octane. BUG=chromium:700364 Change-Id: Ibabd8d04cffd1eb08cc3b8a12b76892208ef3288 Reviewed-on: https://chromium-review.googlesource.com/458425 Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#44153}
-
Ross McIlroy authored
The scheduled_nodes_ vector is used to maintain a per-block list of non-fixed nodes. For most blocks this list remains empty, so lazily initialize it instead of pre-allocating to save memory. Also pre-reserve an extra 10% of blocks to avoid reallocting space in the vector when fusing floating control creates new basic blocks. BUG=chromium:700364 Change-Id: I9876e6a42bc90c9bff5838620365c18609ed1ee9 Reviewed-on: https://chromium-review.googlesource.com/458919Reviewed-by:
Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#44152}
-
- 21 Mar, 2017 1 commit
-
-
Ross McIlroy authored
Also move phi NodeVector in TryCloneBranch to temporary zone. BUG=chromium:700364 Change-Id: Id19d51dae63ed5a6f5dccbba77a19b3663fd325e Reviewed-on: https://chromium-review.googlesource.com/456285Reviewed-by:
Ross McIlroy <rmcilroy@chromium.org> Reviewed-by:
Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Ross McIlroy <rmcilroy@chromium.org> Cr-Commit-Position: refs/heads/master@{#43962}
-
- 17 Oct, 2016 1 commit
-
-
jochen authored
R=machenbach@chromium.org,titzer@chromium.org,bmeurer@chromium.org,jgruber@chromium.org BUG= CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg,v8_mac_dbg;master.tryserver.chromium.android:android_arm64_dbg_recipe Review-Url: https://codereview.chromium.org/2416243002 Cr-Commit-Position: refs/heads/master@{#40350}
-
- 10 Oct, 2016 1 commit
-
-
heimbuef authored
BUG=v8:5409 Committed: https://crrev.com/a124feb0760896c8be61de08004a08c3bc9b4b3f Committed: https://crrev.com/fc840361e357a571c709e0239ae82cc089800b3f Review-Url: https://codereview.chromium.org/2348303002 Cr-Original-Original-Commit-Position: refs/heads/master@{#39633} Cr-Original-Commit-Position: refs/heads/master@{#40048} Cr-Commit-Position: refs/heads/master@{#40138}
-
- 07 Oct, 2016 1 commit
-
-
hablich authored
Revert of Replaced different means of zone pooling/reusing by one zone segment pool (patchset #5 id:160001 of https://codereview.chromium.org/2348303002/ ) Reason for revert: related to roll blocker: https://codereview.chromium.org/2400343002/ Original issue's description: > Replaced different means of zone pooling/reusing by one zone segment pool > > BUG=v8:5409 > > Committed: https://crrev.com/a124feb0760896c8be61de08004a08c3bc9b4b3f > Committed: https://crrev.com/fc840361e357a571c709e0239ae82cc089800b3f > Cr-Original-Commit-Position: refs/heads/master@{#39633} > Cr-Commit-Position: refs/heads/master@{#40048} TBR=mstarzinger@chromium.org,verwaest@chromium.org,heimbuef@google.com NOTRY=true NOPRESUBMIT=true NOTREECHECKS=true BUG=v8:5409 Review-Url: https://codereview.chromium.org/2401163002 Cr-Commit-Position: refs/heads/master@{#40099}
-
- 06 Oct, 2016 1 commit
-
-
heimbuef authored
BUG=v8:5409 Committed: https://crrev.com/a124feb0760896c8be61de08004a08c3bc9b4b3f Review-Url: https://codereview.chromium.org/2348303002 Cr-Original-Commit-Position: refs/heads/master@{#39633} Cr-Commit-Position: refs/heads/master@{#40048}
-
- 23 Sep, 2016 1 commit
-
-
hablich authored
Revert of Replaced different means of zone pooling/reusing by one zone segment pool (patchset #3 id:120001 of https://codereview.chromium.org/2348303002/ ) Reason for revert: Blocks Roll https://codereview.chromium.org/2366733002/ Original issue's description: > Replaced different means of zone pooling/reusing by one zone segment pool > > BUG=v8:5409 > > Committed: https://crrev.com/a124feb0760896c8be61de08004a08c3bc9b4b3f > Cr-Commit-Position: refs/heads/master@{#39633} TBR=mstarzinger@chromium.org,verwaest@chromium.org,heimbuef@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=v8:5409 Review-Url: https://codereview.chromium.org/2360403003 Cr-Commit-Position: refs/heads/master@{#39651}
-
- 22 Sep, 2016 1 commit
-
-
heimbuef authored
BUG=v8:5409 Review-Url: https://codereview.chromium.org/2348303002 Cr-Commit-Position: refs/heads/master@{#39633}
-
- 20 Sep, 2016 1 commit
-
-
heimbuef authored
This is some initial cleanup to keep /src clean. The AccountingAllocator is actually exclusively used by zones and this common subfolder makes that more clear. BUG=v8:5409 Review-Url: https://codereview.chromium.org/2344143003 Cr-Commit-Position: refs/heads/master@{#39558}
-
- 09 Feb, 2015 1 commit
-
-
mstarzinger authored
R=bmeurer@chromium.org TEST=presubmit Review URL: https://codereview.chromium.org/905293002 Cr-Commit-Position: refs/heads/master@{#26525}
-
- 03 Feb, 2015 1 commit
-
-
Benedikt Meurer authored
If a (pure) node has two or more uses, but there exists a path from the common dominator of these uses to end, which does not contain a use, then we split the node such that no unnecessary computation takes place. Note however, that this only applies if the node cannot be hoisted out of a loop. BUG=v8:3864 LOG=n R=jarin@chromium.org Review URL: https://codereview.chromium.org/899433005 Cr-Commit-Position: refs/heads/master@{#26404}
-
- 23 Jan, 2015 1 commit
-
-
bmeurer authored
Also add some unittests for the dominator stuff. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/865393004 Cr-Commit-Position: refs/heads/master@{#26241}
-
- 22 Jan, 2015 1 commit
-
-
bmeurer authored
- Move unit tests to schedule-unittests.cc. - Remove pre-C++11 cruft. - Fix some include weirdness. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/864293002 Cr-Commit-Position: refs/heads/master@{#26220}
-
- 02 Dec, 2014 2 commits
-
-
mstarzinger authored
R=titzer@chromium.org Review URL: https://codereview.chromium.org/753063004 Cr-Commit-Position: refs/heads/master@{#25622}
-
mstarzinger authored
R=jarin@chromium.org TEST=cctest/test-scheduler/NestedFloatingDiamondWithChain Review URL: https://codereview.chromium.org/738613005 Cr-Commit-Position: refs/heads/master@{#25621}
-
- 27 Nov, 2014 1 commit
-
-
mstarzinger authored
R=titzer@chromium.org Review URL: https://codereview.chromium.org/761673004 Cr-Commit-Position: refs/heads/master@{#25543}
-
- 26 Nov, 2014 1 commit
-
-
mstarzinger authored
R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/755353003 Cr-Commit-Position: refs/heads/master@{#25525}
-
- 11 Nov, 2014 1 commit
-
-
mstarzinger@chromium.org authored
R=dcarney@chromium.org Review URL: https://codereview.chromium.org/711413002 Cr-Commit-Position: refs/heads/master@{#25265} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25265 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 05 Nov, 2014 1 commit
-
-
mstarzinger@chromium.org authored
This contains the following changes squashed together: - Switch BasicBlock::loop_end to be a basic block instead of an RPO. - Switch ScheduleLate to use dominator depth instead of RPO. - Switch ScheduleEarly to use dominator depth instead of RPO. - Push out absolute RPO ordering everywhere else in the scheduler. - Keep linked list of blocks in RPO order while scheduling. - Switch from RPO number to depth for dominator calculation. R=jarin@chromium.org Review URL: https://codereview.chromium.org/696363002 Cr-Commit-Position: refs/heads/master@{#25138} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25138 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 29 Oct, 2014 2 commits
-
-
mstarzinger@chromium.org authored
R=titzer@chromium.org, jarin@chromium.org Review URL: https://codereview.chromium.org/687133003 Cr-Commit-Position: refs/heads/master@{#24991} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24991 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
mstarzinger@chromium.org authored
R=jarin@chromium.org Review URL: https://codereview.chromium.org/685773002 Cr-Commit-Position: refs/heads/master@{#24968} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24968 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 23 Oct, 2014 2 commits
-
-
mstarzinger@chromium.org authored
R=jarin@chromium.org Review URL: https://codereview.chromium.org/673753003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24853 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
mstarzinger@chromium.org authored
R=jarin@chromium.org Review URL: https://codereview.chromium.org/673513004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24833 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 21 Oct, 2014 3 commits
-
-
mstarzinger@chromium.org authored
TBR=jarin@chromium.org Review URL: https://codereview.chromium.org/654583004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24782 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
mstarzinger@chromium.org authored
R=jarin@chromium.org Review URL: https://codereview.chromium.org/669683002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24781 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
dcarney@chromium.org authored
R=bmeurer@chromium.org BUG= Review URL: https://codereview.chromium.org/665893006 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24771 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
- 13 Oct, 2014 3 commits
-
-
mstarzinger@chromium.org authored
R=jarin@chromium.org Review URL: https://codereview.chromium.org/649203002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24568 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
sigurds@chromium.org authored
This reverts commit 0ab306041a6eba99fe5e2ef78251de137321f559. "Fix" make scheduler run out of memory. TBR=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/656473002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24566 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-
sigurds@chromium.org authored
The scheduler rewires control based on the last *control* node that appears in the schedule of a block. This is not sufficient to account for dependencies. This patch adds additional dependencies to floating control nodes. Given a floating control node A, every non-control dependency of every node B that depends on A is introduces as an additional dependency of A. This allows the scheduler to correctly schedule two diamonds A, B, if their only correct schedule is to schedule B into the ifTrue successor in A. TEST=cctest/test-scheduler/NestedFloatingDiamonds R=mstarzinger@chromium.org, titzer@chromium.org Review URL: https://codereview.chromium.org/602083003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24561 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
-