#include "tm.h"
#include "tree.h"
#include "flags.h"
-#include "rtl.h"
#include "tm_p.h"
-#include "ggc.h"
#include "basic-block.h"
#include "output.h"
-#include "expr.h"
#include "function.h"
-#include "diagnostic.h"
#include "tree-flow.h"
#include "tree-dump.h"
#include "tree-pass.h"
for (gsi = gsi_start_phis (e->dest); !gsi_end_p (gsi); gsi_next (&gsi))
{
gimple phi = gsi_stmt (gsi);
-
+ source_location locus;
int indx = rd->outgoing_edge->dest_idx;
- add_phi_arg (phi, gimple_phi_arg_def (phi, indx), e);
+
+ locus = gimple_phi_arg_location (phi, indx);
+ add_phi_arg (phi, gimple_phi_arg_def (phi, indx), e, locus);
}
}
gsi = gsi_start_bb (bb);
while (!gsi_end_p (gsi)
&& (gimple_code (gsi_stmt (gsi)) == GIMPLE_LABEL
+ || is_gimple_debug (gsi_stmt (gsi))
|| gimple_nop_p (gsi_stmt (gsi))))
gsi_next (&gsi);
-
+
/* Check if this is an empty block. */
if (gsi_end_p (gsi))
return true;
basic_block bb = e->dest;
edge eto = (edge) e->aux;
struct redirection_data rd;
- struct local_info local_info;
e->aux = NULL;
/* Otherwise, we need to create a copy. */
update_bb_profile_for_threading (bb, EDGE_FREQUENCY (e), e->count, eto);
- local_info.bb = bb;
rd.outgoing_edge = eto;
create_block_for_threading (bb, &rd);
else
tgt_bb = split_edge (tgt_edge);
}
-
+
if (latch->aux)
{
/* First handle the case latch edge is redirected. */
loop->header = latch->dest;
loop->latch = latch->src;
}
-
+
return true;
fail:
/* If optimizing for size, only thread through block if we don't have
to duplicate it or it's an otherwise empty redirection block. */
- if (optimize_size)
+ if (optimize_function_for_size_p (cfun))
{
EXECUTE_IF_SET_IN_BITMAP (tmp, 0, i, bi)
{