projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BugFix: turn_into_tuple() now works if edges are activated
[libfirm]
/
testprograms
/
if_else_example.c
diff --git
a/testprograms/if_else_example.c
b/testprograms/if_else_example.c
index
b3ade18
..
0fea90b
100644
(file)
--- a/
testprograms/if_else_example.c
+++ b/
testprograms/if_else_example.c
@@
-1,4
+1,4
@@
-/*
+
/*
* Project: libFIRM
* File name: testprograms/if_else_example.c
* Purpose: Shows construction of if ... else control flow.
* Project: libFIRM
* File name: testprograms/if_else_example.c
* Purpose: Shows construction of if ... else control flow.
@@
-18,24
+18,20
@@
# include "firm.h"
# include "irdump.h"
# include "firm.h"
# include "irdump.h"
-/*
- * das leere FIRM Programm
- */
-
/**
/**
-* This file constructs the ir for the following pseudo-program:
-*
-* main() {
-* int a = 0;
-* int b = 1;
-*
-* if (a > 2)
-* { a = b; }
-* else
-* { b = 2; }
-*
-* return a, b;
-
*
*/
+
* This file constructs the ir for the following pseudo-program:
+
*
+
* main() {
+
* int a = 0;
+
* int b = 1;
+
*
+
* if (a > 2)
+
* { a = b; }
+
* else
+
* { b = 2; }
+
*
+
* return a, b;
+
*/
int main(int argc, char **argv)
{
int main(int argc, char **argv)
{
@@
-88,7
+84,7
@@
int main(int argc, char **argv)
/* the expression that evaluates the condition */
c2 = new_Const (mode_Is, new_tarval_from_long (2, mode_Is));
/* the expression that evaluates the condition */
c2 = new_Const (mode_Is, new_tarval_from_long (2, mode_Is));
- cmpGt = new_Proj(new_Cmp(get_value(0, mode_Is), c2), mode_b, Gt);
+ cmpGt = new_Proj(new_Cmp(get_value(0, mode_Is), c2), mode_b,
pn_Cmp_
Gt);
/* the conditional branch */
x = new_Cond (cmpGt);
/* the conditional branch */
x = new_Cond (cmpGt);
@@
-134,7
+130,7
@@
int main(int argc, char **argv)
/* Now we can mature the end block as all it's predecessors are known. */
mature_immBlock (get_irg_end_block(irg));
/* Now we can mature the end block as all it's predecessors are known. */
mature_immBlock (get_irg_end_block(irg));
- finalize_cons (irg);
+
irg_
finalize_cons (irg);
printf("Optimizing ...\n");
local_optimize_graph(irg);
printf("Optimizing ...\n");
local_optimize_graph(irg);
@@
-142,7
+138,7
@@
int main(int argc, char **argv)
/* verify the graph */
irg_vrfy(irg);
/* verify the graph */
irg_vrfy(irg);
- finalize_cons (irg);
+
irg_
finalize_cons (irg);
printf("Done building the graph. Dumping it.\n");
dump_ir_block_graph (irg, 0);
printf("Done building the graph. Dumping it.\n");
dump_ir_block_graph (irg, 0);