This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Fwd: GCC 5.2 Pass does not get called
- From: Cristina Georgiana Opriceana <cristina dot opriceana at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 5 Jan 2016 13:24:37 +0200
- Subject: Fwd: GCC 5.2 Pass does not get called
- Authentication-results: sourceware.org; auth=none
- References: <CAFA9rWO_5HgtaW1MexJa6ufHbUe2UzNzSKRmypTqEoXJqt_4kg at mail dot gmail dot com>
Hello,
I am trying to add a new gimple_opt pass to gcc 5.2. I wrote a simple
test code to register a new pass that also has a flag.
I added the pass in passes.def and also declared it in tree-pass.h. I
recompiled gcc and it seems that my pass gets called (I printed some
output in the execute() function) when compiling gcc itself, but not
if I use gcc on an external file, for e.g:
I expect that whenever I call:
gcc -fsafestack file.c
the pass would also be run on the code, but instead nothing happens.
For reference, the code for the pass is here [1] and the pass
registration and the flag are here[2].
Any help would be appreciated,
Cristina
[1] https://github.com/cristina2689/gcc/commit/350bfe6c408a96b1d3fad6191919759d83ad45b7
[2] https://github.com/cristina2689/gcc/commit/bae01349d17160261f52f9002dc469500e0bab27