Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
67e3ef5e
Commit
67e3ef5e
authored
Jul 03, 2002
by
Götz Lindenmaier
Browse files
Changes to avoid compiler warnings.
[r429]
parent
4413181f
Changes
43
Hide whitespace changes
Inline
Side-by-side
ir/ana/cgana.c
View file @
67e3ef5e
...
...
@@ -8,7 +8,7 @@
* Erstellt: Hubert Schmid, 09.06.2002
* ---------------------------------------------------------------- */
#include "stdlib.h"
#include "cgana.h"
...
...
@@ -19,6 +19,7 @@
#include "irgwalk.h"
#include "ircons.h"
#include "irgmod.h"
#include "xprintf.h"
/* Eindeutige Adresse zur Markierung von besuchten Knoten und zur
...
...
ir/ana/irdom.c
View file @
67e3ef5e
...
...
@@ -11,6 +11,7 @@
#include "irouts.h"
#include "irgwalk.h"
#include "irdom_t.h"
#include "irgraph_t.h"
/* To access state field. */
#include "irnode_t.h"
...
...
ir/ana/irouts.c
View file @
67e3ef5e
/* Copyright (C) 2002 by Universitaet Karlsruhe
/* Copyright (C) 2002 by Universitaet Karlsruhe
** All rights reserved.
**
** Authors: Goetz Lindenmaier
...
...
@@ -53,13 +53,14 @@ inline ir_node *get_Block_cfg_out (ir_node *bl, int pos) {
assert
(
bl
&&
(
get_irn_op
(
bl
)
==
op_Block
));
for
(
i
=
0
;
i
<
(
int
)
bl
->
out
[
0
];
i
++
)
if
((
get_irn_mode
(
bl
->
out
[
i
+
1
])
==
mode_X
)
&&
(
get_irn_op
(
bl
->
out
[
i
+
1
])
!=
op_End
))
(
get_irn_op
(
bl
->
out
[
i
+
1
])
!=
op_End
))
{
if
(
out_pos
==
pos
)
{
ir_node
*
cfop
=
bl
->
out
[
i
+
1
];
return
cfop
->
out
[
0
+
1
];
}
else
{
out_pos
++
;
}
}
return
NULL
;
}
...
...
@@ -217,7 +218,7 @@ ir_node **set_out_edges(ir_node *n, ir_node **free) {
}
inline
void
fix_start_proj
(
ir_graph
*
irg
)
{
ir_node
*
proj
,
*
startbl
;
ir_node
*
proj
=
NULL
,
*
startbl
;
int
i
;
if
(
get_Block_n_cfg_outs
(
get_irg_start_block
(
irg
)))
{
startbl
=
get_irg_start_block
(
irg
);
...
...
ir/common/firm.h
View file @
67e3ef5e
...
...
@@ -67,6 +67,8 @@
/* Functionality */
# include "ircons.h"
/* construct ir */
# include "irgopt.h"
/* optimize ir */
# include "irgmod.h"
/* Support to modify ir */
# include "irflag.h"
/* optimization flags */
/* initialize firm */
void
init_firm
(
void
);
...
...
ir/common/panic.c
View file @
67e3ef5e
...
...
@@ -11,6 +11,8 @@
# include <config.h>
#endif
# include <stdlib.h>
# include "panic.h"
# include "xprintf.h"
...
...
ir/ir/ircgcons.c
View file @
67e3ef5e
...
...
@@ -8,6 +8,7 @@
* ---------------------------------------------------------------- */
#include <string.h>
#include "ircgcons.h"
#include "array.h"
...
...
ir/ir/irgmod.c
View file @
67e3ef5e
...
...
@@ -13,6 +13,9 @@
# include <config.h>
#endif
# include "irvrfy.h"
# include "irflag.h"
# include "irgwalk.h"
# include "irnode_t.h"
# include "irgraph_t.h"
# include "irgmod.h"
...
...
ir/ir/irgopt.c
View file @
67e3ef5e
...
...
@@ -413,7 +413,7 @@ void inline_method(ir_node *call, ir_graph *called_graph) {
ir_node
**
res_pred
;
ir_node
**
cf_pred
;
ir_node
*
ret
,
*
phi
;
ir_node
*
cf_op
,
*
bl
;
ir_node
*
cf_op
=
NULL
,
*
bl
;
int
arity
,
n_ret
,
n_exc
,
n_res
,
i
,
j
,
rem_opt
;
type
*
called_frame
;
...
...
@@ -478,9 +478,6 @@ void inline_method(ir_node *call, ir_graph *called_graph) {
/* Initialize for compaction of in arrays */
inc_irg_block_visited
(
current_ir_graph
);
/*
set_Block_block_visited(get_irg_start_block(called_graph),
get_irg_block_visited(current_ir_graph) +1 +1); /* count for self edge */
/*** Replicate local entities of the called_graph ***/
/* copy the entities. */
...
...
@@ -842,7 +839,7 @@ inline void place_early () {
static
ir_node
*
consumer_dom_dca
(
ir_node
*
dca
,
ir_node
*
consumer
,
ir_node
*
producer
)
{
ir_node
*
block
;
ir_node
*
block
=
NULL
;
/* Compute the latest block into which we can place a node so that it is
before consumer. */
...
...
@@ -1283,7 +1280,7 @@ void optimize_cf(ir_graph *irg) {
inc_irg_visited
(
current_ir_graph
);
for
(
i
=
0
;
i
<
get_End_n_keepalives
(
end
);
i
++
)
{
ir_node
*
ka
=
get_End_keepalive
(
end
,
i
);
if
(
irn_not_visited
(
ka
))
if
(
irn_not_visited
(
ka
))
{
if
((
get_irn_op
(
ka
)
==
op_Block
)
&&
Block_not_block_visited
(
ka
))
{
set_irg_block_visited
(
current_ir_graph
,
/* Don't walk all the way to Start. */
get_irg_block_visited
(
current_ir_graph
)
-
1
);
...
...
@@ -1295,6 +1292,7 @@ void optimize_cf(ir_graph *irg) {
ARR_APP1
(
ir_node
*
,
in
,
ka
);
}
}
}
/* DEL_ARR_F(end->in); GL @@@ tut nicht ! */
end
->
in
=
in
;
...
...
ir/ir/irgraph.c
View file @
67e3ef5e
...
...
@@ -12,6 +12,8 @@
# include <config.h>
#endif
# include <string.h>
# include "ircons.h"
# include "irgraph_t.h"
# include "irprog.h"
...
...
ir/ir/irmode.c
View file @
67e3ef5e
...
...
@@ -14,6 +14,7 @@
# include "irmode_t.h"
# include <malloc.h>
# include <stddef.h>
# include <string.h>
# include "tv.h"
ir_mode
*
mode_T
;
...
...
ir/ir/irnode.c
View file @
67e3ef5e
...
...
@@ -10,6 +10,7 @@
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <string.h>
#include "irnode_t.h"
#include "irgraph_t.h"
...
...
@@ -650,7 +651,7 @@ add_End_keepalive (ir_node *end, ir_node *ka) {
ARR_APP1
(
ir_node
*
,
end
->
in
,
ka
);
}
inline
ir_node
*
inline
void
set_End_keepalive
(
ir_node
*
end
,
int
pos
,
ir_node
*
ka
)
{
assert
(
end
->
op
==
op_End
);
set_irn_n
(
end
,
pos
+
END_KEEPALIVE_OFFSET
,
ka
);
...
...
ir/ir/irnode.h
View file @
67e3ef5e
...
...
@@ -182,7 +182,7 @@ void remove_Block_cg_cfgpred_arr(ir_node * node);
inline
int
get_End_n_keepalives
(
ir_node
*
end
);
inline
ir_node
*
get_End_keepalive
(
ir_node
*
end
,
int
pos
);
inline
void
add_End_keepalive
(
ir_node
*
end
,
ir_node
*
ka
);
inline
ir_node
*
set_End_keepalive
(
ir_node
*
end
,
int
pos
,
ir_node
*
ka
);
inline
void
set_End_keepalive
(
ir_node
*
end
,
int
pos
,
ir_node
*
ka
);
/* Some parts of the End node are allocated seperately -- their memory
is not recovered by dead_node_elimination if a End node is dead.
free_End frees these data structures. */
...
...
ir/ir/irop.c
View file @
67e3ef5e
...
...
@@ -11,6 +11,8 @@
# include <config.h>
#endif
# include <string.h>
# include "irop_t.h"
# include "irnode_t.h"
# include "misc.h"
...
...
ir/ir/irprog.c
View file @
67e3ef5e
...
...
@@ -12,6 +12,8 @@
# include <config.h>
#endif
# include <string.h>
# include "irprog_t.h"
# include "irgraph_t.h"
# include "array.h"
...
...
ir/ir/irvrfy.c
View file @
67e3ef5e
...
...
@@ -23,7 +23,7 @@ irn_vrfy (ir_node *n)
{
int
i
;
int
opcode
;
ir_mode
*
mymode
,
*
op1mode
,
*
op2mode
,
*
op3mode
;
ir_mode
*
mymode
,
*
op1mode
=
NULL
,
*
op2mode
,
*
op3mode
;
int
op_is_symmetric
=
1
;
/* 0: asymmetric
1: operands have identical modes
2: modes of operands == mode of this node */
...
...
@@ -373,11 +373,11 @@ vrfy_Proj_proj(ir_node *p) {
switch
(
get_irn_opcode
(
pred
))
{
case
iro_Start
:
assert
((
proj
==
0
&&
mode
==
mode_X
)
||
(
proj
==
1
&&
mode
==
mode_M
)
||
(
proj
==
2
&&
mode
==
mode_p
)
||
(
proj
==
3
&&
mode
==
mode_p
)
||
(
proj
==
4
&&
mode
==
mode_T
)
&&
assert
((
(
proj
==
0
&&
mode
==
mode_X
)
||
(
proj
==
1
&&
mode
==
mode_M
)
||
(
proj
==
2
&&
mode
==
mode_p
)
||
(
proj
==
3
&&
mode
==
mode_p
)
||
(
proj
==
4
&&
mode
==
mode_T
)
)
&&
"wrong Proj from Start"
);
break
;
case
iro_Cond
:
...
...
@@ -385,8 +385,8 @@ vrfy_Proj_proj(ir_node *p) {
"wrong Proj from Cond"
);
break
;
case
iro_Raise
:
assert
((
proj
==
0
&&
mode
==
mode_X
)
||
(
proj
==
1
&&
mode
==
mode_M
)
&&
assert
((
(
proj
==
0
&&
mode
==
mode_X
)
||
(
proj
==
1
&&
mode
==
mode_M
)
)
&&
"wrong Proj from Raise"
);
break
;
case
iro_InstOf
:
...
...
@@ -394,51 +394,51 @@ vrfy_Proj_proj(ir_node *p) {
"wrong Proj from InstOf"
));
break
;
case
iro_Call
:
assert
((
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode
==
mode_T
)
||
(
proj
==
3
&&
mode
==
mode_M
)
&&
assert
((
(
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode
==
mode_T
)
||
(
proj
==
3
&&
mode
==
mode_M
)
)
&&
"wrong Proj from Call"
);
break
;
case
iro_Quot
:
assert
((
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode_is_float
(
mode
))
&&
assert
((
(
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode_is_float
(
mode
))
)
&&
"wrong Proj from Quot"
);
break
;
case
iro_DivMod
:
assert
((
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode
==
mode_i
)
||
(
proj
==
3
&&
mode
==
mode_i
)
&&
assert
((
(
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode
==
mode_i
)
||
(
proj
==
3
&&
mode
==
mode_i
)
)
&&
"wrong Proj from DivMod"
);
break
;
case
iro_Div
:
case
iro_Mod
:
assert
((
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode
==
mode_i
)
&&
"wrong Proj from Div or Mod"
);
assert
((
(
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode
==
mode_i
)
)
&&
"wrong Proj from Div or Mod"
);
break
;
case
iro_Cmp
:
assert
((
proj
>=
0
&&
proj
<=
15
&&
mode
==
mode_b
)
&&
"wrong Proj from Cmp"
);
break
;
case
iro_Load
:
assert
((
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode_is_data
(
mode
))
&&
assert
((
(
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
||
(
proj
==
2
&&
mode_is_data
(
mode
))
)
&&
"wrong Proj from Load"
);
break
;
case
iro_Store
:
assert
((
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
&&
assert
((
(
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
&&
mode
==
mode_X
)
)
&&
"wrong Proj from Store"
);
break
;
case
iro_Alloc
:
assert
((
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
/* && mode == mode_X*/
)
||
(
proj
==
2
&&
mode
==
mode_p
)
&&
assert
((
(
proj
==
0
&&
mode
==
mode_M
)
||
(
proj
==
1
/* && mode == mode_X*/
)
||
(
proj
==
2
&&
mode
==
mode_p
)
)
&&
"wrong Proj from Alloc"
);
break
;
case
iro_Proj
:
{
...
...
ir/tr/entity.c
View file @
67e3ef5e
...
...
@@ -13,6 +13,8 @@
# include <stdlib.h>
# include <stddef.h>
# include <string.h>
# include "entity_t.h"
# include "mangle.h"
# include "typegmod_t.h"
...
...
ir/tr/mangle.c
View file @
67e3ef5e
...
...
@@ -11,6 +11,7 @@
# include <config.h>
#endif
# include "xprintf.h"
# include "mangle.h"
# include <obstack.h>
# include "obst.h"
...
...
ir/tr/tpop.c
View file @
67e3ef5e
...
...
@@ -11,6 +11,7 @@
# include <config.h>
#endif
# include "misc.h"
# include "tpop_t.h"
# include "type_t.h"
...
...
ir/tr/type.c
View file @
67e3ef5e
...
...
@@ -126,14 +126,14 @@ ir_mode* get_type_mode(type *tp) {
void
set_type_mode
(
type
*
tp
,
ir_mode
*
m
)
{
assert
(
tp
&&
tp
->
kind
==
k_type
);
assert
((
tp
->
type_op
!=
type_primitive
)
||
mode_is_data
(
m
)
&&
assert
((
(
tp
->
type_op
!=
type_primitive
)
||
mode_is_data
(
m
)
)
&&
/* Modes of primitives must be data */
(
tp
->
type_op
!=
type_enumeration
)
||
mode_is_int
(
m
));
(
(
tp
->
type_op
!=
type_enumeration
)
||
mode_is_int
(
m
))
)
;
/* Modes of enumerations must be integers */
if
((
tp
->
type_op
==
type_primitive
)
||
(
tp
->
type_op
==
type_enumeration
))
{
/* For pointer, primitive and enumeration size depends on the mode. */
tp
->
size
=
=
get_mode_size
(
m
);
tp
->
size
=
get_mode_size
(
m
);
tp
->
mode
=
m
;
}
}
...
...
ir/tv/tv.h
View file @
67e3ef5e
...
...
@@ -213,4 +213,8 @@ ir_mode *get_tv_mode (tarval *tv);
entity
*
get_tv_entity
(
tarval
*
tv
);
/* Returns absolute of tarval @@@ not tested! */
tarval
*
tarval_abs
(
tarval
*
a
);
/* Returns 0 if tv is positive, else > 0. @@@ not tested! */
int
tv_is_negative
(
tarval
*
a
);
#endif
Prev
1
2
3
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment