• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef FLOW_H
2 #define FLOW_H
3 
4 #include "lib.h"
5 
6 extern unsigned long bb_generation;
7 
8 #define REPEAT_CSE		(1 << 0)
9 #define REPEAT_CFG_CLEANUP	(1 << 2)
10 
11 struct entrypoint;
12 struct instruction;
13 
14 extern int remove_phisources(struct basic_block *par, struct basic_block *old);
15 
16 extern int simplify_flow(struct entrypoint *ep);
17 
18 extern void kill_dead_stores(struct entrypoint *ep, pseudo_t addr, int local);
19 extern void simplify_symbol_usage(struct entrypoint *ep);
20 extern void simplify_memops(struct entrypoint *ep);
21 extern void pack_basic_blocks(struct entrypoint *ep);
22 extern int simplify_cfg_early(struct entrypoint *ep);
23 extern int convert_to_jump(struct instruction *insn, struct basic_block *target);
24 
25 extern void convert_instruction_target(struct instruction *insn, pseudo_t src);
26 extern void remove_dead_insns(struct entrypoint *);
27 
28 extern void kill_bb(struct basic_block *);
29 extern void kill_use(pseudo_t *);
30 extern void remove_use(pseudo_t *);
31 extern void kill_unreachable_bbs(struct entrypoint *ep);
32 
33 extern int kill_insn(struct instruction *, int force);
kill_instruction(struct instruction * insn)34 static inline int kill_instruction(struct instruction *insn)
35 {
36 	return kill_insn(insn, 0);
37 }
kill_instruction_force(struct instruction * insn)38 static inline int kill_instruction_force(struct instruction *insn)
39 {
40 	return kill_insn(insn, 1);
41 }
42 
43 void check_access(struct instruction *insn);
44 int dominates(struct instruction *insn, struct instruction *dom, int local);
45 
46 extern void vrfy_flow(struct entrypoint *ep);
47 extern int pseudo_in_list(struct pseudo_list *list, pseudo_t pseudo);
48 
49 #endif
50