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

Side by Side Diff: src/compiler/instruction-selector-impl.h

Issue 1356283003: [arm64] Optimize fcmp when lhs operand is #0.0 (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « src/compiler/instruction-codes.h ('k') | src/compiler/ppc/code-generator-ppc.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_INSTRUCTION_SELECTOR_IMPL_H_ 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
7 7
8 #include "src/compiler/instruction.h" 8 #include "src/compiler/instruction.h"
9 #include "src/compiler/instruction-selector.h" 9 #include "src/compiler/instruction-selector.h"
10 #include "src/compiler/linkage.h" 10 #include "src/compiler/linkage.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 return false_block_; 284 return false_block_;
285 } 285 }
286 286
287 void Negate() { 287 void Negate() {
288 DCHECK(!IsNone()); 288 DCHECK(!IsNone());
289 condition_ = NegateFlagsCondition(condition_); 289 condition_ = NegateFlagsCondition(condition_);
290 } 290 }
291 291
292 void Commute() { 292 void Commute() {
293 DCHECK(!IsNone()); 293 DCHECK(!IsNone());
294 switch (condition_) { 294 condition_ = CommuteFlagsCondition(condition_);
295 case kEqual:
296 case kNotEqual:
297 case kOverflow:
298 case kNotOverflow:
299 return;
300 case kSignedLessThan:
301 condition_ = kSignedGreaterThan;
302 return;
303 case kSignedGreaterThanOrEqual:
304 condition_ = kSignedLessThanOrEqual;
305 return;
306 case kSignedLessThanOrEqual:
307 condition_ = kSignedGreaterThanOrEqual;
308 return;
309 case kSignedGreaterThan:
310 condition_ = kSignedLessThan;
311 return;
312 case kUnsignedLessThan:
313 condition_ = kUnsignedGreaterThan;
314 return;
315 case kUnsignedGreaterThanOrEqual:
316 condition_ = kUnsignedLessThanOrEqual;
317 return;
318 case kUnsignedLessThanOrEqual:
319 condition_ = kUnsignedGreaterThanOrEqual;
320 return;
321 case kUnsignedGreaterThan:
322 condition_ = kUnsignedLessThan;
323 return;
324 case kUnorderedEqual:
325 case kUnorderedNotEqual:
326 return;
327 }
328 UNREACHABLE();
329 } 295 }
330 296
331 void OverwriteAndNegateIfEqual(FlagsCondition condition) { 297 void OverwriteAndNegateIfEqual(FlagsCondition condition) {
332 bool negate = condition_ == kEqual; 298 bool negate = condition_ == kEqual;
333 condition_ = condition; 299 condition_ = condition;
334 if (negate) Negate(); 300 if (negate) Negate();
335 } 301 }
336 302
337 // Encodes this flags continuation into the given opcode. 303 // Encodes this flags continuation into the given opcode.
338 InstructionCode Encode(InstructionCode opcode) { 304 InstructionCode Encode(InstructionCode opcode) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 : (frame_state_descriptor->GetTotalSize() + 342 : (frame_state_descriptor->GetTotalSize() +
377 1); // Include deopt id. 343 1); // Include deopt id.
378 } 344 }
379 }; 345 };
380 346
381 } // namespace compiler 347 } // namespace compiler
382 } // namespace internal 348 } // namespace internal
383 } // namespace v8 349 } // namespace v8
384 350
385 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ 351 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_
OLDNEW
« no previous file with comments | « src/compiler/instruction-codes.h ('k') | src/compiler/ppc/code-generator-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698