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

Unified Diff: src/compiler/js-inlining.cc

Issue 872363002: [turbofan] Add new JSIntrinsicsLowering reducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-inlining.h ('k') | src/compiler/js-intrinsic-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index 040c721bade799506fe2df8e71004ca0946069f4..d68c31a04abea1caebcc0fe7588a2e233654cf21 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -10,7 +10,6 @@
#include "src/compiler/graph-inl.h"
#include "src/compiler/graph-visualizer.h"
#include "src/compiler/js-inlining.h"
-#include "src/compiler/js-intrinsic-builder.h"
#include "src/compiler/js-operator.h"
#include "src/compiler/node-aux-data-inl.h"
#include "src/compiler/node-matchers.h"
@@ -36,11 +35,6 @@ class InlinerVisitor : public NullNodeVisitor {
case IrOpcode::kJSCallFunction:
inliner_->TryInlineJSCall(node);
break;
- case IrOpcode::kJSCallRuntime:
- if (FLAG_turbo_inlining_intrinsics) {
- inliner_->TryInlineRuntimeCall(node);
- }
- break;
default:
break;
}
@@ -418,70 +412,6 @@ void JSInliner::TryInlineJSCall(Node* call_node) {
inlinee.InlineAtCall(jsgraph_, call_node);
}
-
-class JSCallRuntimeAccessor {
- public:
- explicit JSCallRuntimeAccessor(Node* call) : call_(call) {
- DCHECK_EQ(IrOpcode::kJSCallRuntime, call->opcode());
- }
-
- Node* formal_argument(size_t index) {
- DCHECK(index < formal_arguments());
- return call_->InputAt(static_cast<int>(index));
- }
-
- size_t formal_arguments() {
- size_t value_inputs = call_->op()->ValueInputCount();
- return value_inputs;
- }
-
- Node* frame_state() const {
- return NodeProperties::GetFrameStateInput(call_);
- }
- Node* context() const { return NodeProperties::GetContextInput(call_); }
- Node* control() const { return NodeProperties::GetControlInput(call_); }
- Node* effect() const { return NodeProperties::GetEffectInput(call_); }
-
- const Runtime::Function* function() const {
- return Runtime::FunctionForId(CallRuntimeParametersOf(call_->op()).id());
- }
-
- NodeVector inputs(Zone* zone) const {
- NodeVector inputs(zone);
- for (Node* const node : call_->inputs()) {
- inputs.push_back(node);
- }
- return inputs;
- }
-
- private:
- Node* call_;
-};
-
-
-void JSInliner::TryInlineRuntimeCall(Node* call_node) {
- JSCallRuntimeAccessor call(call_node);
- const Runtime::Function* f = call.function();
-
- if (f->intrinsic_type != Runtime::IntrinsicType::INLINE) {
- return;
- }
-
- JSIntrinsicBuilder intrinsic_builder(jsgraph_);
-
- ResultAndEffect r = intrinsic_builder.BuildGraphFor(
- f->function_id, call.inputs(jsgraph_->zone()));
-
- if (r.first != NULL) {
- if (FLAG_trace_turbo_inlining) {
- PrintF("Inlining %s into %s\n", f->name,
- info_->shared_info()->DebugName()->ToCString().get());
- }
- NodeProperties::ReplaceWithValue(call_node, r.first, r.second);
- call_node->RemoveAllInputs();
- DCHECK_EQ(0, call_node->UseCount());
- }
-}
-}
-}
-} // namespace v8::internal::compiler
+} // namespace compiler
+} // namespace internal
+} // namespace v8
« no previous file with comments | « src/compiler/js-inlining.h ('k') | src/compiler/js-intrinsic-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698