This is the mail archive of the
mailing list for the GCC project.
Re: VRP speedup
Jan Hubicka wrote on 12/06/06 08:19:
My overall plan with VRP is after this patch avoid more of the direct
folder calls (first they tend to be wrong comparing boolean_true_node
and they are mostly convertible to the new comparsion thingy.), rewrite
the ranges_intersect_p predicate so it does two comparsions instead of 6
and then try to reorg the propagation engine to avoid propagating over
unchanged PHI edges.
I don't follow, to do merging on a PHI node, you still need the values
of the executed edges. You just don't visit the source more than
once. Scheduling big PHI nodes late, will help but you *do* need to
OK after testing.
* tree-vrp.c (operand_less_p): New.
(compare_values, value_inside_range): Rewrite in terms of
+ /* Return
+ 1 if VAL < VAL2Vertical spacing after comment.
+ 0 if !(VAL < VAL2)
+ -2 if those are incomparable. */
+ static inline int
Spacing before comment.
+ operand_less_p (tree val, tree val2)
+ tree tcmp;
+ /* LT is folded faster than GE and others. Inline the common case. */
Spacing before if().
+ if (TREE_CODE (val) == INTEGER_CST && TREE_CODE (val2) == INTEGER_CST)
+ if (TYPE_UNSIGNED (TREE_TYPE (val)))
+ return INT_CST_LT_UNSIGNED (val, val2);
+ return INT_CST_LT (val, val2);
+ tcmp = fold_binary_to_constant (LT_EXPR, boolean_type_node, val, val2);
+ if (!tcmp)
Spacing before return (Yes, I'm claustrophobic).
+ return -2;
+ return !integer_zerop (tcmp);