Skip to content

Commit

Permalink
Fix warnings about const from prev commit
Browse files Browse the repository at this point in the history
  • Loading branch information
timo committed Mar 7, 2019
1 parent ce2152d commit bb2dc66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/spesh/inline.c
Expand Up @@ -91,7 +91,7 @@ static int is_static_frame_inlineable(MVMThreadContext *tc, MVMSpeshGraph *inlin
* and returns zero. Optionally builds up usage counts on the graph. */
static int is_graph_inlineable(MVMThreadContext *tc, MVMSpeshGraph *inliner,
MVMStaticFrame *target_sf, MVMSpeshIns *invoke_ins,
MVMSpeshGraph *ig, char **no_inline_reason, MVMOpInfo **no_inline_info) {
MVMSpeshGraph *ig, char **no_inline_reason, MVMOpInfo const **no_inline_info) {
MVMSpeshBB *bb = ig->entry;
MVMint32 same_hll = target_sf->body.cu->body.hll_config ==
inliner->sf->body.cu->body.hll_config;
Expand Down Expand Up @@ -220,7 +220,7 @@ MVMSpeshGraph * MVM_spesh_inline_try_get_graph(MVMThreadContext *tc, MVMSpeshGra
MVMSpeshIns *invoke_ins,
char **no_inline_reason,
MVMuint32 *effective_size,
MVMOpInfo **no_inline_info) {
MVMOpInfo const **no_inline_info) {
MVMSpeshGraph *ig;
MVMSpeshIns **deopt_usage_ins = NULL;

Expand Down Expand Up @@ -268,7 +268,7 @@ MVMSpeshGraph * MVM_spesh_inline_try_get_graph(MVMThreadContext *tc, MVMSpeshGra
/* Tries to get a spesh graph for a particular unspecialized candidate. */
MVMSpeshGraph * MVM_spesh_inline_try_get_graph_from_unspecialized(MVMThreadContext *tc,
MVMSpeshGraph *inliner, MVMStaticFrame *target_sf, MVMSpeshIns *invoke_ins,
MVMSpeshCallInfo *call_info, MVMSpeshStatsType *type_tuple, char **no_inline_reason, MVMOpInfo **no_inline_info) {
MVMSpeshCallInfo *call_info, MVMSpeshStatsType *type_tuple, char **no_inline_reason, MVMOpInfo const **no_inline_info) {
MVMSpeshGraph *ig;

/* Cannot inline with flattening args. */
Expand Down
4 changes: 2 additions & 2 deletions src/spesh/inline.h
Expand Up @@ -48,10 +48,10 @@ struct MVMSpeshInline {

MVMSpeshGraph * MVM_spesh_inline_try_get_graph(MVMThreadContext *tc,
MVMSpeshGraph *inliner, MVMStaticFrame *target_sf, MVMSpeshCandidate *cand,
MVMSpeshIns *invoke_ins, char **no_inline_reason, MVMuint32 *effective_size, MVMOpInfo **no_inline_info);
MVMSpeshIns *invoke_ins, char **no_inline_reason, MVMuint32 *effective_size, MVMOpInfo const **no_inline_info);
MVMSpeshGraph * MVM_spesh_inline_try_get_graph_from_unspecialized(MVMThreadContext *tc,
MVMSpeshGraph *inliner, MVMStaticFrame *target_sf, MVMSpeshIns *invoke_ins,
MVMSpeshCallInfo *call_info, MVMSpeshStatsType *type_tuple, char **no_inline_reason, MVMOpInfo **no_inline_info);
MVMSpeshCallInfo *call_info, MVMSpeshStatsType *type_tuple, char **no_inline_reason, MVMOpInfo const **no_inline_info);
void MVM_spesh_inline(MVMThreadContext *tc, MVMSpeshGraph *inliner,
MVMSpeshCallInfo *call_info, MVMSpeshBB *invoke_bb,
MVMSpeshIns *invoke, MVMSpeshGraph *inlinee, MVMStaticFrame *inlinee_sf,
Expand Down
6 changes: 3 additions & 3 deletions src/spesh/optimize.c
Expand Up @@ -8,7 +8,7 @@ static void optimize_bigint_bool_op(MVMThreadContext *tc, MVMSpeshGraph *g, MVMS
/* Logging of whether we can or can't inline. */
static void log_inline(MVMThreadContext *tc, MVMSpeshGraph *g, MVMStaticFrame *target_sf,
MVMSpeshGraph *inline_graph, MVMuint32 bytecode_size,
char *no_inline_reason, MVMint32 unspecialized, MVMOpInfo *no_inline_info) {
char *no_inline_reason, MVMint32 unspecialized, const MVMOpInfo *no_inline_info) {
if (tc->instance->spesh_inline_log) {
char *c_name_i = MVM_string_utf8_encode_C_string(tc, target_sf->body.name);
char *c_cuid_i = MVM_string_utf8_encode_C_string(tc, target_sf->body.cuuid);
Expand Down Expand Up @@ -1966,7 +1966,7 @@ static void optimize_call(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshBB *bb
if (spesh_cand >= 0) {
/* Yes. Will we be able to inline? */
char *no_inline_reason = NULL;
MVMOpInfo *no_inline_info = NULL;
const MVMOpInfo *no_inline_info = NULL;
MVMuint32 effective_size;
MVMSpeshGraph *inline_graph = MVM_spesh_inline_try_get_graph(tc, g,
target_sf, target_sf->body.spesh->body.spesh_candidates[spesh_cand],
Expand Down Expand Up @@ -2052,7 +2052,7 @@ static void optimize_call(MVMThreadContext *tc, MVMSpeshGraph *g, MVMSpeshBB *bb
* to us. If it's small, then we could produce one and inline it. */
else if (target_sf->body.bytecode_size < MVM_SPESH_MAX_INLINE_SIZE) {
char *no_inline_reason = NULL;
MVMOpInfo *no_inline_info = NULL;
const MVMOpInfo *no_inline_info = NULL;
MVMSpeshGraph *inline_graph = MVM_spesh_inline_try_get_graph_from_unspecialized(
tc, g, target_sf, ins, arg_info, stable_type_tuple, &no_inline_reason, &no_inline_info);
log_inline(tc, g, target_sf, inline_graph, target_sf->body.bytecode_size,
Expand Down

0 comments on commit bb2dc66

Please sign in to comment.