Commit 9a0ac98f by Yuri Rumyantsev Committed by Kirill Yukhin

i386.c (distance_agu_use_in_bb): Proper initialization of 'prev' var to get…

i386.c (distance_agu_use_in_bb): Proper initialization of 'prev' var to get better distance estimation.

* config/i386/i386.c (distance_agu_use_in_bb) : Proper initialization
  of 'prev' var to get better distance estimation.

From-SVN: r202649
parent dff717d2
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> 2013-09-17 Eric Botcazou <ebotcazou@adacore.com>
* tree-inline.h (struct copy_body_data): Add transform_parameter. * tree-inline.h (struct copy_body_data): Add transform_parameter.
......
...@@ -17469,13 +17469,23 @@ distance_agu_use_in_bb (unsigned int regno, ...@@ -17469,13 +17469,23 @@ distance_agu_use_in_bb (unsigned int regno,
rtx insn, int distance, rtx start, rtx insn, int distance, rtx start,
bool *found, bool *redefined) bool *found, bool *redefined)
{ {
basic_block bb = start ? BLOCK_FOR_INSN (start) : NULL; basic_block bb = NULL;
rtx next = start; rtx next = start;
rtx prev = NULL; rtx prev = NULL;
*found = false; *found = false;
*redefined = 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 while (next
&& next != insn && next != insn
&& distance < LEA_SEARCH_THRESHOLD) && distance < LEA_SEARCH_THRESHOLD)
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