[COMMITTED 1/2] Adjust on_entry cache to indicate if the value was set properly.
Martin Sebor
msebor@gmail.com
Fri Jun 25 22:58:22 GMT 2021
I just glanced at the patch out of curiosity and the first hunk
caught my eye. There's nothing wrong with the change and I like
how you make the APIs const-correct! Just a note that it looks
like the const in on the basic_block declaration might be missing
an underscore (it should be const_basic_block). Otherwise it's
superfluous. This is repeated in a bunch of places in the file
and its header.
Martin
diff --git a/gcc/gimple-range-cache.cc b/gcc/gimple-range-cache.cc
index 4347485cf98..bdecd212691 100644
--- a/gcc/gimple-range-cache.cc
+++ b/gcc/gimple-range-cache.cc
@@ -132,7 +132,7 @@ non_null_ref::process_name (tree name)
class ssa_block_ranges
{
public:
- virtual void set_bb_range (const basic_block bb, const irange &r) = 0;
+ virtual bool set_bb_range (const basic_block bb, const irange &r) = 0;
virtual bool get_bb_range (irange &r, const basic_block bb) = 0;
virtual bool bb_range_p (const basic_block bb) = 0;
On 6/23/21 8:27 AM, Andrew MacLeod via Gcc-patches wrote:
> The introduction of the sparse bitmap on-entry cache for large BB
> functions also introduced the concept that the value we ask to be
> written to the cache may not be properly represented. It is limited to
> 15 unique ranges for any given ssa-name, then it reverts to varying for
> any additional values to be safe.
>
> This patch adds a boolean return value to the cache set routines,
> allowing us to check if the value was properly written.
>
> Other than that, no functional change.
>
> Bootstrap on x86_64-pc-linux-gnu with no regressions. pushed.
>
> Andrew
>
More information about the Gcc-patches
mailing list