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

Unified Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1418663011: [runtime] Remove the unused weird %Likely and %Unlikely intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/crankshaft/hydrogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index f11e627e72cb23b8aad00fbd575b55ee34c6ea95..379f8b7490263f3cd872a1c8ca3fc0e91850f28f 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -63,8 +63,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceIsSmi(node);
case Runtime::kInlineJSValueGetValue:
return ReduceJSValueGetValue(node);
- case Runtime::kInlineLikely:
- return ReduceUnLikely(node, BranchHint::kTrue);
case Runtime::kInlineMapGetInstanceType:
return ReduceMapGetInstanceType(node);
case Runtime::kInlineMathClz32:
@@ -83,8 +81,6 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceSeqStringGetChar(node, String::TWO_BYTE_ENCODING);
case Runtime::kInlineTwoByteSeqStringSetChar:
return ReduceSeqStringSetChar(node, String::TWO_BYTE_ENCODING);
- case Runtime::kInlineUnlikely:
- return ReduceUnLikely(node, BranchHint::kFalse);
case Runtime::kInlineValueOf:
return ReduceValueOf(node);
case Runtime::kInlineIsMinusZero:
@@ -341,29 +337,6 @@ Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) {
}
-Reduction JSIntrinsicLowering::ReduceUnLikely(Node* node, BranchHint hint) {
- std::stack<Node*> nodes_to_visit;
- nodes_to_visit.push(node);
- while (!nodes_to_visit.empty()) {
- Node* current = nodes_to_visit.top();
- nodes_to_visit.pop();
- for (Node* use : current->uses()) {
- if (use->opcode() == IrOpcode::kJSToBoolean) {
- // We have to "look through" ToBoolean calls.
- nodes_to_visit.push(use);
- } else if (use->opcode() == IrOpcode::kBranch) {
- // Actually set the hint on any branch using the intrinsic node.
- NodeProperties::ChangeOp(use, common()->Branch(hint));
- }
- }
- }
- // Apart from adding hints to branchs nodes, this is the identity function.
- Node* value = NodeProperties::GetValueInput(node, 0);
- ReplaceWithValue(node, value);
- return Changed(value);
-}
-
-
Reduction JSIntrinsicLowering::ReduceValueOf(Node* node) {
// if (%_IsSmi(value)) {
// return value;
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/crankshaft/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698