Lines Matching +full:pass +full:- +full:through

1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright 2011-2017 by the PaX Team <pageexec@freemail.hu>
13 * - after alloca();
14 * - for the functions with a stack frame size greater than or equal
15 * to the "track-min-size" plugin parameter.
22 * - use fprintf() to stderr, debug_generic_expr(), debug_gimple_stmt(),
24 * - add "-fdump-tree-all -fdump-rtl-all" to the plugin CFLAGS in
25 * Makefile.gcc-plugins to see the verbose dumps of the gcc passes;
26 * - use gcc -E to understand the preprocessing shenanigans;
27 * - use gcc with enabled CFG/GIMPLE/SSA verification (--enable-checking).
30 #include "gcc-common.h"
34 static int track_frame_size = -1;
42 * they point to the garbage-collected memory.
48 .help = "track-min-size=nn\ttrack stack for functions with a stack frame size >= nn bytes\n"
74 gimple_call, bb->count, in add_stack_tracking_gcall()
97 if (DECL_NAME_LENGTH(var) != sizeof("current_stack_pointer") - 1) in get_current_stack_pointer_decl()
127 * This constraint is taken into account during gcc shrink-wrapping in add_stack_tracking_gasm()
157 * caller-saved registers in the functions from which we will remove in add_stack_tracking()
158 * stackleak_track_stack() call during the stackleak_cleanup pass. in add_stack_tracking()
186 * Loop through the GIMPLE statements in each of cfun basic blocks. in stackleak_instrument_execute()
248 (bb->flags & BB_IRREDUCIBLE_LOOP)); */ in stackleak_instrument_execute()
273 * Find stackleak_track_stack() calls. Loop through the chain of insns, in remove_stack_tracking_gcall()
343 * Find stackleak_track_stack() asm calls. Loop through the chain of in remove_stack_tracking_gasm()
351 * (clobber (reg:CC 17 flags)) ]) -1 (nil)) in remove_stack_tracking_gasm()
404 * expand_stack_vars() for runtime alignment of constant-sized stack in stackleak_cleanup_execute()
405 * variables. That caused cfun->calls_alloca to be set for functions in stackleak_cleanup_execute()
410 if (cfun->calls_alloca) { in stackleak_cleanup_execute()
434 * https://gcc.gnu.org/onlinedocs/gccint/Constant-expressions.html
495 * Pass gate function is a predicate function that gets executed before the
496 * corresponding pass. If the return value is 'true' the pass gets executed,
509 #include "gcc-generate-gimple-pass.h"
518 #include "gcc-generate-rtl-pass.h"
528 const char * const plugin_name = plugin_info->base_name; in plugin_init()
529 const int argc = plugin_info->argc; in plugin_init()
530 const struct plugin_argument * const argv = plugin_info->argv; in plugin_init()
533 /* Extra GGC root tables describing our GTY-ed data */ in plugin_init()
546 * The stackleak_instrument pass should be executed before the in plugin_init()
547 * "optimized" pass, which is the control flow graph cleanup that is in plugin_init()
549 * versions of the plugin this new pass was inserted before the in plugin_init()
550 * "tree_profile" pass, which is currently called "profile". in plugin_init()
556 * The stackleak_cleanup pass should be executed before the "*free_cfg" in plugin_init()
557 * pass. It's the moment when the stack frame size is already final, in plugin_init()
559 * machine-dependent code transformations are not done. in plugin_init()
570 if (!strcmp(argv[i].key, "track-min-size")) { in plugin_init()
572 error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), in plugin_init()
579 error(G_("invalid option argument '-fplugin-arg-%s-%s=%s'"), in plugin_init()
585 error(G_("no value supplied for option '-fplugin-arg-%s-%s'"), in plugin_init()
597 error(G_("unknown option '-fplugin-arg-%s-%s'"), in plugin_init()
622 * Hook into the Pass Manager to register new gcc passes. in plugin_init()
624 * The stack frame size info is available only at the last RTL pass, in plugin_init()