5#ifndef RUNTIME_VM_COMPILER_COMPILER_PASS_H_
6#define RUNTIME_VM_COMPILER_COMPILER_PASS_H_
8#if defined(DART_PRECOMPILED_RUNTIME)
9#error "AOT runtime should not use compiler sources (including header files)"
12#include <initializer_list>
21#define COMPILER_PASS_LIST(V) \
22 V(AllocateRegisters) \
23 V(AllocateRegistersForGraphIntrinsic) \
24 V(AllocationSinking_DetachMaterializations) \
25 V(AllocationSinking_Sink) \
32 V(ConstantPropagation) \
36 V(EliminateDeadPhis) \
37 V(EliminateEnvironments) \
38 V(EliminateStackOverflowChecks) \
43 V(OptimisticallySpecializeSmiPhis) \
45 V(OptimizeTypedDataAccesses) \
48 V(SelectRepresentations) \
49 V(SelectRepresentations_Final) \
50 V(SetOuterInliningId) \
51 V(TryCatchOptimization) \
52 V(TryOptimizePatterns) \
55 V(EliminateWriteBarriers) \
56 V(TestILSerialization) \
57 V(LoweringAfterCodeMotionDisabled) \
60class AllocationSinking;
64class FlowGraphCompiler;
67class SpeculativeInliningPolicy;
109#define DEF(name) k##name,
114#define ADD_ONE(name) +1
119 ASSERT(passes_[
id] ==
nullptr);
123 if (
id == kAllocateRegisters) {
141 uint8_t
flags()
const {
return flags_[
id()]; }
142 const char*
name()
const {
return name_; }
179 bool compute_ssa =
true);
183 std::initializer_list<CompilerPass::Id> passes);
194 if ((passes_[
i] !=
nullptr) && (strcmp(passes_[
i]->name_,
name) == 0)) {
204 static uint8_t flags_[];
static void round(SkPoint *p)
void Run(CompilerPassState *state) const
static void ParseOneFilter(const char *start, const char *end, uint8_t *flags)
static CompilerPass * Get(Id id)
virtual bool DoBody(CompilerPassState *state) const =0
static uint8_t * ParseFiltersFromPragma(const char *filter)
static void RunGraphIntrinsicPipeline(CompilerPassState *state)
static void ParseFilters(const char *filter, uint8_t *flags)
static void GenerateCode(CompilerPassState *state)
static void RunInliningPipeline(PipelineMode mode, CompilerPassState *state)
static constexpr intptr_t kNumPasses
static void ParseFiltersFromFlag(const char *filter)
static DART_WARN_UNUSED_RESULT FlowGraph * RunPipeline(PipelineMode mode, CompilerPassState *state, bool compute_ssa=true)
static DART_WARN_UNUSED_RESULT FlowGraph * RunPipelineWithPasses(CompilerPassState *state, std::initializer_list< CompilerPass::Id > passes)
CompilerPass(Id id, const char *name)
const char * name() const
#define COMPILER_PASS_LIST(V)
#define DART_WARN_UNUSED_RESULT
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
CompilerPassState(Thread *thread, FlowGraph *flow_graph, SpeculativeInliningPolicy *speculative_policy, Precompiler *precompiler=nullptr)
CallSpecializer * call_specializer
AllocationSinking * sinking
SpeculativeInliningPolicy * speculative_policy
FlowGraph * flow_graph() const
GrowableArray< TokenPosition > inline_id_to_token_pos
GrowableArray< intptr_t > caller_inline_id
Precompiler *const precompiler
GrowableArray< const Function * > inline_id_to_function
FlowGraphCompiler * graph_compiler
void set_flow_graph(FlowGraph *flow_graph)