#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) |
|
DartReturnInstr * | AddReturn (Value *value, Representation representation) |
|
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 136 of file block_builder.h.
138 {
139 auto branch =
141
142 branch->SetEnvironment(dummy_env_);
144 current_ = nullptr;
145
146 *branch->true_successor_address() = true_successor;
147 *branch->false_successor_address() = false_successor;
148
149 return branch;
150 }
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 99 of file block_builder.h.
99 {
101 }
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 79 of file block_builder.h.
79 {
80 const auto [location, representation] =
83 with_frame_ ? location : location.ToEntrySpRelative());
84 }
const std::pair< Location, Representation > & GetDirectParameterInfoAt(intptr_t i)
Definition * AddParameter(intptr_t index)
◆ AddParameter() [2/2]
Definition at line 86 of file block_builder.h.
88 {
91 new ParameterInstr(normal_entry,
92 index,
93 index, location, representation));
94 }
GraphEntryInstr * graph_entry() const
FunctionEntryInstr * normal_entry() const
Definition * AddToInitialDefinitions(Definition *def)
◆ AddPhi()
void dart::compiler::BlockBuilder::AddPhi |
( |
PhiInstr * |
phi | ) |
|
|
inline |
Definition at line 152 of file block_builder.h.
152 {
154 phi->mark_alive();
155 entry_->AsJoinEntry()->InsertPhi(phi);
156 }
◆ AddReturn() [1/2]
Definition at line 64 of file block_builder.h.
64 {
68 }
static Representation ReturnRepresentationOf(const Function &function)
DartReturnInstr * AddReturn(Value *value)
const Function & function() const
◆ AddReturn() [2/2]
Definition at line 70 of file block_builder.h.
70 {
71 DartReturnInstr* instr = new DartReturnInstr(
73 representation);
76 return instr;
77 }
void set_last_instruction(Instruction *instr)
const InstructionSource & Source() 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 130 of file block_builder.h.
132 {
134 }
Definition * AddUnboxInstr(Representation rep, Value *value, bool is_checked)
◆ AddUnboxInstr() [2/2]
Definition at line 103 of file block_builder.h.
103 {
104
105 auto const unbox_rep = rep == kUnboxedFloat
106 ? kUnboxedDouble
108 Definition* unboxed_value =
110 if (rep != unbox_rep && unboxed_value->IsUnboxInteger()) {
113
114 unboxed_value->AsUnboxInteger()->mark_truncating();
115 }
116 if (is_checked) {
117
118
119
120 unboxed_value->AsUnbox()->value()->SetReachingType(
122 }
123 if (rep == kUnboxedFloat) {
126 }
127 return unboxed_value;
128 }
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: