From: Christian Würdig Date: Fri, 18 Aug 2006 12:55:41 +0000 (+0000) Subject: fixed typo X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=128a7b6a76583aff8c92ff2a9d639240485226db;p=libfirm fixed typo added verification: check for don't spill flag when creating spill --- diff --git a/ir/be/bespill.c b/ir/be/bespill.c index 477101b8d..26569538f 100644 --- a/ir/be/bespill.c +++ b/ir/be/bespill.c @@ -14,6 +14,7 @@ #include "irnode_t.h" #include "ircons_t.h" #include "iredges_t.h" +#include "irprintf.h" #include "ident_t.h" #include "type_t.h" #include "entity_t.h" @@ -237,7 +238,7 @@ static void spill_irn(spill_env_t *env, spill_info_t *spillinfo) { /* Trying to spill an already spilled value, no need for a new spill * node then, we can simply connect to the same one for this reload * - * (although rematerialisation code should handle most of these cases + * (although rematerialization code should handle most of these cases * this can still happen when spilling Phis) */ if(be_is_Reload(to_spill)) { @@ -245,6 +246,13 @@ static void spill_irn(spill_env_t *env, spill_info_t *spillinfo) { return; } + if (arch_irn_is(env->arch_env, to_spill, dont_spill)) { + if (env->chordal_env->opts->vrfy_option == BE_CH_VRFY_WARN) + ir_fprintf(stderr, "Verify warning: spilling 'dont_spill' node %+F\n", to_spill); + else if (env->chordal_env->opts->vrfy_option == BE_CH_VRFY_ASSERT) + assert(0 && "Attempt to spill a node marked 'dont_spill'"); + } + spillinfo->spill = be_spill(env->arch_env, to_spill); sched_add_after_insn(to_spill, spillinfo->spill); }