#include <block_builder.h>
|
| BlockBuilder (FlowGraph *flow_graph, BlockEntryInstr *entry, bool with_frame=true) |
|
Definition * | AddToInitialDefinitions (Definition *def) |
|
template<typename T > |
T * | AddDefinition (T *def) |
|
template<typename T > |
T * | AddInstruction (T *instr) |
|
const Function & | function () const |
|
DartReturnInstr * | AddReturn (Value *value) |
|
Definition * | AddParameter (intptr_t index) |
|
Definition * | AddParameter (intptr_t index, Representation representation, Location location=Location()) |
|
TokenPosition | TokenPos () const |
|
const InstructionSource & | Source () const |
|
Definition * | AddNullDefinition () |
|
Definition * | AddUnboxInstr (Representation rep, Value *value, bool is_checked) |
|
Definition * | AddUnboxInstr (Representation rep, Definition *boxed, bool is_checked) |
|
BranchInstr * | AddBranch (ComparisonInstr *comp, TargetEntryInstr *true_successor, TargetEntryInstr *false_successor) |
|
void | AddPhi (PhiInstr *phi) |
|
Instruction * | last () const |
|
| ValueObject () |
|
| ~ValueObject () |
|
Definition at line 19 of file block_builder.h.
◆ BlockBuilder()
Definition at line 21 of file block_builder.h.
24 : flow_graph_(flow_graph),
26 flow_graph->inlining_id())),
27 entry_(entry),
28 current_(entry),
29 dummy_env_(new Environment(0, 0, 0, flow_graph->function(), nullptr)),
30 with_frame_(with_frame) {
31
32 entry->SetEnvironment(dummy_env_);
33 }
const Function & function() const
TokenPosition token_pos() const
◆ AddBranch()
Definition at line 132 of file block_builder.h.
134 {
135 auto branch =
137
138 branch->SetEnvironment(dummy_env_);
140 current_ = nullptr;
141
142 *branch->true_successor_address() = true_successor;
143 *branch->false_successor_address() = false_successor;
144
145 return branch;
146 }
static CompilerState & Current()
Instruction * AppendInstruction(Instruction *tail)
◆ AddDefinition()
T * dart::compiler::BlockBuilder::AddDefinition |
( |
T * |
def | ) |
|
|
inline |
Definition at line 43 of file block_builder.h.
43 {
46 return def;
47 }
void AllocateSSAIndex(Definition *def)
T * AddInstruction(T *instr)
◆ AddInstruction()
T * dart::compiler::BlockBuilder::AddInstruction |
( |
T * |
instr | ) |
|
|
inline |
Definition at line 50 of file block_builder.h.
50 {
51 if (instr->ComputeCanDeoptimize() ||
52 instr->ComputeCanDeoptimizeAfterCall() ||
53 instr->CanBecomeDeoptimizationTarget()) {
54
55
56 instr->SetEnvironment(dummy_env_);
57 }
59 return instr;
60 }
◆ AddNullDefinition()
Definition * dart::compiler::BlockBuilder::AddNullDefinition |
( |
| ) |
|
|
inline |
Definition at line 95 of file block_builder.h.
95 {
97 }
ConstantInstr * GetConstant(const Object &object, Representation representation=kTagged)
static Object & ZoneHandle()
◆ AddParameter() [1/2]
Definition * dart::compiler::BlockBuilder::AddParameter |
( |
intptr_t |
index | ) |
|
|
inline |
Definition at line 75 of file block_builder.h.
75 {
76 const auto [location, representation] =
79 with_frame_ ? location : location.ToEntrySpRelative());
80 }
const std::pair< Location, Representation > & GetDirectParameterInfoAt(intptr_t i)
Definition * AddParameter(intptr_t index)
◆ AddParameter() [2/2]
Definition at line 82 of file block_builder.h.
84 {
87 new ParameterInstr(normal_entry,
88 index,
89 index, location, representation));
90 }
GraphEntryInstr * graph_entry() const
FunctionEntryInstr * normal_entry() const
Definition * AddToInitialDefinitions(Definition *def)
◆ AddPhi()
void dart::compiler::BlockBuilder::AddPhi |
( |
PhiInstr * |
phi | ) |
|
|
inline |
Definition at line 148 of file block_builder.h.
148 {
150 phi->mark_alive();
151 entry_->AsJoinEntry()->InsertPhi(phi);
152 }
◆ AddReturn()
Definition at line 64 of file block_builder.h.
64 {
67 DartReturnInstr* instr = new DartReturnInstr(
69 representation);
72 return instr;
73 }
void set_last_instruction(Instruction *instr)
static Representation ReturnRepresentationOf(const Function &function)
const InstructionSource & Source() const
const Function & function() const
◆ AddToInitialDefinitions()
Definition at line 35 of file block_builder.h.
35 {
39 return def;
40 }
void AddToInitialDefinitions(BlockEntryWithInitialDefs *entry, Definition *defn)
◆ AddUnboxInstr() [1/2]
Definition at line 126 of file block_builder.h.
128 {
130 }
Definition * AddUnboxInstr(Representation rep, Value *value, bool is_checked)
◆ AddUnboxInstr() [2/2]
Definition at line 99 of file block_builder.h.
99 {
100
101 auto const unbox_rep = rep == kUnboxedFloat
102 ? kUnboxedDouble
104 Definition* unboxed_value =
106 if (rep != unbox_rep && unboxed_value->IsUnboxInteger()) {
109
110 unboxed_value->AsUnboxInteger()->mark_truncating();
111 }
112 if (is_checked) {
113
114
115
116 unboxed_value->AsUnbox()->value()->SetReachingType(
118 }
119 if (rep == kUnboxedFloat) {
122 }
123 return unboxed_value;
124 }
static CompileType FromUnboxedRepresentation(Representation rep)
static constexpr intptr_t kNone
static UnboxInstr * Create(Representation to, Value *value, intptr_t deopt_id, SpeculativeMode speculative_mode=kGuardInputs)
T * AddDefinition(T *def)
static constexpr Representation NativeRepresentation(Representation rep)
static constexpr size_t ValueSize(Representation rep)
◆ function()
const Function & dart::compiler::BlockBuilder::function |
( |
| ) |
const |
|
inline |
◆ last()
Instruction * dart::compiler::BlockBuilder::last |
( |
| ) |
const |
|
inline |
◆ Source()
◆ TokenPos()
The documentation for this class was generated from the following file: