Commit 48a31a09 by Richard Biener Committed by Richard Biener

re PR target/91522 (STV is slow)

2019-08-26  Richard Biener  <rguenther@suse.de>

	PR target/91522
	PR target/91527
	* config/i386/i386-features.h (general_scalar_chain::defs_map):
	New member.
	(general_scalar_chain::replace_with_subreg): Remove.
	(general_scalar_chain::replace_with_subreg_in_insn): Likewise.
	(general_scalar_chain::convert_reg): Adjust signature.
	* config/i386/i386-features.c (scalar_chain::add_insn): Do not
	iterate over all defs of a reg.
	(general_scalar_chain::replace_with_subreg): Remove.
	(general_scalar_chain::replace_with_subreg_in_insn): Likewise.
	(general_scalar_chain::make_vector_copies): Populate defs_map,
	place copy only after defs that are used as vectors in the chain.
	(general_scalar_chain::convert_reg): Emit a copy for a specific
	def in a specific instruction.
	(general_scalar_chain::convert_op): All reg uses are converted here.
	(general_scalar_chain::convert_insn): Emit copies for scalar
	uses of defs here.  Replace uses with the copies we created.
	Replace and convert the def.  Adjust REG_DEAD notes, remove
	REG_EQUIV/EQUAL notes.
	(general_scalar_chain::convert_registers): Only handle copies
	into the chain here.

From-SVN: r274926
parent df7d46d9
2019-08-26 Richard Biener <rguenther@suse.de>
PR target/91522
PR target/91527
* config/i386/i386-features.h (general_scalar_chain::defs_map):
New member.
(general_scalar_chain::replace_with_subreg): Remove.
(general_scalar_chain::replace_with_subreg_in_insn): Likewise.
(general_scalar_chain::convert_reg): Adjust signature.
* config/i386/i386-features.c (scalar_chain::add_insn): Do not
iterate over all defs of a reg.
(general_scalar_chain::replace_with_subreg): Remove.
(general_scalar_chain::replace_with_subreg_in_insn): Likewise.
(general_scalar_chain::make_vector_copies): Populate defs_map,
place copy only after defs that are used as vectors in the chain.
(general_scalar_chain::convert_reg): Emit a copy for a specific
def in a specific instruction.
(general_scalar_chain::convert_op): All reg uses are converted here.
(general_scalar_chain::convert_insn): Emit copies for scalar
uses of defs here. Replace uses with the copies we created.
Replace and convert the def. Adjust REG_DEAD notes, remove
REG_EQUIV/EQUAL notes.
(general_scalar_chain::convert_registers): Only handle copies
into the chain here.
2019-08-26 Robin Dapp <rdapp@linux.ibm.com> 2019-08-26 Robin Dapp <rdapp@linux.ibm.com>
* match.pd: Add (T)(A) + CST -> (T)(A + CST). * match.pd: Add (T)(A) + CST -> (T)(A + CST).
......
...@@ -171,12 +171,11 @@ class general_scalar_chain : public scalar_chain ...@@ -171,12 +171,11 @@ class general_scalar_chain : public scalar_chain
: scalar_chain (smode_, vmode_) {} : scalar_chain (smode_, vmode_) {}
int compute_convert_gain (); int compute_convert_gain ();
private: private:
hash_map<rtx, rtx> defs_map;
void mark_dual_mode_def (df_ref def); void mark_dual_mode_def (df_ref def);
rtx replace_with_subreg (rtx x, rtx reg, rtx subreg);
void replace_with_subreg_in_insn (rtx_insn *insn, rtx reg, rtx subreg);
void convert_insn (rtx_insn *insn); void convert_insn (rtx_insn *insn);
void convert_op (rtx *op, rtx_insn *insn); void convert_op (rtx *op, rtx_insn *insn);
void convert_reg (unsigned regno); void convert_reg (rtx_insn *insn, rtx dst, rtx src);
void make_vector_copies (unsigned regno); void make_vector_copies (unsigned regno);
void convert_registers (); void convert_registers ();
int vector_const_cost (rtx exp); int vector_const_cost (rtx exp);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment