flow.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef FLOW_H
  2. #define FLOW_H
  3. #include "lib.h"
  4. extern unsigned long bb_generation;
  5. #define REPEAT_CSE (1 << 0)
  6. #define REPEAT_SYMBOL_CLEANUP (1 << 1)
  7. #define REPEAT_CFG_CLEANUP (1 << 2)
  8. struct entrypoint;
  9. struct instruction;
  10. extern int simplify_flow(struct entrypoint *ep);
  11. extern void kill_dead_stores(struct entrypoint *ep, pseudo_t addr, int local);
  12. extern void simplify_symbol_usage(struct entrypoint *ep);
  13. extern void simplify_memops(struct entrypoint *ep);
  14. extern void pack_basic_blocks(struct entrypoint *ep);
  15. extern void convert_instruction_target(struct instruction *insn, pseudo_t src);
  16. extern void remove_dead_insns(struct entrypoint *);
  17. extern int simplify_instruction(struct instruction *);
  18. extern void kill_bb(struct basic_block *);
  19. extern void kill_use(pseudo_t *);
  20. extern void remove_use(pseudo_t *);
  21. extern void kill_unreachable_bbs(struct entrypoint *ep);
  22. extern int kill_insn(struct instruction *, int force);
  23. static inline int kill_instruction(struct instruction *insn)
  24. {
  25. return kill_insn(insn, 0);
  26. }
  27. static inline int kill_instruction_force(struct instruction *insn)
  28. {
  29. return kill_insn(insn, 1);
  30. }
  31. void check_access(struct instruction *insn);
  32. void convert_load_instruction(struct instruction *, pseudo_t);
  33. void rewrite_load_instruction(struct instruction *, struct pseudo_list *);
  34. int dominates(pseudo_t pseudo, struct instruction *insn, struct instruction *dom, int local);
  35. extern void vrfy_flow(struct entrypoint *ep);
  36. extern int pseudo_in_list(struct pseudo_list *list, pseudo_t pseudo);
  37. #endif