| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/load-elimination.h" | 5 #include "src/compiler/load-elimination.h" |
| 6 | 6 |
| 7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
| 9 #include "src/compiler/node-properties.h" | 9 #include "src/compiler/node-properties.h" |
| 10 #include "src/compiler/simplified-operator.h" | 10 #include "src/compiler/simplified-operator.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 case IrOpcode::kAllocate: | 30 case IrOpcode::kAllocate: |
| 31 case IrOpcode::kHeapConstant: | 31 case IrOpcode::kHeapConstant: |
| 32 case IrOpcode::kParameter: | 32 case IrOpcode::kParameter: |
| 33 return kNoAlias; | 33 return kNoAlias; |
| 34 default: | 34 default: |
| 35 break; | 35 break; |
| 36 } | 36 } |
| 37 break; | 37 break; |
| 38 } | 38 } |
| 39 case IrOpcode::kFinishRegion: | 39 case IrOpcode::kFinishRegion: |
| 40 case IrOpcode::kTypeGuard: |
| 40 return QueryAlias(a, b->InputAt(0)); | 41 return QueryAlias(a, b->InputAt(0)); |
| 41 default: | 42 default: |
| 42 break; | 43 break; |
| 43 } | 44 } |
| 44 switch (a->opcode()) { | 45 switch (a->opcode()) { |
| 45 case IrOpcode::kAllocate: { | 46 case IrOpcode::kAllocate: { |
| 46 switch (b->opcode()) { | 47 switch (b->opcode()) { |
| 47 case IrOpcode::kHeapConstant: | 48 case IrOpcode::kHeapConstant: |
| 48 case IrOpcode::kParameter: | 49 case IrOpcode::kParameter: |
| 49 return kNoAlias; | 50 return kNoAlias; |
| 50 default: | 51 default: |
| 51 break; | 52 break; |
| 52 } | 53 } |
| 53 break; | 54 break; |
| 54 } | 55 } |
| 55 case IrOpcode::kFinishRegion: | 56 case IrOpcode::kFinishRegion: |
| 57 case IrOpcode::kTypeGuard: |
| 56 return QueryAlias(a->InputAt(0), b); | 58 return QueryAlias(a->InputAt(0), b); |
| 57 default: | 59 default: |
| 58 break; | 60 break; |
| 59 } | 61 } |
| 60 return kMayAlias; | 62 return kMayAlias; |
| 61 } | 63 } |
| 62 | 64 |
| 63 bool MayAlias(Node* a, Node* b) { return QueryAlias(a, b) != kNoAlias; } | 65 bool MayAlias(Node* a, Node* b) { return QueryAlias(a, b) != kNoAlias; } |
| 64 | 66 |
| 65 bool MustAlias(Node* a, Node* b) { return QueryAlias(a, b) == kMustAlias; } | 67 bool MustAlias(Node* a, Node* b) { return QueryAlias(a, b) == kMustAlias; } |
| (...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 return jsgraph()->common(); | 1104 return jsgraph()->common(); |
| 1103 } | 1105 } |
| 1104 | 1106 |
| 1105 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } | 1107 Graph* LoadElimination::graph() const { return jsgraph()->graph(); } |
| 1106 | 1108 |
| 1107 Factory* LoadElimination::factory() const { return jsgraph()->factory(); } | 1109 Factory* LoadElimination::factory() const { return jsgraph()->factory(); } |
| 1108 | 1110 |
| 1109 } // namespace compiler | 1111 } // namespace compiler |
| 1110 } // namespace internal | 1112 } // namespace internal |
| 1111 } // namespace v8 | 1113 } // namespace v8 |
| OLD | NEW |