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

Side by Side Diff: src/compiler/raw-machine-assembler.h

Issue 697663003: [turbofan] Also optimize unsigned division by constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Slight improvement 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.cc » ('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 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 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 5 #ifndef V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 6 #define V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/compiler/common-operator.h" 10 #include "src/compiler/common-operator.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 Node* Projection(int index, Node* a) { 96 Node* Projection(int index, Node* a) {
97 return NewNode(common()->Projection(index), a); 97 return NewNode(common()->Projection(index), a);
98 } 98 }
99 99
100 // Memory Operations. 100 // Memory Operations.
101 Node* Load(MachineType rep, Node* base) { 101 Node* Load(MachineType rep, Node* base) {
102 return Load(rep, base, Int32Constant(0)); 102 return Load(rep, base, Int32Constant(0));
103 } 103 }
104 Node* Load(MachineType rep, Node* base, Node* index) { 104 Node* Load(MachineType rep, Node* base, Node* index) {
105 return NewNode(machine()->Load(rep), base, index); 105 return NewNode(machine()->Load(rep), base, index, graph()->start(),
106 graph()->start());
106 } 107 }
107 void Store(MachineType rep, Node* base, Node* value) { 108 void Store(MachineType rep, Node* base, Node* value) {
108 Store(rep, base, Int32Constant(0), value); 109 Store(rep, base, Int32Constant(0), value);
109 } 110 }
110 void Store(MachineType rep, Node* base, Node* index, Node* value) { 111 void Store(MachineType rep, Node* base, Node* index, Node* value) {
111 NewNode(machine()->Store(StoreRepresentation(rep, kNoWriteBarrier)), base, 112 NewNode(machine()->Store(StoreRepresentation(rep, kNoWriteBarrier)), base,
112 index, value); 113 index, value, graph()->start(), graph()->start());
113 } 114 }
114 // Arithmetic Operations. 115 // Arithmetic Operations.
115 Node* WordAnd(Node* a, Node* b) { 116 Node* WordAnd(Node* a, Node* b) {
116 return NewNode(machine()->WordAnd(), a, b); 117 return NewNode(machine()->WordAnd(), a, b);
117 } 118 }
118 Node* WordOr(Node* a, Node* b) { return NewNode(machine()->WordOr(), a, b); } 119 Node* WordOr(Node* a, Node* b) { return NewNode(machine()->WordOr(), a, b); }
119 Node* WordXor(Node* a, Node* b) { 120 Node* WordXor(Node* a, Node* b) {
120 return NewNode(machine()->WordXor(), a, b); 121 return NewNode(machine()->WordXor(), a, b);
121 } 122 }
122 Node* WordShl(Node* a, Node* b) { 123 Node* WordShl(Node* a, Node* b) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 Node* Int32SubWithOverflow(Node* a, Node* b) { 225 Node* Int32SubWithOverflow(Node* a, Node* b) {
225 return NewNode(machine()->Int32SubWithOverflow(), a, b); 226 return NewNode(machine()->Int32SubWithOverflow(), a, b);
226 } 227 }
227 Node* Int32Mul(Node* a, Node* b) { 228 Node* Int32Mul(Node* a, Node* b) {
228 return NewNode(machine()->Int32Mul(), a, b); 229 return NewNode(machine()->Int32Mul(), a, b);
229 } 230 }
230 Node* Int32MulHigh(Node* a, Node* b) { 231 Node* Int32MulHigh(Node* a, Node* b) {
231 return NewNode(machine()->Int32MulHigh(), a, b); 232 return NewNode(machine()->Int32MulHigh(), a, b);
232 } 233 }
233 Node* Int32Div(Node* a, Node* b) { 234 Node* Int32Div(Node* a, Node* b) {
234 return NewNode(machine()->Int32Div(), a, b); 235 return NewNode(machine()->Int32Div(), a, b, graph()->start());
235 } 236 }
236 Node* Int32Mod(Node* a, Node* b) { 237 Node* Int32Mod(Node* a, Node* b) {
237 return NewNode(machine()->Int32Mod(), a, b); 238 return NewNode(machine()->Int32Mod(), a, b, graph()->start());
238 } 239 }
239 Node* Int32LessThan(Node* a, Node* b) { 240 Node* Int32LessThan(Node* a, Node* b) {
240 return NewNode(machine()->Int32LessThan(), a, b); 241 return NewNode(machine()->Int32LessThan(), a, b);
241 } 242 }
242 Node* Int32LessThanOrEqual(Node* a, Node* b) { 243 Node* Int32LessThanOrEqual(Node* a, Node* b) {
243 return NewNode(machine()->Int32LessThanOrEqual(), a, b); 244 return NewNode(machine()->Int32LessThanOrEqual(), a, b);
244 } 245 }
245 Node* Uint32Div(Node* a, Node* b) { 246 Node* Uint32Div(Node* a, Node* b) {
246 return NewNode(machine()->Uint32Div(), a, b); 247 return NewNode(machine()->Uint32Div(), a, b, graph()->start());
247 } 248 }
248 Node* Uint32LessThan(Node* a, Node* b) { 249 Node* Uint32LessThan(Node* a, Node* b) {
249 return NewNode(machine()->Uint32LessThan(), a, b); 250 return NewNode(machine()->Uint32LessThan(), a, b);
250 } 251 }
251 Node* Uint32LessThanOrEqual(Node* a, Node* b) { 252 Node* Uint32LessThanOrEqual(Node* a, Node* b) {
252 return NewNode(machine()->Uint32LessThanOrEqual(), a, b); 253 return NewNode(machine()->Uint32LessThanOrEqual(), a, b);
253 } 254 }
254 Node* Uint32Mod(Node* a, Node* b) { 255 Node* Uint32Mod(Node* a, Node* b) {
255 return NewNode(machine()->Uint32Mod(), a, b); 256 return NewNode(machine()->Uint32Mod(), a, b, graph()->start());
257 }
258 Node* Uint32MulHigh(Node* a, Node* b) {
259 return NewNode(machine()->Uint32MulHigh(), a, b);
256 } 260 }
257 Node* Int32GreaterThan(Node* a, Node* b) { return Int32LessThan(b, a); } 261 Node* Int32GreaterThan(Node* a, Node* b) { return Int32LessThan(b, a); }
258 Node* Int32GreaterThanOrEqual(Node* a, Node* b) { 262 Node* Int32GreaterThanOrEqual(Node* a, Node* b) {
259 return Int32LessThanOrEqual(b, a); 263 return Int32LessThanOrEqual(b, a);
260 } 264 }
261 Node* Int32Neg(Node* a) { return Int32Sub(Int32Constant(0), a); } 265 Node* Int32Neg(Node* a) { return Int32Sub(Int32Constant(0), a); }
262 266
263 Node* Int64Add(Node* a, Node* b) { 267 Node* Int64Add(Node* a, Node* b) {
264 return NewNode(machine()->Int64Add(), a, b); 268 return NewNode(machine()->Int64Add(), a, b);
265 } 269 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 BasicBlock* current_block_; 455 BasicBlock* current_block_;
452 456
453 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler); 457 DISALLOW_COPY_AND_ASSIGN(RawMachineAssembler);
454 }; 458 };
455 459
456 } // namespace compiler 460 } // namespace compiler
457 } // namespace internal 461 } // namespace internal
458 } // namespace v8 462 } // namespace v8
459 463
460 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_ 464 #endif // V8_COMPILER_RAW_MACHINE_ASSEMBLER_H_
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698