authorgravatar for spexguy070@gmail.comMartin Wickham <spexguy070@gmail.com> 2021-07-11 19:16:57-05:00
committergravatar for spexguy070@gmail.comMartin Wickham <spexguy070@gmail.com> 2021-07-11 19:16:57-05:00
logbd1689ae8986fce29b64498dc6f959ff609d8288
tree9fe9168bf1204c4faa4929d278d98b9c6f6cb63a
parent7ef85468265ecbc53efa18f67a5bd5ef46b8c7fb

Remove Stage1AirInst::owner_bb, use zir owner instead.


2 files changed, 1 insertions(+), 4 deletions(-)

src/stage1/all_types.hpp-1
......@@ -2744,7 +2744,6 @@ struct Stage1AirInst {
27442744
27452745 LLVMValueRef llvm_value;
27462746 ZigValue *value;
2747 Stage1AirBasicBlock *owner_bb;
27482747 // Nearly any instruction can have to be stored as a local variable before suspending
27492748 // and then loaded after resuming, in case there is an expression with a suspend point
27502749 // in it, such as: x + await y
src/stage1/ir.cpp+1-3
......@@ -1116,7 +1116,6 @@ static T *ir_create_inst_gen(IrBuilderGen *irb, Scope *scope, AstNode *source_no
11161116 special_instruction->base.scope = scope;
11171117 special_instruction->base.source_node = source_node;
11181118 special_instruction->base.debug_id = exec_next_debug_id_gen(irb->exec);
1119 special_instruction->base.owner_bb = irb->current_basic_block;
11201119 special_instruction->base.value = irb->codegen->pass1_arena->create<ZigValue>();
11211120 return special_instruction;
11221121}
......@@ -1128,7 +1127,6 @@ static T *ir_create_inst_noval(IrBuilderGen *irb, Scope *scope, AstNode *source_
11281127 special_instruction->base.scope = scope;
11291128 special_instruction->base.source_node = source_node;
11301129 special_instruction->base.debug_id = exec_next_debug_id_gen(irb->exec);
1131 special_instruction->base.owner_bb = irb->current_basic_block;
11321130 return special_instruction;
11331131}
11341132
......@@ -14024,7 +14022,7 @@ static Stage1AirInst *ir_analyze_instruction_phi(IrAnalyze *ira, Stage1ZirInstPh
1402414022 instrs_to_move.append(ira->new_irb.current_basic_block->instruction_list.pop());
1402514023 }
1402614024 if (instrs_to_move.length != 0) {
14027 Stage1AirBasicBlock *predecessor = peer_parent->base.source_instruction->child->owner_bb;
14025 Stage1AirBasicBlock *predecessor = peer_parent->base.source_instruction->owner_bb->child;
1402814026 Stage1AirInst *branch_instruction = predecessor->instruction_list.pop();
1402914027 src_assert(branch_instruction->value->type->id == ZigTypeIdUnreachable,
1403014028 phi_instruction->base.source_node);