Commit ec573d17 by Kyrylo Tkachov Committed by Kyrylo Tkachov

[1/2] Move choose_mult_variant declaration and dependent declarations to expmed.h

	* expmed.c (mult_variant, choose_mult_variant): Move declaration to...
	* expmed.h: ... Here.

From-SVN: r238337
parent 21bcd7be
2016-07-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* expmed.c (mult_variant, choose_mult_variant): Move declaration to...
* expmed.h: ... Here.
2016-07-14 Jan Hubicka <hubicka@ucw.cz> 2016-07-14 Jan Hubicka <hubicka@ucw.cz>
* gimple.h (stmt_can_terminate_bb_p): New function. * gimple.h (stmt_can_terminate_bb_p): New function.
......
...@@ -2482,16 +2482,8 @@ expand_variable_shift (enum tree_code code, machine_mode mode, rtx shifted, ...@@ -2482,16 +2482,8 @@ expand_variable_shift (enum tree_code code, machine_mode mode, rtx shifted,
} }
/* Indicates the type of fixup needed after a constant multiplication.
BASIC_VARIANT means no fixup is needed, NEGATE_VARIANT means that
the result should be negated, and ADD_VARIANT means that the
multiplicand should be added to the result. */
enum mult_variant {basic_variant, negate_variant, add_variant};
static void synth_mult (struct algorithm *, unsigned HOST_WIDE_INT, static void synth_mult (struct algorithm *, unsigned HOST_WIDE_INT,
const struct mult_cost *, machine_mode mode); const struct mult_cost *, machine_mode mode);
static bool choose_mult_variant (machine_mode, HOST_WIDE_INT,
struct algorithm *, enum mult_variant *, int);
static rtx expand_mult_const (machine_mode, rtx, HOST_WIDE_INT, rtx, static rtx expand_mult_const (machine_mode, rtx, HOST_WIDE_INT, rtx,
const struct algorithm *, enum mult_variant); const struct algorithm *, enum mult_variant);
static unsigned HOST_WIDE_INT invert_mod2n (unsigned HOST_WIDE_INT, int); static unsigned HOST_WIDE_INT invert_mod2n (unsigned HOST_WIDE_INT, int);
...@@ -2981,7 +2973,7 @@ synth_mult (struct algorithm *alg_out, unsigned HOST_WIDE_INT t, ...@@ -2981,7 +2973,7 @@ synth_mult (struct algorithm *alg_out, unsigned HOST_WIDE_INT t,
Return true if the cheapest of these cost less than MULT_COST, Return true if the cheapest of these cost less than MULT_COST,
describing the algorithm in *ALG and final fixup in *VARIANT. */ describing the algorithm in *ALG and final fixup in *VARIANT. */
static bool bool
choose_mult_variant (machine_mode mode, HOST_WIDE_INT val, choose_mult_variant (machine_mode mode, HOST_WIDE_INT val,
struct algorithm *alg, enum mult_variant *variant, struct algorithm *alg, enum mult_variant *variant,
int mult_cost) int mult_cost)
......
...@@ -35,6 +35,15 @@ enum alg_code { ...@@ -35,6 +35,15 @@ enum alg_code {
alg_impossible alg_impossible
}; };
/* Indicates the type of fixup needed after a constant multiplication.
BASIC_VARIANT means no fixup is needed, NEGATE_VARIANT means that
the result should be negated, and ADD_VARIANT means that the
multiplicand should be added to the result. */
enum mult_variant {basic_variant, negate_variant, add_variant};
bool choose_mult_variant (machine_mode, HOST_WIDE_INT,
struct algorithm *, enum mult_variant *, int);
/* This structure holds the "cost" of a multiply sequence. The /* This structure holds the "cost" of a multiply sequence. The
"cost" field holds the total rtx_cost of every operator in the "cost" field holds the total rtx_cost of every operator in the
synthetic multiplication sequence, hence cost(a op b) is defined synthetic multiplication sequence, hence cost(a op b) is defined
......
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