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

Side by Side Diff: test/cctest/compiler/test-jump-threading.cc

Issue 1642823002: [turbofan] Jump threading awareness of frame elision. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« src/compiler/pipeline.cc ('K') | « src/compiler/pipeline.cc ('k') | no next file » | 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 V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project 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 #include "src/compiler/instruction.h" 5 #include "src/compiler/instruction.h"
6 #include "src/compiler/instruction-codes.h" 6 #include "src/compiler/instruction-codes.h"
7 #include "src/compiler/jump-threading.h" 7 #include "src/compiler/jump-threading.h"
8 #include "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 sequence_.InstructionAt(index) 101 sequence_.InstructionAt(index)
102 ->GetOrCreateParallelMove(Instruction::START, main_zone()) 102 ->GetOrCreateParallelMove(Instruction::START, main_zone())
103 ->AddMove(from, to); 103 ->AddMove(from, to);
104 } 104 }
105 }; 105 };
106 106
107 107
108 void VerifyForwarding(TestCode& code, int count, int* expected) { 108 void VerifyForwarding(TestCode& code, int count, int* expected) {
109 Zone local_zone; 109 Zone local_zone;
110 ZoneVector<RpoNumber> result(&local_zone); 110 ZoneVector<RpoNumber> result(&local_zone);
111 JumpThreading::ComputeForwarding(&local_zone, result, &code.sequence_); 111 JumpThreading::ComputeForwarding(&local_zone, result, &code.sequence_, true);
112 112
113 CHECK(count == static_cast<int>(result.size())); 113 CHECK(count == static_cast<int>(result.size()));
114 for (int i = 0; i < count; i++) { 114 for (int i = 0; i < count; i++) {
115 CHECK(expected[i] == result[i].ToInt()); 115 CHECK(expected[i] == result[i].ToInt());
116 } 116 }
117 } 117 }
118 118
119 119
120 TEST(FwEmpty1) { 120 TEST(FwEmpty1) {
121 TestCode code; 121 TestCode code;
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 for (int k = 4; k < 5; k++) assembly[k]--; 759 for (int k = 4; k < 5; k++) assembly[k]--;
760 } 760 }
761 CheckAssemblyOrder(code, 5, assembly); 761 CheckAssemblyOrder(code, 5, assembly);
762 } 762 }
763 } 763 }
764 } 764 }
765 765
766 } // namespace compiler 766 } // namespace compiler
767 } // namespace internal 767 } // namespace internal
768 } // namespace v8 768 } // namespace v8
OLDNEW
« src/compiler/pipeline.cc ('K') | « src/compiler/pipeline.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698