authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-05 00:44:39-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-08-05 00:44:39-04:00
loga7763c06f9941bdeccc0679abf863b21f7cc33a3
tree7ff99dcfdb8a1c73b83a599cc37ad6915e0bad31
parent0d8c9fcb18b399bd2afedbcbcc7736326ef92297
signaturelock-open Commit is signed but in an unrecognized format.

delete IrInstructionMarkErrRetTracePtr

this IR instruction is no longer needed

5 files changed, 0 insertions(+), 54 deletions(-)

BRANCH_TODO-1
...@@ -1,4 +1,3 @@...@@ -1,4 +1,3 @@
1 * delete IrInstructionMarkErrRetTracePtr
2 * go over the commented out tests1 * go over the commented out tests
3 * error return tracing2 * error return tracing
4 * compile error for error: expected anyframe->T, found 'anyframe'3 * compile error for error: expected anyframe->T, found 'anyframe'
src/all_types.hpp-7
...@@ -2334,7 +2334,6 @@ enum IrInstructionId {...@@ -2334,7 +2334,6 @@ enum IrInstructionId {
2334 IrInstructionIdAtomicLoad,2334 IrInstructionIdAtomicLoad,
2335 IrInstructionIdSaveErrRetAddr,2335 IrInstructionIdSaveErrRetAddr,
2336 IrInstructionIdAddImplicitReturnType,2336 IrInstructionIdAddImplicitReturnType,
2337 IrInstructionIdMarkErrRetTracePtr,
2338 IrInstructionIdErrSetCast,2337 IrInstructionIdErrSetCast,
2339 IrInstructionIdToBytes,2338 IrInstructionIdToBytes,
2340 IrInstructionIdFromBytes,2339 IrInstructionIdFromBytes,
...@@ -3451,12 +3450,6 @@ struct IrInstructionAddImplicitReturnType {...@@ -3451,12 +3450,6 @@ struct IrInstructionAddImplicitReturnType {
3451 IrInstruction *value;3450 IrInstruction *value;
3452};3451};
34533452
3454struct IrInstructionMarkErrRetTracePtr {
3455 IrInstruction base;
3456
3457 IrInstruction *err_ret_trace_ptr;
3458};
3459
3460// For float ops which take a single argument3453// For float ops which take a single argument
3461struct IrInstructionFloatOp {3454struct IrInstructionFloatOp {
3462 IrInstruction base;3455 IrInstruction base;
src/codegen.cpp-10
...@@ -5062,14 +5062,6 @@ static LLVMValueRef ir_render_atomic_load(CodeGen *g, IrExecutable *executable,...@@ -5062,14 +5062,6 @@ static LLVMValueRef ir_render_atomic_load(CodeGen *g, IrExecutable *executable,
5062 return load_inst;5062 return load_inst;
5063}5063}
50645064
5065static LLVMValueRef ir_render_mark_err_ret_trace_ptr(CodeGen *g, IrExecutable *executable,
5066 IrInstructionMarkErrRetTracePtr *instruction)
5067{
5068 assert(g->have_err_ret_tracing);
5069 g->cur_err_ret_trace_val_stack = ir_llvm_value(g, instruction->err_ret_trace_ptr);
5070 return nullptr;
5071}
5072
5073static LLVMValueRef ir_render_float_op(CodeGen *g, IrExecutable *executable, IrInstructionFloatOp *instruction) {5065static LLVMValueRef ir_render_float_op(CodeGen *g, IrExecutable *executable, IrInstructionFloatOp *instruction) {
5074 LLVMValueRef op = ir_llvm_value(g, instruction->op1);5066 LLVMValueRef op = ir_llvm_value(g, instruction->op1);
5075 assert(instruction->base.value.type->id == ZigTypeIdFloat);5067 assert(instruction->base.value.type->id == ZigTypeIdFloat);
...@@ -5544,8 +5536,6 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,...@@ -5544,8 +5536,6 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
5544 return ir_render_atomic_load(g, executable, (IrInstructionAtomicLoad *)instruction);5536 return ir_render_atomic_load(g, executable, (IrInstructionAtomicLoad *)instruction);
5545 case IrInstructionIdSaveErrRetAddr:5537 case IrInstructionIdSaveErrRetAddr:
5546 return ir_render_save_err_ret_addr(g, executable, (IrInstructionSaveErrRetAddr *)instruction);5538 return ir_render_save_err_ret_addr(g, executable, (IrInstructionSaveErrRetAddr *)instruction);
5547 case IrInstructionIdMarkErrRetTracePtr:
5548 return ir_render_mark_err_ret_trace_ptr(g, executable, (IrInstructionMarkErrRetTracePtr *)instruction);
5549 case IrInstructionIdFloatOp:5539 case IrInstructionIdFloatOp:
5550 return ir_render_float_op(g, executable, (IrInstructionFloatOp *)instruction);5540 return ir_render_float_op(g, executable, (IrInstructionFloatOp *)instruction);
5551 case IrInstructionIdMulAdd:5541 case IrInstructionIdMulAdd:
src/ir.cpp-27
...@@ -993,10 +993,6 @@ static constexpr IrInstructionId ir_instruction_id(IrInstructionAddImplicitRetur...@@ -993,10 +993,6 @@ static constexpr IrInstructionId ir_instruction_id(IrInstructionAddImplicitRetur
993 return IrInstructionIdAddImplicitReturnType;993 return IrInstructionIdAddImplicitReturnType;
994}994}
995995
996static constexpr IrInstructionId ir_instruction_id(IrInstructionMarkErrRetTracePtr *) {
997 return IrInstructionIdMarkErrRetTracePtr;
998}
999
1000static constexpr IrInstructionId ir_instruction_id(IrInstructionFloatOp *) {996static constexpr IrInstructionId ir_instruction_id(IrInstructionFloatOp *) {
1001 return IrInstructionIdFloatOp;997 return IrInstructionIdFloatOp;
1002}998}
...@@ -3092,15 +3088,6 @@ static IrInstruction *ir_build_add_implicit_return_type(IrBuilder *irb, Scope *s...@@ -3092,15 +3088,6 @@ static IrInstruction *ir_build_add_implicit_return_type(IrBuilder *irb, Scope *s
3092 return &instruction->base;3088 return &instruction->base;
3093}3089}
30943090
3095static IrInstruction *ir_build_mark_err_ret_trace_ptr(IrBuilder *irb, Scope *scope, AstNode *source_node, IrInstruction *err_ret_trace_ptr) {
3096 IrInstructionMarkErrRetTracePtr *instruction = ir_build_instruction<IrInstructionMarkErrRetTracePtr>(irb, scope, source_node);
3097 instruction->err_ret_trace_ptr = err_ret_trace_ptr;
3098
3099 ir_ref_instruction(err_ret_trace_ptr, irb->current_basic_block);
3100
3101 return &instruction->base;
3102}
3103
3104static IrInstruction *ir_build_has_decl(IrBuilder *irb, Scope *scope, AstNode *source_node,3091static IrInstruction *ir_build_has_decl(IrBuilder *irb, Scope *scope, AstNode *source_node,
3105 IrInstruction *container, IrInstruction *name)3092 IrInstruction *container, IrInstruction *name)
3106{3093{
...@@ -23908,17 +23895,6 @@ static IrInstruction *ir_analyze_instruction_save_err_ret_addr(IrAnalyze *ira, I...@@ -23908,17 +23895,6 @@ static IrInstruction *ir_analyze_instruction_save_err_ret_addr(IrAnalyze *ira, I
23908 return result;23895 return result;
23909}23896}
2391023897
23911static IrInstruction *ir_analyze_instruction_mark_err_ret_trace_ptr(IrAnalyze *ira, IrInstructionMarkErrRetTracePtr *instruction) {
23912 IrInstruction *err_ret_trace_ptr = instruction->err_ret_trace_ptr->child;
23913 if (type_is_invalid(err_ret_trace_ptr->value.type))
23914 return ira->codegen->invalid_instruction;
23915
23916 IrInstruction *result = ir_build_mark_err_ret_trace_ptr(&ira->new_irb, instruction->base.scope,
23917 instruction->base.source_node, err_ret_trace_ptr);
23918 result->value.type = ira->codegen->builtin_types.entry_void;
23919 return result;
23920}
23921
23922static void ir_eval_float_op(IrAnalyze *ira, IrInstructionFloatOp *source_instr, ZigType *float_type,23898static void ir_eval_float_op(IrAnalyze *ira, IrInstructionFloatOp *source_instr, ZigType *float_type,
23923 ConstExprValue *op, ConstExprValue *out_val) {23899 ConstExprValue *op, ConstExprValue *out_val) {
23924 assert(ira && source_instr && float_type && out_val && op);23900 assert(ira && source_instr && float_type && out_val && op);
...@@ -24798,8 +24774,6 @@ static IrInstruction *ir_analyze_instruction_base(IrAnalyze *ira, IrInstruction...@@ -24798,8 +24774,6 @@ static IrInstruction *ir_analyze_instruction_base(IrAnalyze *ira, IrInstruction
24798 return ir_analyze_instruction_save_err_ret_addr(ira, (IrInstructionSaveErrRetAddr *)instruction);24774 return ir_analyze_instruction_save_err_ret_addr(ira, (IrInstructionSaveErrRetAddr *)instruction);
24799 case IrInstructionIdAddImplicitReturnType:24775 case IrInstructionIdAddImplicitReturnType:
24800 return ir_analyze_instruction_add_implicit_return_type(ira, (IrInstructionAddImplicitReturnType *)instruction);24776 return ir_analyze_instruction_add_implicit_return_type(ira, (IrInstructionAddImplicitReturnType *)instruction);
24801 case IrInstructionIdMarkErrRetTracePtr:
24802 return ir_analyze_instruction_mark_err_ret_trace_ptr(ira, (IrInstructionMarkErrRetTracePtr *)instruction);
24803 case IrInstructionIdFloatOp:24777 case IrInstructionIdFloatOp:
24804 return ir_analyze_instruction_float_op(ira, (IrInstructionFloatOp *)instruction);24778 return ir_analyze_instruction_float_op(ira, (IrInstructionFloatOp *)instruction);
24805 case IrInstructionIdMulAdd:24779 case IrInstructionIdMulAdd:
...@@ -24951,7 +24925,6 @@ bool ir_has_side_effects(IrInstruction *instruction) {...@@ -24951,7 +24925,6 @@ bool ir_has_side_effects(IrInstruction *instruction) {
24951 case IrInstructionIdCancel:24925 case IrInstructionIdCancel:
24952 case IrInstructionIdSaveErrRetAddr:24926 case IrInstructionIdSaveErrRetAddr:
24953 case IrInstructionIdAddImplicitReturnType:24927 case IrInstructionIdAddImplicitReturnType:
24954 case IrInstructionIdMarkErrRetTracePtr:
24955 case IrInstructionIdAtomicRmw:24928 case IrInstructionIdAtomicRmw:
24956 case IrInstructionIdCmpxchgGen:24929 case IrInstructionIdCmpxchgGen:
24957 case IrInstructionIdCmpxchgSrc:24930 case IrInstructionIdCmpxchgSrc:
src/ir_print.cpp-9
...@@ -1457,12 +1457,6 @@ static void ir_print_add_implicit_return_type(IrPrint *irp, IrInstructionAddImpl...@@ -1457,12 +1457,6 @@ static void ir_print_add_implicit_return_type(IrPrint *irp, IrInstructionAddImpl
1457 fprintf(irp->f, ")");1457 fprintf(irp->f, ")");
1458}1458}
14591459
1460static void ir_print_mark_err_ret_trace_ptr(IrPrint *irp, IrInstructionMarkErrRetTracePtr *instruction) {
1461 fprintf(irp->f, "@markErrRetTracePtr(");
1462 ir_print_other_instruction(irp, instruction->err_ret_trace_ptr);
1463 fprintf(irp->f, ")");
1464}
1465
1466static void ir_print_float_op(IrPrint *irp, IrInstructionFloatOp *instruction) {1460static void ir_print_float_op(IrPrint *irp, IrInstructionFloatOp *instruction) {
14671461
1468 fprintf(irp->f, "@%s(", float_op_to_name(instruction->op, false));1462 fprintf(irp->f, "@%s(", float_op_to_name(instruction->op, false));
...@@ -1963,9 +1957,6 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {...@@ -1963,9 +1957,6 @@ static void ir_print_instruction(IrPrint *irp, IrInstruction *instruction) {
1963 case IrInstructionIdAddImplicitReturnType:1957 case IrInstructionIdAddImplicitReturnType:
1964 ir_print_add_implicit_return_type(irp, (IrInstructionAddImplicitReturnType *)instruction);1958 ir_print_add_implicit_return_type(irp, (IrInstructionAddImplicitReturnType *)instruction);
1965 break;1959 break;
1966 case IrInstructionIdMarkErrRetTracePtr:
1967 ir_print_mark_err_ret_trace_ptr(irp, (IrInstructionMarkErrRetTracePtr *)instruction);
1968 break;
1969 case IrInstructionIdFloatOp:1960 case IrInstructionIdFloatOp:
1970 ir_print_float_op(irp, (IrInstructionFloatOp *)instruction);1961 ir_print_float_op(irp, (IrInstructionFloatOp *)instruction);
1971 break;1962 break;