aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2006-09-01 14:34:01 -0700
committerJosh Triplett <josh@freedesktop.org>2006-09-14 13:20:56 -0700
commit2c5d4b3a37982222a05832b0d2d3708c760c388d (patch)
treee88a101926b4bcd520244c6b64abd830c90f5746 /linearize.h
parentgraph: Show position in basic block nodes (diff)
downloadsparse-2c5d4b3a37982222a05832b0d2d3708c760c388d.tar.gz
sparse-2c5d4b3a37982222a05832b0d2d3708c760c388d.tar.bz2
sparse-2c5d4b3a37982222a05832b0d2d3708c760c388d.zip
bb_terminated: Use boundary values rather than specific opcodes
The opcode enum defines the boundary values OP_TERMINATOR and OP_TERMINATOR_END for terminator instructions; use those in bb_terminated rather than the specific values they currently equal. Signed-off-by: Josh Triplett <josh@freedesktop.org>
Diffstat (limited to 'linearize.h')
-rw-r--r--linearize.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/linearize.h b/linearize.h
index ac946f3..517ec67 100644
--- a/linearize.h
+++ b/linearize.h
@@ -254,7 +254,8 @@ static inline int bb_terminated(struct basic_block *bb)
if (!bb)
return 0;
insn = last_instruction(bb->insns);
- return insn && insn->opcode >= OP_RET && insn->opcode <= OP_UNWIND;
+ return insn && insn->opcode >= OP_TERMINATOR
+ && insn->opcode <= OP_TERMINATOR_END;
}
static inline int bb_reachable(struct basic_block *bb)