diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-30 18:08:11 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-30 18:50:12 +0200 |
commit | 47e4001976f3ff85a6d479df39dc82d4ceb18b19 (patch) | |
tree | 0fda96fff7d757b5bc78b83aea4c604f8838a67c | |
parent | 8ea9e1ae4cc2fb0fda44bc2b15f648874ccac2e3 (diff) | |
download | php-git-47e4001976f3ff85a6d479df39dc82d4ceb18b19.tar.gz |
Remove more unused func_info fields
-rw-r--r-- | ext/opcache/Optimizer/zend_call_graph.c | 2 | ||||
-rw-r--r-- | ext/opcache/Optimizer/zend_call_graph.h | 3 | ||||
-rw-r--r-- | ext/opcache/Optimizer/zend_dump.c | 8 | ||||
-rw-r--r-- | ext/opcache/jit/zend_jit.c | 10 | ||||
-rw-r--r-- | ext/opcache/jit/zend_jit_trace.c | 6 |
5 files changed, 0 insertions, 29 deletions
diff --git a/ext/opcache/Optimizer/zend_call_graph.c b/ext/opcache/Optimizer/zend_call_graph.c index af94b9703a..a32dacbb1b 100644 --- a/ext/opcache/Optimizer/zend_call_graph.c +++ b/ext/opcache/Optimizer/zend_call_graph.c @@ -41,8 +41,6 @@ static void zend_op_array_collect(zend_op_array *op_array, void *context) ZEND_SET_FUNC_INFO(op_array, func_info); call_graph->op_arrays[call_graph->op_arrays_count] = op_array; func_info->num = call_graph->op_arrays_count; - func_info->num_args = -1; - func_info->return_value_used = -1; call_graph->op_arrays_count++; } diff --git a/ext/opcache/Optimizer/zend_call_graph.h b/ext/opcache/Optimizer/zend_call_graph.h index 5c50134c6d..1c263f6f63 100644 --- a/ext/opcache/Optimizer/zend_call_graph.h +++ b/ext/opcache/Optimizer/zend_call_graph.h @@ -34,7 +34,6 @@ struct _zend_call_info { zend_function *callee_func; zend_call_info *next_caller; zend_call_info *next_callee; - zend_func_info *clone; zend_bool recursive; zend_bool send_unpack; /* Parameters passed by SEND_UNPACK or SEND_ARRAY */ int num_args; @@ -48,8 +47,6 @@ struct _zend_func_info { zend_call_info *caller_info; /* where this function is called from */ zend_call_info *callee_info; /* which functions are called from this one */ zend_call_info **call_map; /* Call info associated with init/call/send opnum */ - int num_args; /* (-1 - unknown) */ - int return_value_used; /* -1 unknown, 0 no, 1 yes */ zend_ssa_var_info return_info; }; diff --git a/ext/opcache/Optimizer/zend_dump.c b/ext/opcache/Optimizer/zend_dump.c index 57e283d1f3..51dcc2076c 100644 --- a/ext/opcache/Optimizer/zend_dump.c +++ b/ext/opcache/Optimizer/zend_dump.c @@ -909,9 +909,6 @@ void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, cons fprintf(stderr, ":\n ; (lines=%d, args=%d", op_array->last, op_array->num_args); - if (func_info && func_info->num_args >= 0) { - fprintf(stderr, "/%d", func_info->num_args); - } fprintf(stderr, ", vars=%d, tmps=%d", op_array->last_var, op_array->T); if (ssa) { fprintf(stderr, ", ssa_vars=%d", ssa->vars_count); @@ -958,11 +955,6 @@ void zend_dump_op_array(const zend_op_array *op_array, uint32_t dump_flags, cons fprintf(stderr, ", inline"); } #endif - if (func_info && func_info->return_value_used == 0) { - fprintf(stderr, ", no_return_value"); - } else if (func_info && func_info->return_value_used == 1) { - fprintf(stderr, ", return_value"); - } fprintf(stderr, ")\n"); if (msg) { fprintf(stderr, " ; (%s)\n", msg); diff --git a/ext/opcache/jit/zend_jit.c b/ext/opcache/jit/zend_jit.c index 7b7534fff6..02329eb20e 100644 --- a/ext/opcache/jit/zend_jit.c +++ b/ext/opcache/jit/zend_jit.c @@ -3132,8 +3132,6 @@ static int zend_jit_collect_calls(zend_op_array *op_array, zend_script *script) func_info = zend_arena_calloc(&CG(arena), 1, sizeof(zend_func_info)); ZEND_SET_FUNC_INFO(op_array, func_info); } - func_info->num_args = -1; - func_info->return_value_used = -1; return zend_analyze_calls(&CG(arena), script, ZEND_CALL_TREE, op_array, func_info); } @@ -3150,8 +3148,6 @@ static void zend_jit_cleanup_func_info(zend_op_array *op_array) JIT_G(trigger) == ZEND_JIT_ON_PROF_REQUEST || JIT_G(trigger) == ZEND_JIT_ON_HOT_COUNTERS) { memset(func_info, 0, sizeof(zend_func_info)); - func_info->num_args = -1; - func_info->return_value_used = -1; } else { ZEND_SET_FUNC_INFO(op_array, NULL); } @@ -3336,8 +3332,6 @@ static int zend_jit_setup_hot_counters(zend_op_array *op_array) jit_extension = (zend_jit_op_array_hot_extension*)zend_shared_alloc(sizeof(zend_jit_op_array_hot_extension) + (op_array->last - 1) * sizeof(void*)); memset(&jit_extension->func_info, 0, sizeof(zend_func_info)); - jit_extension->func_info.num_args = -1; - jit_extension->func_info.return_value_used = -1; jit_extension->counter = &zend_jit_hot_counters[zend_jit_op_array_hash(op_array) & (ZEND_HOT_COUNTERS_COUNT - 1)]; for (i = 0; i < op_array->last; i++) { jit_extension->orig_handlers[i] = op_array->opcodes[i].handler; @@ -3408,8 +3402,6 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script) } jit_extension = (zend_jit_op_array_extension*)zend_shared_alloc(sizeof(zend_jit_op_array_extension)); memset(&jit_extension->func_info, 0, sizeof(zend_func_info)); - jit_extension->func_info.num_args = -1; - jit_extension->func_info.return_value_used = -1; jit_extension->orig_handler = (void*)opline->handler; ZEND_SET_FUNC_INFO(op_array, (void*)jit_extension); opline->handler = (const void*)zend_jit_runtime_jit_handler; @@ -3429,8 +3421,6 @@ ZEND_EXT_API int zend_jit_op_array(zend_op_array *op_array, zend_script *script) } jit_extension = (zend_jit_op_array_extension*)zend_shared_alloc(sizeof(zend_jit_op_array_extension)); memset(&jit_extension->func_info, 0, sizeof(zend_func_info)); - jit_extension->func_info.num_args = -1; - jit_extension->func_info.return_value_used = -1; jit_extension->orig_handler = (void*)opline->handler; ZEND_SET_FUNC_INFO(op_array, (void*)jit_extension); opline->handler = (const void*)zend_jit_profile_jit_handler; diff --git a/ext/opcache/jit/zend_jit_trace.c b/ext/opcache/jit/zend_jit_trace.c index f668e5b725..39edc693c9 100644 --- a/ext/opcache/jit/zend_jit_trace.c +++ b/ext/opcache/jit/zend_jit_trace.c @@ -483,8 +483,6 @@ static zend_ssa *zend_jit_trace_build_ssa(const zend_op_array *op_array, zend_sc jit_extension = (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); memset(&jit_extension->func_info, 0, sizeof(jit_extension->func_info)); - jit_extension->func_info.num_args = -1; - jit_extension->func_info.return_value_used = -1; ssa = &jit_extension->func_info.ssa; if (JIT_G(opt_level) >= ZEND_JIT_LEVEL_OPT_FUNC) { @@ -4714,8 +4712,6 @@ jit_cleanup: (zend_jit_op_array_trace_extension*)ZEND_FUNC_INFO(op_array); memset(&jit_extension->func_info, 0, sizeof(jit_extension->func_info)); - jit_extension->func_info.num_args = -1; - jit_extension->func_info.return_value_used = -1; } zend_arena_release(&CG(arena), checkpoint); @@ -5763,8 +5759,6 @@ static int zend_jit_setup_hot_trace_counters(zend_op_array *op_array) jit_extension = (zend_jit_op_array_trace_extension*)zend_shared_alloc(sizeof(zend_jit_op_array_trace_extension) + (op_array->last - 1) * sizeof(zend_op_trace_info)); memset(&jit_extension->func_info, 0, sizeof(zend_func_info)); - jit_extension->func_info.num_args = -1; - jit_extension->func_info.return_value_used = -1; jit_extension->op_array = op_array; jit_extension->offset = (char*)jit_extension->trace_info - (char*)op_array->opcodes; for (i = 0; i < op_array->last; i++) { |