diff options
author | David Malcolm <dmalcolm@redhat.com> | 2022-07-19 20:22:18 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2022-07-19 20:22:18 -0400 |
commit | 68871a008e686dbe56ff0b502f2864176a140716 (patch) | |
tree | 3e344cb2ff5892d013c261908ca32ea3fa3a574d /gcc/analyzer/region.h | |
parent | 7c0c10db24f5c7f8c30810699fb0aff3c900d41a (diff) | |
download | gcc-68871a008e686dbe56ff0b502f2864176a140716.zip gcc-68871a008e686dbe56ff0b502f2864176a140716.tar.gz gcc-68871a008e686dbe56ff0b502f2864176a140716.tar.bz2 |
analyzer: don't track string literals in the store [PR106359]
Doing so speeds up -fanalyzer from taking over 4 hours to under a
minute on the Linux kernel's sound/soc/codecs/cs47l90.c
gcc/analyzer/ChangeLog:
PR analyzer/106359
* region.h (string_region::tracked_p): New.
* store.cc (binding_cluster::binding_cluster): Move here from
store.h. Add assertion that base_region is tracked_p.
* store.h (binding_cluster::binding_cluster): Move to store.cc.
Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/analyzer/region.h')
-rw-r--r-- | gcc/analyzer/region.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/analyzer/region.h b/gcc/analyzer/region.h index 60d8149..fd0d4a0 100644 --- a/gcc/analyzer/region.h +++ b/gcc/analyzer/region.h @@ -1151,6 +1151,10 @@ public: void dump_to_pp (pretty_printer *pp, bool simple) const final override; + /* We assume string literals are immutable, so we don't track them in + the store. */ + bool tracked_p () const final override { return false; } + tree get_string_cst () const { return m_string_cst; } private: |