5 #ifndef V8_COMPILER_JS_INLINING_HEURISTIC_H_ 6 #define V8_COMPILER_JS_INLINING_HEURISTIC_H_ 8 #include "src/compiler/js-inlining.h" 16 enum Mode { kGeneralInlining, kRestrictedInlining, kStressInlining };
23 inliner_(editor, local_zone, info, jsgraph, broker, source_positions),
24 candidates_(local_zone),
26 source_positions_(source_positions),
29 const char* reducer_name()
const override {
return "JSInliningHeuristic"; }
35 void Finalize()
final;
40 static const int kMaxCallPolymorphism = 4;
46 bool can_inline_function[kMaxCallPolymorphism];
62 struct CandidateCompare {
63 bool operator()(
const Candidate& left,
const Candidate& right)
const;
70 void PrintCandidates();
71 Reduction InlineCandidate(Candidate
const& candidate,
bool small_function);
72 void CreateOrReuseDispatch(
Node* node,
Node* callee,
73 Candidate
const& candidate,
Node** if_successes,
74 Node** calls,
Node** inputs,
int input_count);
75 bool TryReuseDispatch(
Node* node,
Node* callee, Candidate
const& candidate,
78 enum StateCloneMode { kCloneState, kChangeInPlace };
81 Node* DuplicateStateValuesAndRename(
Node* state_values,
Node* from,
Node* to,
86 JSGraph* jsgraph()
const {
return jsgraph_; }
87 Isolate* isolate()
const {
return jsgraph_->isolate(); }
96 int cumulative_count_ = 0;
103 #endif // V8_COMPILER_JS_INLINING_HEURISTIC_H_