From: Martin Sebor Date: Thu, 19 Aug 2021 18:49:40 +0000 (-0600) Subject: Document enable_ranger and disable_ranger. X-Git-Tag: basepoints/gcc-13~5281 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=77bf9f83b8e388de8bedb259991f588a7b8a7f57;p=thirdparty%2Fgcc.git Document enable_ranger and disable_ranger. gcc: * gimple-range.cc: Add comments. * gimple-range.h: Same. --- diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc index 60b7d3a59cd7..ef3afeacc901 100644 --- a/gcc/gimple-range.cc +++ b/gcc/gimple-range.cc @@ -381,6 +381,10 @@ gimple_ranger::dump (FILE *f) m_cache.dump (f); } +/* Create a new ranger instance and associate it with function FUN. + Each call must be paired with a call to disable_ranger to release + resources. */ + gimple_ranger * enable_ranger (struct function *fun) { @@ -392,6 +396,9 @@ enable_ranger (struct function *fun) return r; } +/* Destroy and release the ranger instance associated with function FUN + and replace it the global ranger. */ + void disable_ranger (struct function *fun) { diff --git a/gcc/gimple-range.h b/gcc/gimple-range.h index 41845b14fd63..eaebb9c58337 100644 --- a/gcc/gimple-range.h +++ b/gcc/gimple-range.h @@ -62,6 +62,9 @@ protected: range_tracer tracer; }; +/* Create a new ranger instance and associate it with a function. + Each call must be paired with a call to disable_ranger to release + resources. */ extern gimple_ranger *enable_ranger (struct function *); extern void disable_ranger (struct function *);