projects
/
cparser
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bb5cb9
)
don't emit dead initializers
author
Matthias Braun
<matze@braunis.de>
Fri, 27 Feb 2009 17:06:41 +0000
(17:06 +0000)
committer
Matthias Braun
<matze@braunis.de>
Fri, 27 Feb 2009 17:06:41 +0000
(17:06 +0000)
[r25577]
ast2firm.c
patch
|
blob
|
history
diff --git
a/ast2firm.c
b/ast2firm.c
index
94f83e3
..
b74308b
100644
(file)
--- a/
ast2firm.c
+++ b/
ast2firm.c
@@
-4753,6
+4753,11
@@
static void initialize_local_declaration(entity_t *entity)
if (entity->base.symbol == NULL)
return;
+ // no need to emit code in dead blocks
+ if (entity->declaration.storage_class != STORAGE_CLASS_STATIC
+ && get_cur_block() == NULL)
+ return;
+
switch ((declaration_kind_t) entity->declaration.kind) {
case DECLARATION_KIND_LOCAL_VARIABLE:
case DECLARATION_KIND_LOCAL_VARIABLE_ENTITY: