authorgravatar for spexguy070@gmail.comMartin Wickham <spexguy070@gmail.com> 2021-07-11 22:24:33-05:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2021-07-11 22:24:33-05:00
log8de5e8bcd1528d4cd0a468fedb8cd735f83069b6
tree9fe9168bf1204c4faa4929d278d98b9c6f6cb63a
parent7ef85468265ecbc53efa18f67a5bd5ef46b8c7fb
parentbd1689ae8986fce29b64498dc6f959ff609d8288
signaturebadge-question-mark Signed by PGP key 4AEE18F83AFDEB23

Merge pull request #9358 from SpexGuy/remove-owner-bb

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 {...@@ -2744,7 +2744,6 @@ struct Stage1AirInst {
27442744
2745 LLVMValueRef llvm_value;2745 LLVMValueRef llvm_value;
2746 ZigValue *value;2746 ZigValue *value;
2747 Stage1AirBasicBlock *owner_bb;
2748 // Nearly any instruction can have to be stored as a local variable before suspending2747 // Nearly any instruction can have to be stored as a local variable before suspending
2749 // and then loaded after resuming, in case there is an expression with a suspend point2748 // and then loaded after resuming, in case there is an expression with a suspend point
2750 // in it, such as: x + await y2749 // 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...@@ -1116,7 +1116,6 @@ static T *ir_create_inst_gen(IrBuilderGen *irb, Scope *scope, AstNode *source_no
1116 special_instruction->base.scope = scope;1116 special_instruction->base.scope = scope;
1117 special_instruction->base.source_node = source_node;1117 special_instruction->base.source_node = source_node;
1118 special_instruction->base.debug_id = exec_next_debug_id_gen(irb->exec);1118 special_instruction->base.debug_id = exec_next_debug_id_gen(irb->exec);
1119 special_instruction->base.owner_bb = irb->current_basic_block;
1120 special_instruction->base.value = irb->codegen->pass1_arena->create<ZigValue>();1119 special_instruction->base.value = irb->codegen->pass1_arena->create<ZigValue>();
1121 return special_instruction;1120 return special_instruction;
1122}1121}
...@@ -1128,7 +1127,6 @@ static T *ir_create_inst_noval(IrBuilderGen *irb, Scope *scope, AstNode *source_...@@ -1128,7 +1127,6 @@ static T *ir_create_inst_noval(IrBuilderGen *irb, Scope *scope, AstNode *source_
1128 special_instruction->base.scope = scope;1127 special_instruction->base.scope = scope;
1129 special_instruction->base.source_node = source_node;1128 special_instruction->base.source_node = source_node;
1130 special_instruction->base.debug_id = exec_next_debug_id_gen(irb->exec);1129 special_instruction->base.debug_id = exec_next_debug_id_gen(irb->exec);
1131 special_instruction->base.owner_bb = irb->current_basic_block;
1132 return special_instruction;1130 return special_instruction;
1133}1131}
11341132
...@@ -14024,7 +14022,7 @@ static Stage1AirInst *ir_analyze_instruction_phi(IrAnalyze *ira, Stage1ZirInstPh...@@ -14024,7 +14022,7 @@ static Stage1AirInst *ir_analyze_instruction_phi(IrAnalyze *ira, Stage1ZirInstPh
14024 instrs_to_move.append(ira->new_irb.current_basic_block->instruction_list.pop());14022 instrs_to_move.append(ira->new_irb.current_basic_block->instruction_list.pop());
14025 }14023 }
14026 if (instrs_to_move.length != 0) {14024 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;
14028 Stage1AirInst *branch_instruction = predecessor->instruction_list.pop();14026 Stage1AirInst *branch_instruction = predecessor->instruction_list.pop();
14029 src_assert(branch_instruction->value->type->id == ZigTypeIdUnreachable,14027 src_assert(branch_instruction->value->type->id == ZigTypeIdUnreachable,
14030 phi_instruction->base.source_node);14028 phi_instruction->base.source_node);