aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sparse.c
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-09-25 21:05:18 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-03-18 19:02:28 +0100
commita9a56d3994dfd86dbb5b74ab85b3709e4c3d4cee (patch)
tree0221f3c47b063faf7ebdbc60fad06df44fd91b16 /sparse.c
parent7cd8dc41681313557d8fbdd185a5d6c68873ecdc (diff)
downloadsparse-a9a56d3994dfd86dbb5b74ab85b3709e4c3d4cee.tar.gz
defer initialization of bb::context
Currently bb::context is intialized (at -1) when the basic block is allocated. But this field: 1) is only used when using the sparse tools; 2) when used, it's only quite late in the process; 3) this early initialization prevents us to reuse the space of this field for another purpose, earlier in the process. Change this by initializing this field much later, by the sparse tool itself, just before needing it. The real motivation being, of course, to be able to reuse the space for some other upcoming field. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'sparse.c')
-rw-r--r--sparse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sparse.c b/sparse.c
index bceacd94..ef5ee476 100644
--- a/sparse.c
+++ b/sparse.c
@@ -243,6 +243,7 @@ static void check_instructions(struct entrypoint *ep)
{
struct basic_block *bb;
FOR_EACH_PTR(ep->bbs, bb) {
+ bb->context = -1;
check_bb_instructions(bb);
} END_FOR_EACH_PTR(bb);
}