diff options
author | van Hauser <vh@thc.org> | 2019-11-22 13:30:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 13:30:47 +0100 |
commit | ccb156c704f3463fa0e1cf19f7afed1293b294bf (patch) | |
tree | d4fa9ecf37e86a659264eeb0d5e0880e1534549a /gcc_plugin | |
parent | 79490e75beefdfc737129112ecbc9c74bf4a4609 (diff) | |
parent | 8a2f2e17920a8501582cff72cc6fbf32b18f9d30 (diff) | |
download | afl++-ccb156c704f3463fa0e1cf19f7afed1293b294bf.tar.gz |
Merge pull request #114 from devnexen/cmp_plugin_create_constants_once
compiler plugins, just create const constants once.
Diffstat (limited to 'gcc_plugin')
-rw-r--r-- | gcc_plugin/afl-gcc-pass.so.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc_plugin/afl-gcc-pass.so.cc b/gcc_plugin/afl-gcc-pass.so.cc index bf16b14b..19e4dfba 100644 --- a/gcc_plugin/afl-gcc-pass.so.cc +++ b/gcc_plugin/afl-gcc-pass.so.cc @@ -202,6 +202,9 @@ static unsigned int inline_instrument(function *fun) { basic_block bb; unsigned finst_blocks = 0; unsigned fcnt_blocks = 0; + tree one = build_int_cst(unsigned_char_type_node, 1); + // tree zero = build_int_cst(unsigned_char_type_node, 0); + /* Set up global type declarations */ tree map_type = build_pointer_type(unsigned_char_type_node); @@ -284,9 +287,6 @@ static unsigned int inline_instrument(function *fun) { /* Update bitmap */ - tree one = build_int_cst(unsigned_char_type_node, 1); - // tree zero = build_int_cst(unsigned_char_type_node, 0); - // gimple_assign <addr_expr, p_6, &map[_2], NULL, NULL> tree map_ptr = create_tmp_var(map_type, "map_ptr"); tree map_ptr2 = create_tmp_var(map_type, "map_ptr2"); |