diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-22 07:14:10 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2017-05-22 07:14:10 +0000 |
commit | dc54d0c9388444d7a479a248b749aacd73ab3be7 (patch) | |
tree | db72b530047188304b260e47f054568301fd52cc | |
parent | 04f0b5c533fc1fda865c0b689fe487a3947e2316 (diff) | |
download | gcc-dc54d0c9388444d7a479a248b749aacd73ab3be7.tar.gz |
2017-05-22 Richard Biener <rguenther@suse.de>
* df-scan.c (df_insn_refs_verify): Speedup when not verifying.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@248318 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/df-scan.c | 17 |
2 files changed, 16 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2b490dc5711..5e76d2ffe35 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2017-05-22 Richard Biener <rguenther@suse.de> + + * df-scan.c (df_insn_refs_verify): Speedup when not verifying. + 2017-05-19 Jason Merrill <jason@redhat.com> * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t. diff --git a/gcc/df-scan.c b/gcc/df-scan.c index 4884608b167..dde6d15d07b 100644 --- a/gcc/df-scan.c +++ b/gcc/df-scan.c @@ -4103,23 +4103,30 @@ df_insn_refs_verify (struct df_collection_rec *collection_rec, rtx_insn *insn, bool abort_if_fail) { - bool ret1, ret2, ret3, ret4; + bool ret1, ret2, ret3; unsigned int uid = INSN_UID (insn); struct df_insn_info *insn_info = DF_INSN_INFO_GET (insn); df_insn_refs_collect (collection_rec, bb, insn_info); /* Unfortunately we cannot opt out early if one of these is not - right because the marks will not get cleared. */ + right and abort_if_fail is set because the marks will not get cleared. */ ret1 = df_refs_verify (&collection_rec->def_vec, DF_INSN_UID_DEFS (uid), abort_if_fail); + if (!ret1 && !abort_if_fail) + return false; ret2 = df_refs_verify (&collection_rec->use_vec, DF_INSN_UID_USES (uid), abort_if_fail); + if (!ret2 && !abort_if_fail) + return false; ret3 = df_refs_verify (&collection_rec->eq_use_vec, DF_INSN_UID_EQ_USES (uid), abort_if_fail); - ret4 = df_mws_verify (&collection_rec->mw_vec, DF_INSN_UID_MWS (uid), - abort_if_fail); - return (ret1 && ret2 && ret3 && ret4); + if (!ret3 && !abort_if_fail) + return false; + if (! df_mws_verify (&collection_rec->mw_vec, DF_INSN_UID_MWS (uid), + abort_if_fail)) + return false; + return (ret1 && ret2 && ret3); } |