mirror of
https://github.com/ziglang/zig.git
synced 2025-12-24 15:13:08 +00:00
Merge pull request #9358 from SpexGuy/remove-owner-bb
Remove Stage1AirInst::owner_bb, use zir owner instead.
This commit is contained in:
commit
8de5e8bcd1
@ -2744,7 +2744,6 @@ struct Stage1AirInst {
|
||||
|
||||
LLVMValueRef llvm_value;
|
||||
ZigValue *value;
|
||||
Stage1AirBasicBlock *owner_bb;
|
||||
// Nearly any instruction can have to be stored as a local variable before suspending
|
||||
// and then loaded after resuming, in case there is an expression with a suspend point
|
||||
// in it, such as: x + await y
|
||||
|
||||
@ -1116,7 +1116,6 @@ static T *ir_create_inst_gen(IrBuilderGen *irb, Scope *scope, AstNode *source_no
|
||||
special_instruction->base.scope = scope;
|
||||
special_instruction->base.source_node = source_node;
|
||||
special_instruction->base.debug_id = exec_next_debug_id_gen(irb->exec);
|
||||
special_instruction->base.owner_bb = irb->current_basic_block;
|
||||
special_instruction->base.value = irb->codegen->pass1_arena->create<ZigValue>();
|
||||
return special_instruction;
|
||||
}
|
||||
@ -1128,7 +1127,6 @@ static T *ir_create_inst_noval(IrBuilderGen *irb, Scope *scope, AstNode *source_
|
||||
special_instruction->base.scope = scope;
|
||||
special_instruction->base.source_node = source_node;
|
||||
special_instruction->base.debug_id = exec_next_debug_id_gen(irb->exec);
|
||||
special_instruction->base.owner_bb = irb->current_basic_block;
|
||||
return special_instruction;
|
||||
}
|
||||
|
||||
@ -14024,7 +14022,7 @@ static Stage1AirInst *ir_analyze_instruction_phi(IrAnalyze *ira, Stage1ZirInstPh
|
||||
instrs_to_move.append(ira->new_irb.current_basic_block->instruction_list.pop());
|
||||
}
|
||||
if (instrs_to_move.length != 0) {
|
||||
Stage1AirBasicBlock *predecessor = peer_parent->base.source_instruction->child->owner_bb;
|
||||
Stage1AirBasicBlock *predecessor = peer_parent->base.source_instruction->owner_bb->child;
|
||||
Stage1AirInst *branch_instruction = predecessor->instruction_list.pop();
|
||||
src_assert(branch_instruction->value->type->id == ZigTypeIdUnreachable,
|
||||
phi_instruction->base.source_node);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user