On 10/26/2015 04:47 PM, Anatoliy Sokolov wrote:
Hello.
This patch add contains_symbol_ref_p function in rtlanal.c and remove
contains_symbol_ref_p from lra-constraints.c and contains_symbol_ref
from var-tracking.c.
Bootstrapped and reg-tested on x86_64-unknown-linux-gnu.
OK for trunk?
2015-10-27 Anatoly Sokolov <ae...@post.ru>
* rtl.h (contains_symbol_ref_p): Declare.
(SYMBOL_REF_P): Define.
* rtlanal.c (contains_symbol_ref_p: New function.
* lra-constraints.c (contains_symbol_ref_p): Remove.
* var-tracking.c (contains_symbol_ref): Remove.
(track_expr_p): Use contains_symbol_ref_p instead of
contains_symbol_ref.
My only concern here is whether or not FOR_EACH_SUBRTX correctly handles
the case for X is NULL. I'd be surprised if it didn't but it'd be best
to be sure. Note that lra-constraints didn't check for that while
var-tracking did.
My reading of rtl-iterator leads me to believe it'll do the expected
thing with a NULL. SO with that in mind. Approved.
Jeff