aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/flow.h
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-04-26 19:14:08 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-02-13 00:15:29 +0100
commitf5a6877758aa1ee86a41bdecaa2747e88d74aaef (patch)
tree9bfe747d021856f0bded8b40d2c9cbda52c5fc7c /flow.h
parenta407894e929b1061ee17e8cb175dd846b8af7071 (diff)
downloadsparse-f5a6877758aa1ee86a41bdecaa2747e88d74aaef.tar.gz
let kill_instruction() report if changes were made
This let us take others actions if no changes have been made and allow simpler call to this function since its effect on 'repeat_phase' can be directly returned. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'flow.h')
-rw-r--r--flow.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/flow.h b/flow.h
index 6743db1e..8e96f62f 100644
--- a/flow.h
+++ b/flow.h
@@ -26,14 +26,14 @@ extern void kill_bb(struct basic_block *);
extern void kill_use(pseudo_t *);
extern void kill_unreachable_bbs(struct entrypoint *ep);
-extern void kill_insn(struct instruction *, int force);
-static inline void kill_instruction(struct instruction *insn)
+extern int kill_insn(struct instruction *, int force);
+static inline int kill_instruction(struct instruction *insn)
{
- kill_insn(insn, 0);
+ return kill_insn(insn, 0);
}
-static inline void kill_instruction_force(struct instruction *insn)
+static inline int kill_instruction_force(struct instruction *insn)
{
- kill_insn(insn, 1);
+ return kill_insn(insn, 1);
}
void check_access(struct instruction *insn);