* config/i386/i386.c (distance_agu_use_in_bb) : Proper initialization
of 'prev' var to get better distance estimation.
From-SVN: r202649
+2013-09-17 Yuri Rumyantsev <ysrumyan@gmail.com>
+
+ * config/i386/i386.c (distance_agu_use_in_bb) : Proper initialization
+ of 'prev' var to get better distance estimation.
+
2013-09-17 Eric Botcazou <ebotcazou@adacore.com>
* tree-inline.h (struct copy_body_data): Add transform_parameter.
rtx insn, int distance, rtx start,
bool *found, bool *redefined)
{
- basic_block bb = start ? BLOCK_FOR_INSN (start) : NULL;
+ basic_block bb = NULL;
rtx next = start;
rtx prev = NULL;
*found = false;
*redefined = false;
+ if (start != NULL_RTX)
+ {
+ bb = BLOCK_FOR_INSN (start);
+ if (start != BB_HEAD (bb))
+ /* If insn and start belong to the same bb, set prev to insn,
+ so the call to increase_distance will increase the distance
+ between insns by 1. */
+ prev = insn;
+ }
+
while (next
&& next != insn
&& distance < LEA_SEARCH_THRESHOLD)