aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop-invariant.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2014-08-22 18:08:51 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2014-08-22 18:08:51 +0000
commit89bfd6f5c8fb65df258f063e6a81926625217c97 (patch)
tree6c38670a316966e31d0d0b83cffac75af2480862 /gcc/loop-invariant.c
parent871eb193238ded31b97728930eb0b15c865f6a03 (diff)
downloadgcc-89bfd6f5c8fb65df258f063e6a81926625217c97.zip
gcc-89bfd6f5c8fb65df258f063e6a81926625217c97.tar.gz
gcc-89bfd6f5c8fb65df258f063e6a81926625217c97.tar.bz2
loop-invariant.c: Use rtx_insn in various places
gcc/ * loop-invariant.c (struct use): Strengthen field "insn" from rtx to rtx_insn *. (struct invariant): Likewise. (hash_invariant_expr_1): Likewise for param "insn". (invariant_expr_equal_p): Likewise for param "insn1", "insn2". (find_exits): Likewise for local "insn". (create_new_invariant): Likewise for param "insn". (check_dependencies): Likewise. (find_invariant_insn): Likewise. (record_uses): Likewise. (find_invariants_insn): Likewise. (find_invariants_bb): Likewise for local "insn". (get_pressure_class_and_nregs): Likewise for param "insn". (calculate_loop_reg_pressure): Likewise for local "insn". From-SVN: r214343
Diffstat (limited to 'gcc/loop-invariant.c')
-rw-r--r--gcc/loop-invariant.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/gcc/loop-invariant.c b/gcc/loop-invariant.c
index bd67eb9..1ac2ebd 100644
--- a/gcc/loop-invariant.c
+++ b/gcc/loop-invariant.c
@@ -78,7 +78,7 @@ struct loop_data
struct use
{
rtx *pos; /* Position of the use. */
- rtx insn; /* The insn in that the use occurs. */
+ rtx_insn *insn; /* The insn in that the use occurs. */
unsigned addr_use_p; /* Whether the use occurs in an address. */
struct use *next; /* Next use in the list. */
};
@@ -119,7 +119,7 @@ struct invariant
struct def *def;
/* The insn in that it is defined. */
- rtx insn;
+ rtx_insn *insn;
/* Whether it is always executed. */
bool always_executed;
@@ -289,7 +289,7 @@ invariant_for_use (df_ref use)
/* Computes hash value for invariant expression X in INSN. */
static hashval_t
-hash_invariant_expr_1 (rtx insn, rtx x)
+hash_invariant_expr_1 (rtx_insn *insn, rtx x)
{
enum rtx_code code = GET_CODE (x);
int i, j;
@@ -343,7 +343,7 @@ hash_invariant_expr_1 (rtx insn, rtx x)
and INSN2 have always the same value. */
static bool
-invariant_expr_equal_p (rtx insn1, rtx e1, rtx insn2, rtx e2)
+invariant_expr_equal_p (rtx_insn *insn1, rtx e1, rtx_insn *insn2, rtx e2)
{
enum rtx_code code = GET_CODE (e1);
int i, j;
@@ -578,7 +578,7 @@ find_exits (struct loop *loop, basic_block *body,
edge e;
struct loop *outermost_exit = loop, *aexit;
bool has_call = false;
- rtx insn;
+ rtx_insn *insn;
for (i = 0; i < loop->num_nodes; i++)
{
@@ -689,7 +689,7 @@ find_defs (struct loop *loop)
is returned. */
static struct invariant *
-create_new_invariant (struct def *def, rtx insn, bitmap depends_on,
+create_new_invariant (struct def *def, rtx_insn *insn, bitmap depends_on,
bool always_executed)
{
struct invariant *inv = XNEW (struct invariant);
@@ -833,7 +833,7 @@ check_dependency (basic_block bb, df_ref use, bitmap depends_on)
loop invariants, false otherwise. */
static bool
-check_dependencies (rtx insn, bitmap depends_on)
+check_dependencies (rtx_insn *insn, bitmap depends_on)
{
struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
df_ref use;
@@ -887,7 +887,7 @@ pre_check_invariant_p (bool simple, rtx dest)
unless the program ends due to a function call. */
static void
-find_invariant_insn (rtx insn, bool always_reached, bool always_executed)
+find_invariant_insn (rtx_insn *insn, bool always_reached, bool always_executed)
{
df_ref ref;
struct def *def;
@@ -950,7 +950,7 @@ find_invariant_insn (rtx insn, bool always_reached, bool always_executed)
/* Record registers used in INSN that have a unique invariant definition. */
static void
-record_uses (rtx insn)
+record_uses (rtx_insn *insn)
{
struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn);
df_ref use;
@@ -975,7 +975,7 @@ record_uses (rtx insn)
unless the program ends due to a function call. */
static void
-find_invariants_insn (rtx insn, bool always_reached, bool always_executed)
+find_invariants_insn (rtx_insn *insn, bool always_reached, bool always_executed)
{
find_invariant_insn (insn, always_reached, always_executed);
record_uses (insn);
@@ -989,7 +989,7 @@ find_invariants_insn (rtx insn, bool always_reached, bool always_executed)
static void
find_invariants_bb (basic_block bb, bool always_reached, bool always_executed)
{
- rtx insn;
+ rtx_insn *insn;
FOR_BB_INSNS (bb, insn)
{
@@ -1066,7 +1066,7 @@ free_use_list (struct use *use)
/* Return pressure class and number of hard registers (through *NREGS)
for destination of INSN. */
static enum reg_class
-get_pressure_class_and_nregs (rtx insn, int *nregs)
+get_pressure_class_and_nregs (rtx_insn *insn, int *nregs)
{
rtx reg;
enum reg_class pressure_class;
@@ -1878,7 +1878,8 @@ calculate_loop_reg_pressure (void)
unsigned int j;
bitmap_iterator bi;
basic_block bb;
- rtx insn, link;
+ rtx_insn *insn;
+ rtx link;
struct loop *loop, *parent;
FOR_EACH_LOOP (loop, 0)