+2009-02-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR middle-end/38981
+ * tree-ssa-coalesce.c (add_coalesce): Cap the costs of coalesce pairs
+ at MUST_COALESCE_COST-1 instead of MUST_COALESCE_COST.
+
2009-02-09 Richard Guenther <rguenther@suse.de>
PR middle-end/35202
--- /dev/null
+/* PR middle-end/38981 */
+/* Reporter: Kamaraju Kusumanchi <kamaraju@gmail.com> */
+
+struct d_info
+{
+ int **subs;
+};
+
+static int *
+d_substitution (struct d_info *di, int prefix)
+{
+ char c;
+
+ c='_';
+
+ if (c == '_')
+ {
+ unsigned int id;
+
+ if (c != '_')
+ {
+ do
+ {
+ unsigned int new_id;
+
+ if (new_id < id)
+ return 0;
+ id = new_id;
+ }
+ while (c != '_');
+ }
+
+
+
+ return di->subs[id];
+ }
+ else
+ {
+ int verbose;
+ int code;
+ int simple_len;
+
+ code=0;
+ simple_len=0;
+ verbose=0;
+ if (! code && prefix)
+ {
+ char peek;
+ peek='A';
+
+ if (peek == 'C' || peek == 'D')
+ verbose = 1;
+ }
+
+ if (verbose)
+ {
+ code = simple_len;
+ }
+
+ }
+}
/* Add a coalesce between P1 and P2 in list CL with a cost of VALUE. */
static inline void
-add_coalesce (coalesce_list_p cl, int p1, int p2,
- int value)
+add_coalesce (coalesce_list_p cl, int p1, int p2, int value)
{
coalesce_pair_p node;
node = find_coalesce_pair (cl, p1, p2, true);
- /* Once the value is MUST_COALESCE_COST, leave it that way. */
- if (node->cost != MUST_COALESCE_COST)
+ /* Once the value is at least MUST_COALESCE_COST - 1, leave it that way. */
+ if (node->cost < MUST_COALESCE_COST - 1)
{
- if (value == MUST_COALESCE_COST)
- node->cost = value;
- else
+ if (value < MUST_COALESCE_COST - 1)
node->cost += value;
+ else
+ node->cost = value;
}
}