+2010-09-02 Olivier Hainque <hainque@adacore.com>
+
+ * ira-color.c (SORTGT): New macro, helper for qsort callbacks.
+ (allocno_priority_compare_func): Use it instead of a straight
+ difference computation over priorities.
+
2010-09-02 Andi Kleen <ak@linux.intel.com>
* opts.c (common_handle_option): Fix OPT_fwhopr/fwhopr_ handling.
(scev_probably_wraps_p): Adjust.
* tree-ssa-loop.c (tree_ssa_loop_bounds): Likewise.
+>>>>>>> .r163759
2010-09-01 Nick Clifton <nickc@redhat.com>
* config/stormy16/stormy16.c: Use REG_P, MEM_P and CONST_INT_P
more costly although simpler. */
static VEC(ira_allocno_t,heap) *removed_splay_allocno_vec;
+/* Helper for qsort comparison callbacks - return a positive integer if
+ X > Y, or a negative value otherwise. Use a conditional expression
+ instead of a difference computation to insulate from possible overflow
+ issues, e.g. X - Y < 0 for some X > 0 and Y < 0. */
+#define SORTGT(x,y) (((x) > (y)) ? 1 : -1)
+
\f
/* This page contains functions used to find conflicts using allocno
pri1 = allocno_priorities[ALLOCNO_NUM (a1)];
pri2 = allocno_priorities[ALLOCNO_NUM (a2)];
- if (pri2 - pri1)
- return pri2 - pri1;
+ if (pri2 != pri1)
+ return SORTGT (pri2, pri1);
/* If regs are equally good, sort by allocnos, so that the results of
qsort leave nothing to chance. */