aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-unssa.c
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2016-11-22 16:42:23 +0100
committerChristopher Li <sparse@chrisli.org>2017-02-13 09:34:44 +0800
commit5dd219ef2abf39d803f8ba4950acabc9c0f0244d (patch)
tree5601106aca0a2061b2c3f29ef52fbf25d41d4286 /test-unssa.c
parenta721d1598fca5982c2c0270280401a00f6a32cd7 (diff)
downloadsparse-5dd219ef2abf39d803f8ba4950acabc9c0f0244d.tar.gz
give comparable label's names to basic blocks
test-linearize displays basic block's labels by using '.L0x' plus the address of the bb struct. This is certainly convenient as an UID but it has the disadvantage that these names change at each run and are thus not comparable. This complicate testing quite a bit. Let change this by giving a simple sequential number to each bb and simply display them as: '.L1', '.L2', ... Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
Diffstat (limited to 'test-unssa.c')
-rw-r--r--test-unssa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test-unssa.c b/test-unssa.c
index 88ce025f..f7a5c3a1 100644
--- a/test-unssa.c
+++ b/test-unssa.c
@@ -12,7 +12,7 @@ static void output_bb(struct basic_block *bb, unsigned long generation)
struct instruction *insn;
bb->generation = generation;
- printf(".L%p\n", bb);
+ printf(".L%u\n", bb->nr);
FOR_EACH_PTR(bb->insns, insn) {
if (!insn->bb)