]> git.ipfire.org Git - thirdparty/gcc.git/commit
Reimplement 'assume' processing pass.
authorAndrew MacLeod <amacleod@redhat.com>
Mon, 28 Oct 2024 14:19:27 +0000 (10:19 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Fri, 1 Nov 2024 19:24:09 +0000 (15:24 -0400)
commit62420dbd105bbc4fe732881875c5c85aa55b6069
treeec2fec5984d100a6c5c78c96f5a29315d4fe6a64
parentfe22e18c1b00f4d95aec6d40333aecd1e9c700c7
Reimplement 'assume' processing pass.

Rework the assume pass to work properly and fail conservatively when it
does.  Also move it to its own file.

PR tree-optimization/117287
gcc/
* Makefile.in (IBJS): Add tree-assume.o
* gimple-range.cc (assume_query::assume_range_p): Remove.
(assume_query::range_of_expr): Remove.
(assume_query::assume_query): Move to tree-assume.cc.
(assume_query::~assume_query): Remove.
(assume_query::calculate_op): Move to tree-assume.cc.
(assume_query::calculate_phi): Likewise.
(assume_query::check_taken_edge): Remove.
(assume_query::calculate_stmt): Move to tree-assume.cc.
(assume_query::dump): Remove.
* gimple-range.h (class assume_query): Move to tree-assume.cc
* tree-assume.cc: New
* tree-vrp.cc (struct pass_data_assumptions): Move to tree-assume.cc.
(class pass_assumptions): Likewise.
(make_pass_assumptions): Likewise.

gcc/testsuite/
* g++.dg/cpp23/pr117287-attr.C: New.
gcc/Makefile.in
gcc/gimple-range.cc
gcc/gimple-range.h
gcc/testsuite/g++.dg/cpp23/pr117287-attr.C [new file with mode: 0644]
gcc/tree-assume.cc [new file with mode: 0644]
gcc/tree-vrp.cc