aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linearize.h
diff options
authorChristopher Li <sparse@chrisli.org>2004-03-31 10:13:52 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-07 21:01:30 -0700
commita5bf03586c7a78c443b43ca3a3e106a65afc382b (patch)
treeb3ae85bea31732618c746f5b7c90beb742c7f42c /linearize.h
parent214912ea0d1ab7ae692f2d7e0d45b080f4273eb6 (diff)
downloadsparse-dev-a5bf03586c7a78c443b43ca3a3e106a65afc382b.tar.gz
[PATCH] PATCH: remove dead while loop
This improves the dead code eliminate for iterators that begin in an unreachable section (eg a "while" statement inside a "if (0)"). The idea is that have a decoy entrypoint for those while loops. On copy the basic block back only if there is C level label was found inside the block. It is tempting that left the dead code elimination and constant propagation to the some back end pass.
Diffstat (limited to 'linearize.h')
-rw-r--r--linearize.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/linearize.h b/linearize.h
index f0968baa..466dc36e 100644
--- a/linearize.h
+++ b/linearize.h
@@ -70,6 +70,8 @@ struct instruction_list;
*/
#define BB_HASBRANCH 0x00000001
+#define EP_HASLABEL 0x00000001
+
struct basic_block {
unsigned long flags; /* BB status flags */
struct symbol *this; /* Points to the symbol that owns "this" basic block - NULL if unreachable */
@@ -88,6 +90,7 @@ static inline void add_instruction(struct instruction_list **list, struct instru
}
struct entrypoint {
+ unsigned long flags; /* entry point status flags */
struct symbol *name;
struct symbol_list *syms;
struct basic_block_list *bbs;