if (m_demands[i] != other.demand_p ((enum demand_type) i))
return false;
- if (m_insn != other.get_insn ())
- return false;
- if (m_dirty_pat != other.get_dirty_pat ())
- return false;
+ if (vector_config_insn_p (m_insn->rtl ())
+ || vector_config_insn_p (other.get_insn ()->rtl ()))
+ if (m_insn != other.get_insn ())
+ return false;
if (!same_avl_p (other))
return false;
new_info.set_insn (merge_info.get_insn ());
}
- new_info.set_dirty_pat (merge_info.get_dirty_pat ());
-
if (!demand_p (DEMAND_AVL) && !merge_info.demand_p (DEMAND_AVL))
new_info.undemand (DEMAND_AVL);
if (!demand_p (DEMAND_SEW) && !merge_info.demand_p (DEMAND_SEW))
fprintf (file, "The real INSN=");
print_rtl_single (file, get_insn ()->rtl ());
}
- if (get_dirty_pat ())
- {
- fprintf (file, "Dirty RTL Pattern=");
- print_rtl_single (file, get_dirty_pat ());
- }
}
}
new_info.set_dirty ();
rtx new_pat = gen_vsetvl_pat (new_info.get_insn ()->rtl (), new_info);
- new_info.set_dirty_pat (new_pat);
father_info.local_dem = new_info;
father_info.reaching_out = new_info;
block_info.reaching_out = prop;
block_info.reaching_out.set_dirty ();
- block_info.reaching_out.set_dirty_pat (new_pat);
block_info.local_dem = block_info.reaching_out;
changed_p = true;
}
rtx new_pat
= gen_vsetvl_pat (new_info.get_insn ()->rtl (), new_info);
new_info.set_dirty ();
- new_info.set_dirty_pat (new_pat);
block_info.local_dem = new_info;
block_info.reaching_out = new_info;
changed_p = true;
= gen_vsetvl_pat (prop.get_insn ()->rtl (), prop);
local_dem = prop;
local_dem.set_dirty ();
- local_dem.set_dirty_pat (dirty_pat);
reaching_out = local_dem;
}
else
if (!reaching_out.dirty_p ())
continue;
- rtx new_pat = reaching_out.get_dirty_pat ();
+
+ rtx new_pat;
if (can_refine_vsetvl_p (cfg_bb, reaching_out.get_ratio ()))
new_pat
= gen_vsetvl_pat (VSETVL_VTYPE_CHANGE_ONLY, reaching_out, NULL_RTX);
+ else if (vlmax_avl_p (reaching_out.get_avl ()))
+ new_pat = gen_vsetvl_pat (VSETVL_NORMAL, reaching_out,
+ get_vl (reaching_out.get_insn ()->rtl ()));
+ else
+ new_pat
+ = gen_vsetvl_pat (VSETVL_DISCARD_RESULT, reaching_out, NULL_RTX);
start_sequence ();
emit_insn (new_pat);
(with AVL included) before vmv.x.s, but vmv.x.s is not the INSN holding the
definition of AVL. */
rtl_ssa::insn_info *m_insn;
- /* Save instruction pattern for Dirty block.
- Since empty block may be polluted as a dirty block during dem backward
- propagation (phase 3) which is intending to cheat LCM there is a VSETVL
- instruction here to gain better LCM optimization. Such instruction is not
- emit yet, we save this here and then emit it in the 4th phase if it is
- necessary. */
- rtx m_dirty_pat;
/* Parse the instruction to get VL/VTYPE information and demanding
* information. */
public:
vector_insn_info ()
: vl_vtype_info (), m_state (UNINITIALIZED), m_demands{false},
- m_insn (nullptr), m_dirty_pat (NULL_RTX)
+ m_insn (nullptr)
{}
bool operator> (const vector_insn_info &) const;
void set_unknown () { m_state = UNKNOWN; }
void set_empty () { m_state = EMPTY; }
void set_dirty () { m_state = DIRTY; }
- void set_dirty_pat (rtx pat) { m_dirty_pat = pat; }
void set_insn (rtl_ssa::insn_info *insn) { m_insn = insn; }
void set_demand_info (const vector_insn_info &);
vector_insn_info merge (const vector_insn_info &, bool) const;
rtl_ssa::insn_info *get_insn () const { return m_insn; }
- rtx get_dirty_pat () const { return m_dirty_pat; }
void dump (FILE *) const;
};