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

Unified Diff: src/compiler/move-optimizer.cc

Issue 1523393003: [turbofan] move down parallel moves (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/move-optimizer.cc
diff --git a/src/compiler/move-optimizer.cc b/src/compiler/move-optimizer.cc
index e99b5e9ebe4024bb85ac2bf34b220d6e8fdab6fc..8562410443f0b85f391886a320a65c90b4a1a726 100644
--- a/src/compiler/move-optimizer.cc
+++ b/src/compiler/move-optimizer.cc
@@ -91,22 +91,25 @@ MoveOptimizer::MoveOptimizer(Zone* local_zone, InstructionSequence* code)
void MoveOptimizer::Run() {
- for (auto* block : code()->instruction_blocks()) {
+ for (InstructionBlock* block : code()->instruction_blocks()) {
CompressBlock(block);
}
- for (auto block : code()->instruction_blocks()) {
+ for (InstructionBlock* block : code()->instruction_blocks()) {
if (block->PredecessorCount() <= 1) continue;
- bool has_only_deferred = true;
- for (RpoNumber pred_id : block->predecessors()) {
- if (!code()->InstructionBlockAt(pred_id)->IsDeferred()) {
- has_only_deferred = false;
- break;
+ if (!block->IsDeferred()) {
+ bool has_only_deferred = true;
+ for (RpoNumber pred_id : block->predecessors()) {
+ if (!code()->InstructionBlockAt(pred_id)->IsDeferred()) {
+ has_only_deferred = false;
+ break;
+ }
}
+ // This would pull down common moves. If the moves occur in deferred
+ // blocks, and the closest common successor is not deferred, we lose the
+ // optimization of just spilling/filling in deferred blocks, when the
+ // current block is not deferred.
+ if (has_only_deferred) continue;
}
- // This would pull down common moves. If the moves occur in deferred blocks,
- // and the closest common successor is not deferred, we lose the
- // optimization of just spilling/filling in deferred blocks.
- if (has_only_deferred) continue;
OptimizeMerge(block);
}
for (auto gap : to_finalize_) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698