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

Side by Side Diff: src/hydrogen-instructions.h

Issue 204583002: Implement flooring division by a constant via truncating division by a constant. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 kUseGVN, 617 kUseGVN,
618 // Track instructions that are dominating side effects. If an instruction 618 // Track instructions that are dominating side effects. If an instruction
619 // sets this flag, it must implement HandleSideEffectDominator() and should 619 // sets this flag, it must implement HandleSideEffectDominator() and should
620 // indicate which side effects to track by setting GVN flags. 620 // indicate which side effects to track by setting GVN flags.
621 kTrackSideEffectDominators, 621 kTrackSideEffectDominators,
622 kCanOverflow, 622 kCanOverflow,
623 kBailoutOnMinusZero, 623 kBailoutOnMinusZero,
624 kCanBeDivByZero, 624 kCanBeDivByZero,
625 kLeftCanBeMinInt, 625 kLeftCanBeMinInt,
626 kLeftCanBeNegative, 626 kLeftCanBeNegative,
627 kLeftCanBePositive,
627 kAllowUndefinedAsNaN, 628 kAllowUndefinedAsNaN,
628 kIsArguments, 629 kIsArguments,
629 kTruncatingToInt32, 630 kTruncatingToInt32,
630 kAllUsesTruncatingToInt32, 631 kAllUsesTruncatingToInt32,
631 kTruncatingToSmi, 632 kTruncatingToSmi,
632 kAllUsesTruncatingToSmi, 633 kAllUsesTruncatingToSmi,
633 // Set after an instruction is killed. 634 // Set after an instruction is killed.
634 kIsDead, 635 kIsDead,
635 // Instructions that are allowed to produce full range unsigned integer 636 // Instructions that are allowed to produce full range unsigned integer
636 // values are marked with kUint32 flag. If arithmetic shift or a load from 637 // values are marked with kUint32 flag. If arithmetic shift or a load from
(...skipping 3461 matching lines...) Expand 10 before | Expand all | Expand 10 after
4098 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; } 4099 virtual bool DataEquals(HValue* other) V8_OVERRIDE { return true; }
4099 4100
4100 private: 4101 private:
4101 HMathFloorOfDiv(HValue* context, HValue* left, HValue* right) 4102 HMathFloorOfDiv(HValue* context, HValue* left, HValue* right)
4102 : HBinaryOperation(context, left, right) { 4103 : HBinaryOperation(context, left, right) {
4103 set_representation(Representation::Integer32()); 4104 set_representation(Representation::Integer32());
4104 SetFlag(kUseGVN); 4105 SetFlag(kUseGVN);
4105 SetFlag(kCanOverflow); 4106 SetFlag(kCanOverflow);
4106 SetFlag(kCanBeDivByZero); 4107 SetFlag(kCanBeDivByZero);
4107 SetFlag(kLeftCanBeMinInt); 4108 SetFlag(kLeftCanBeMinInt);
4109 SetFlag(kLeftCanBeNegative);
4110 SetFlag(kLeftCanBePositive);
4108 SetFlag(kAllowUndefinedAsNaN); 4111 SetFlag(kAllowUndefinedAsNaN);
4109 } 4112 }
4110 4113
4111 virtual Range* InferRange(Zone* zone) V8_OVERRIDE; 4114 virtual Range* InferRange(Zone* zone) V8_OVERRIDE;
4112 4115
4113 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 4116 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
4114 }; 4117 };
4115 4118
4116 4119
4117 class HArithmeticBinaryOperation : public HBinaryOperation { 4120 class HArithmeticBinaryOperation : public HBinaryOperation {
(...skipping 3396 matching lines...) Expand 10 before | Expand all | Expand 10 after
7514 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7517 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7515 }; 7518 };
7516 7519
7517 7520
7518 #undef DECLARE_INSTRUCTION 7521 #undef DECLARE_INSTRUCTION
7519 #undef DECLARE_CONCRETE_INSTRUCTION 7522 #undef DECLARE_CONCRETE_INSTRUCTION
7520 7523
7521 } } // namespace v8::internal 7524 } } // namespace v8::internal
7522 7525
7523 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7526 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/arm/lithium-codegen-arm.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698