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

Unified Diff: src/compiler/instruction.cc

Issue 754843002: [turbofan] Implement jump threading after register allocation. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month 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
Index: src/compiler/instruction.cc
diff --git a/src/compiler/instruction.cc b/src/compiler/instruction.cc
index 3c617327f4614f972837aba787faa73820254081..5f75687df8d2c528d0e73863b86c8904c6e191ef 100644
--- a/src/compiler/instruction.cc
+++ b/src/compiler/instruction.cc
@@ -120,6 +120,16 @@ bool ParallelMove::IsRedundant() const {
}
+bool GapInstruction::IsRedundant() const {
+ for (int i = GapInstruction::FIRST_INNER_POSITION;
+ i <= GapInstruction::LAST_INNER_POSITION; i++) {
+ if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant())
+ return false;
+ }
+ return true;
+}
+
+
std::ostream& operator<<(std::ostream& os,
const PrintableParallelMove& printable) {
const ParallelMove& pm = *printable.parallel_move_;

Powered by Google App Engine
This is Rietveld 408576698