18class BranchInstruction;
19class DestructInstruction;
20class DummyInstruction;
21class ReturnInstruction;
52 bool branch_output_ =
false;
277 std::string
to_dot()
const;
282 bool validate_all_instruction_pointers_set()
const;
283 bool validate_all_params_provided()
const;
284 bool validate_same_variables_in_one_call()
const;
285 bool validate_parameters()
const;
286 bool validate_initialization()
const;
289 bool can_be_initialized =
false;
290 bool can_be_uninitialized =
false;
293 InitState find_initialization_state_before_instruction(
const Instruction &target_instruction,
302 : type_(
Call), instruction_(&instruction)
307 : type_(
Destruct), instruction_(&instruction)
312 : type_(
Branch), instruction_(&instruction), branch_output_(branch_output)
317 : type_(
Dummy), instruction_(&instruction)
363 return index_in_graph_;
441 return branch_false_;
446 return branch_false_;
523template<
typename T,
typename... Args>
528 owned_functions_.append(std::move(fn));
#define BLI_STRUCT_EQUALITY_OPERATORS_3(Type, m1, m2, m3)
destruct_ptr< T > construct(Args &&...args)
void set_branch_true(Instruction *instruction)
Instruction * branch_false()
Instruction * branch_true()
void set_condition(Variable *variable)
void set_branch_false(Instruction *instruction)
Span< Variable * > params()
void set_param_variable(int param_index, Variable *variable)
const MultiFunction & fn() const
void set_params(Span< Variable * > variables)
void set_next(Instruction *instruction)
void set_variable(Variable *variable)
void set_next(Instruction *instruction)
void set_next(Instruction *instruction)
InstructionCursor()=default
static InstructionCursor ForEntry()
Instruction * instruction() const
void set_next(Procedure &procedure, Instruction *new_instruction) const
Span< InstructionCursor > prev() const
friend DestructInstruction
Vector< InstructionCursor > prev_
InstructionType type() const
BranchInstruction & new_branch_instruction()
std::string to_dot() const
CallInstruction & new_call_instruction(const MultiFunction &fn)
DestructInstruction & new_destruct_instruction()
Span< Variable * > variables()
const MultiFunction & construct_function(Args &&...args)
void set_entry(Instruction &entry)
ReturnInstruction & new_return_instruction()
DummyInstruction & new_dummy_instruction()
void add_parameter(ParamType::InterfaceType interface_type, Variable &variable)
Span< ConstParameter > params() const
Variable & new_variable(DataType data_type, std::string name="")
void set_name(std::string name)
int index_in_procedure() const
Span< Instruction * > users()
StringRefNull name() const
DataType data_type() const
std::unique_ptr< T, DestructValueAtAddress< T > > destruct_ptr
const Variable * variable
ParamType::InterfaceType type
ParamType::InterfaceType type