mesa/src/util
Nicolai Hähnle 98c348d26b st/glsl_to_tgsi: reduce stack explosion in recursive expression visitor
In optimized builds, visit(ir_expression *) experiences inlining with gcc that
leads the function to have a roughly 32KB stack frame. This is a problem given
that the function is called recursively. In non-optimized builds, the stack
frame is much smaller, hence one gets crashes that happen only in optimized
builds.

Arguably there is a compiler bug or at least severe misfeature here. In any
case, the easy thing to do for now seems to be moving the bulk of the
non-recursive code into a separate function. This is sufficient to convince my
version of gcc not to blow up the stack frame of the recursive part. Just to be
sure, add the gcc-specific noinline attribute to prevent this bug from
reoccuring if inliner heuristics change.

v2: put ATTRIBUTE_NOINLINE into macros.h

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95133
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95026
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92850
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Rob Clark <robdclark@gmail.com>
2016-04-29 11:52:59 -05:00
..
tests/hash_table util/hash_table: add _mesa_hash_table_clear (v4) 2016-02-03 14:03:25 +01:00
.gitignore util: add u_atomic_test to .gitignore 2014-12-16 13:50:59 +02:00
Android.mk android: fix the building rules for Android 5.0 2015-04-22 15:53:35 +01:00
bitset.h util/bitset: Allow iterating over const bitsets 2016-03-24 15:20:44 -07:00
debug.c util: move brw_env_var_as_boolean() to util 2015-11-24 10:02:55 -05:00
debug.h util: Include <stdbool.h> in debug.h. 2015-11-24 10:05:32 -08:00
format_srgb.h util: Tiny optimisation for the linear→srgb conversion 2015-11-27 10:55:22 +01:00
format_srgb.py gallium: Move sRGB <-> RGB handling to libmesautil 2014-08-04 11:07:15 -07:00
half_float.c glsl: move half<->float convertion to util 2015-10-16 19:33:37 -04:00
half_float.h glsl: move half<->float convertion to util 2015-10-16 19:33:37 -04:00
hash_table.c util/hash_table: add _mesa_hash_table_clear (v4) 2016-02-03 14:03:25 +01:00
hash_table.h util: fix new gcc6 warnings 2016-02-18 17:10:55 -05:00
list.h util/list: Add list splicing functions 2016-04-15 13:29:09 -07:00
macros.h st/glsl_to_tgsi: reduce stack explosion in recursive expression visitor 2016-04-29 11:52:59 -05:00
Makefile.am configure: Eliminate MSVC2008 compatibility. 2016-02-11 21:36:00 +00:00
Makefile.sources glsl: move half<->float convertion to util 2015-10-16 19:33:37 -04:00
mesa-sha1.c util: Fix warning of invalid return value 2016-04-15 15:00:58 -07:00
mesa-sha1.h util/sha: do not wrap header inclusion in extern "C" 2016-03-09 17:16:50 +00:00
ralloc.c ralloc: Fix ralloc_adopt() to the old context's last child's parent. 2015-12-18 23:30:51 -08:00
ralloc.h util/ralloc: Fix extern "C" usage. 2015-04-13 12:03:26 +01:00
register_allocate.c util/ra: (trivial) fix c99 loop variable initialization 2015-08-19 04:17:49 +02:00
register_allocate.h util/ra: Make allocating conflict lists optional 2015-08-18 17:48:53 -07:00
rgtc.c util: move shared rgtc code to util (v2) 2014-09-17 11:27:25 +10:00
rgtc.h util: move shared rgtc code to util (v2) 2014-09-17 11:27:25 +10:00
roundeven_test.c util: Add a roundeven test. 2015-03-18 21:06:26 -07:00
rounding.h util: (trivial) include c99_math.h in rounding.h 2015-08-19 04:17:36 +02:00
SConscript scons: Add a "check" target to run all unit tests. 2016-04-14 07:19:04 +01:00
set.c util/set: don't compare against deleted entries 2016-02-02 14:42:32 -05:00
set.h util/hash_set: Rework the API to know about hashing 2015-01-15 13:21:27 -08:00
simple_list.h mesa: Port a variant of 68afbe89c7 to util/ 2015-01-28 16:33:34 -08:00
strndup.c util: use strnlen() in strndup() implementations 2015-09-30 08:13:07 +02:00
strndup.h util: Fix strndup prototype on C++. 2015-09-29 16:01:56 +01:00
strtod.c mesa/main: free locale at exit 2015-06-29 09:06:40 -07:00
strtod.h mesa/main: free locale at exit 2015-06-29 09:06:40 -07:00
texcompress_rgtc_tmp.h util: move shared rgtc code to util (v2) 2014-09-17 11:27:25 +10:00
u_atomic.h util/u_atomic: Remove MSVC 2008 support. 2016-02-12 10:31:15 +00:00
u_atomic_test.c util: fix comment typo 2015-12-04 14:06:41 +00:00