Christoph Mallon [Sun, 22 Apr 2012 14:16:35 +0000 (16:16 +0200)]
Improve the error message if a qualified void type is used to denote an empty parameter list.
Christoph Mallon [Sun, 22 Apr 2012 11:30:46 +0000 (13:30 +0200)]
Replace is_type_atomic(x, ATOMIC_TYPE_VOID) by the more concise is_type_void(x).
Christoph Mallon [Sun, 22 Apr 2012 13:54:36 +0000 (15:54 +0200)]
Remove the unused variables ir_type_void and ir_type_int.
Christoph Mallon [Sun, 22 Apr 2012 07:13:15 +0000 (09:13 +0200)]
Factorise code to conditionally print an error or a warning.
Christoph Mallon [Sat, 21 Apr 2012 21:09:19 +0000 (23:09 +0200)]
Correct semantic check in parse_return(): A condition was inverted.
Christoph Mallon [Sat, 21 Apr 2012 16:39:22 +0000 (18:39 +0200)]
Do not get the break block of a switch before it is sure that a jump there is actually created.
Usually the inner (compound) statement of a switch ends in a break or return, so there is no normal flow out of the switch statement.
Christoph Mallon [Sat, 21 Apr 2012 14:45:05 +0000 (16:45 +0200)]
Split jump_if_reachable() into jump_to() and jump_if_reachable().
- jump_to() does what jump_if_reachable() did before, i.e. create a Bad if the source is unreachable.
- jump_if_reachable() does nothing if the source is unreachable.
- Document in which case which of these two functions needs to be used.
- This prevents Bad predecessors in the usual cases, e.g. non-fallthrough case labels.
Christoph Mallon [Sat, 21 Apr 2012 15:49:24 +0000 (17:49 +0200)]
It is not necessary to remember the switch block to create the default Proj at the end.
Christoph Mallon [Fri, 20 Apr 2012 06:22:15 +0000 (08:22 +0200)]
Simplify compound_statement_to_firm() by letting statement_to_firm() return an ir_node* instead of just expression_statement_to_firm().
Christoph Mallon [Fri, 20 Apr 2012 18:14:23 +0000 (20:14 +0200)]
Fix walk_statement(): Walk the expression(s) of case labels, too.
Christoph Mallon [Tue, 17 Apr 2012 21:16:35 +0000 (23:16 +0200)]
Reformat _expression_to_firm() for better readability.
Christoph Mallon [Tue, 17 Apr 2012 11:00:04 +0000 (13:00 +0200)]
Rename EXPR_REFERENCE_ENUM_VALUE to EXPR_ENUM_CONSTANT.
This is closer to what the C standard calls it (enumeration constant).
Christoph Mallon [Tue, 17 Apr 2012 10:48:11 +0000 (12:48 +0200)]
Shorten the edgaresque name reference_expression_enum_value_to_firm() to enum_constant_to_firm().
This comes close to what the C standard calls it (enumeration constant).
Christoph Mallon [Tue, 17 Apr 2012 10:35:20 +0000 (12:35 +0200)]
Remove special cases for EXPR_ERROR and TYPE_ERROR from constant folding and type construction.
We do not fold expressions containing errors anymore.
Christoph Mallon [Tue, 17 Apr 2012 10:31:58 +0000 (12:31 +0200)]
Remove duplicate assertion.
The subsequent call to fold_constant_to_tarval() checks the same.
Christoph Mallon [Tue, 17 Apr 2012 10:28:20 +0000 (12:28 +0200)]
Remove unnecessary assertion.
A subsequent assertion checks more.
Christoph Mallon [Tue, 17 Apr 2012 10:12:36 +0000 (12:12 +0200)]
Use fold_constant_to_tarval() instead of reimplementing it badly, i.e. failing with -O0.
Christoph Mallon [Tue, 17 Apr 2012 09:23:17 +0000 (11:23 +0200)]
Use create_Const_from_bool() instead of duplicating it.
Christoph Mallon [Tue, 17 Apr 2012 09:18:45 +0000 (11:18 +0200)]
Move a case, which unnecessarily was an explicit if, into the following switch.
Christoph Mallon [Tue, 17 Apr 2012 08:51:22 +0000 (10:51 +0200)]
Reformat statement_to_firm() for better readability.
Christoph Mallon [Tue, 17 Apr 2012 08:46:15 +0000 (10:46 +0200)]
Use create_jump_statement() to construct IR for goto statements.
Christoph Mallon [Tue, 17 Apr 2012 08:42:00 +0000 (10:42 +0200)]
Remove anchors only when they were added before.
Christoph Mallon [Thu, 12 Apr 2012 11:44:14 +0000 (13:44 +0200)]
Correct expression_to_firm() for compound literals.
Christoph Mallon [Wed, 11 Apr 2012 08:02:33 +0000 (10:02 +0200)]
Correct the ir_relation used for implicit comparisons with 0.
For floats checking for unordered is necessary.
Christoph Mallon [Tue, 10 Apr 2012 13:39:12 +0000 (15:39 +0200)]
Simplify if_statement_to_firm() so it in particular does not create a critical edge, if there is no else part.
- The then part is constructed before the else part now.
- No explicit block after the if statement is created if the then or else parts do not jump there.
Christoph Mallon [Thu, 29 Mar 2012 16:22:07 +0000 (18:22 +0200)]
Set the correct length for literal suffixes, i.e. do not count the terminating NUL.
Christoph Mallon [Wed, 28 Mar 2012 11:39:12 +0000 (13:39 +0200)]
Split computed gotos (STATEMENT_COMPUTED_GOTO) from normal goto statements.
Christoph Mallon [Wed, 28 Mar 2012 12:45:43 +0000 (14:45 +0200)]
Fix: Walk the expression of computed goto statements, too.
Christoph Mallon [Wed, 28 Mar 2012 13:07:32 +0000 (15:07 +0200)]
Reformat switches for better readability.
Christoph Mallon [Wed, 28 Mar 2012 13:19:23 +0000 (15:19 +0200)]
Make our multi-case macros nicer for code beautifiers.
Christoph Mallon [Wed, 28 Mar 2012 13:53:51 +0000 (15:53 +0200)]
Add EXPR_ERROR to the precedence list.
Christoph Mallon [Tue, 27 Mar 2012 11:32:54 +0000 (13:32 +0200)]
Simplify printing the seperator (", ") between call arguments.
Christoph Mallon [Tue, 27 Mar 2012 11:29:37 +0000 (13:29 +0200)]
Use for () where it is better suited than while ().
Christoph Mallon [Tue, 27 Mar 2012 11:27:36 +0000 (13:27 +0200)]
Use print_char('x') instead of print_string("x").
Christoph Mallon [Tue, 27 Mar 2012 11:23:35 +0000 (13:23 +0200)]
Improve printing after an inner statement.
Now we print
if (x) {
} else {
}
instead of
if (x) {
}
else {
}
Christoph Mallon [Tue, 27 Mar 2012 11:09:09 +0000 (13:09 +0200)]
Ensure that case labels are always printed with the same indentation as their switch.
Now we print
switch (x) {
case 0:
if (y) {
case 1:
f();
}
}
instead of
switch (x) {
case 0:
if (y) {
case 1:
f();
}
}
Christoph Mallon [Tue, 27 Mar 2012 08:54:50 +0000 (10:54 +0200)]
Handle printing of inner statements systematically and correct/improve the output.
- Now we print
if (x)
f();
else
g();
instead of
if (x) f();
else g();
- If cascades are still printed as
if (x) {
} else if (y) {
}
- This corrects indendation when {case,default,goto} labels are inner statements.
Christoph Mallon [Tue, 27 Mar 2012 08:38:21 +0000 (10:38 +0200)]
Handle printing of indentation before statements more systematically and reduce code duplication.
This corrects the indentation if case labels and goto labels are interspersed or if there are consecutive goto labels.
Christoph Mallon [Tue, 27 Mar 2012 07:46:43 +0000 (09:46 +0200)]
Let the callers of print_statement() handle printing a newline at the end.
Christoph Mallon [Tue, 27 Mar 2012 07:02:03 +0000 (09:02 +0200)]
Remove pointless null pointer check.
Case label statements always have an inner statement.
Matthias Braun [Mon, 12 Mar 2012 11:48:03 +0000 (12:48 +0100)]
ignore config.mak
Matthias Braun [Thu, 1 Mar 2012 14:49:11 +0000 (15:49 +0100)]
fix -O0 still performing local optimizations
Matthias Braun [Wed, 29 Feb 2012 13:17:09 +0000 (14:17 +0100)]
update libfirm version
Matthias Braun [Wed, 29 Feb 2012 13:16:59 +0000 (14:16 +0100)]
ignore -msse2
Matthias Braun [Wed, 29 Feb 2012 13:16:46 +0000 (14:16 +0100)]
rework os classification
Matthias Braun [Wed, 29 Feb 2012 13:16:04 +0000 (14:16 +0100)]
ignore TARGET environment variable (Makefiles tend to set that and confuse cparser)
Matthias Braun [Fri, 17 Feb 2012 16:03:22 +0000 (17:03 +0100)]
update libfirm reference (so new builtins actually work)
Matthias Braun [Fri, 17 Feb 2012 16:00:51 +0000 (17:00 +0100)]
implement more builtins
(bswap, fabs)
Matthias Braun [Tue, 14 Feb 2012 10:22:05 +0000 (11:22 +0100)]
darwin name in target tripple may contain version
Matthias Braun [Fri, 10 Feb 2012 15:53:01 +0000 (16:53 +0100)]
update libfirm reference
Matthias Braun [Wed, 7 Dec 2011 18:00:22 +0000 (19:00 +0100)]
update for new release
Matthias Braun [Tue, 20 Dec 2011 13:41:17 +0000 (14:41 +0100)]
disable download from internet in makefile for now
Matthias Braun [Tue, 20 Dec 2011 13:35:02 +0000 (14:35 +0100)]
implement -dumpversion for gcc compatibility
Matthias Braun [Tue, 20 Dec 2011 13:34:51 +0000 (14:34 +0100)]
fix --help display
Sebastian Buchwald [Wed, 21 Dec 2011 13:20:43 +0000 (14:20 +0100)]
Fixed wrong enum type.
Matthias Braun [Mon, 19 Dec 2011 09:57:08 +0000 (10:57 +0100)]
maturing start and end block isn't necessary anymore with latest libfirm
Matthias Braun [Mon, 12 Dec 2011 15:18:24 +0000 (16:18 +0100)]
do not use ir_.*_ptr types
Andreas Zwinkau [Mon, 19 Dec 2011 14:45:50 +0000 (15:45 +0100)]
Do not link on every make invocation
Previously, ld had to be called, because the static libfirm might have
been updated.
Note the little hack, which apparently makes GNU Make re-evaluated the
Makefile, whenever the phony libfirm_subdir goal has been executed:
> Makefile: libfirm_subdir
Matthias Braun [Thu, 8 Dec 2011 17:39:49 +0000 (18:39 +0100)]
fix noreturn attribute
Matthias Braun [Wed, 7 Dec 2011 17:54:57 +0000 (18:54 +0100)]
ignore gcc --unroll-loops
Matthias Braun [Wed, 7 Dec 2011 17:54:47 +0000 (18:54 +0100)]
update NEWS, README
Matthias Braun [Mon, 28 Nov 2011 17:44:16 +0000 (18:44 +0100)]
fix warnings
Matthias Braun [Thu, 24 Nov 2011 20:13:20 +0000 (21:13 +0100)]
compound literals are linker_constants
Matthias Braun [Thu, 24 Nov 2011 20:13:05 +0000 (21:13 +0100)]
fix non-scalar type initializers
Matthias Braun [Thu, 24 Nov 2011 20:00:02 +0000 (21:00 +0100)]
create constant initializers as entities in data segment
Matthias Braun [Fri, 18 Nov 2011 16:16:29 +0000 (17:16 +0100)]
cleanup driver interface a bit
Matthias Braun [Thu, 17 Nov 2011 16:33:46 +0000 (17:33 +0100)]
the frontend shouldn't care about the inliner
Matthias Braun [Thu, 17 Nov 2011 16:33:39 +0000 (17:33 +0100)]
always put a mode into assembler constraints
Matthias Braun [Thu, 17 Nov 2011 16:33:03 +0000 (17:33 +0100)]
use ir_export_file so we can also export to stdout
Matthias Braun [Wed, 16 Nov 2011 17:44:43 +0000 (18:44 +0100)]
do not continue if program import failed
Matthias Braun [Thu, 10 Nov 2011 14:37:23 +0000 (15:37 +0100)]
adapt to latest libfirm
Matthias Braun [Thu, 10 Nov 2011 13:24:59 +0000 (14:24 +0100)]
remove $Id$, it does not work with git anyway
Matthias Braun [Thu, 10 Nov 2011 13:22:39 +0000 (14:22 +0100)]
fix indentation
Matthias Braun [Thu, 10 Nov 2011 13:22:20 +0000 (14:22 +0100)]
remove unused fourcc.h
Matthias Braun [Thu, 10 Nov 2011 13:21:46 +0000 (14:21 +0100)]
remove unused adt/align.h
Matthias Braun [Mon, 7 Nov 2011 12:34:28 +0000 (13:34 +0100)]
libfirm doesn't allow Conv Is(xx b) anymore
Andreas Zwinkau [Fri, 4 Nov 2011 14:25:46 +0000 (15:25 +0100)]
Use new libFirm version with localopts phase
Matthias Braun [Thu, 3 Nov 2011 17:45:48 +0000 (18:45 +0100)]
update to a less broken libfirm revision
Matthias Braun [Thu, 3 Nov 2011 16:45:09 +0000 (17:45 +0100)]
fix wrong type of case statements
§6.8.4.2:3 The expression of each case label shall be an integer
constant expression
§6.8.4.2:5 The constant expression in each case label is converted to the
promoted type of the controlling expression.
Matthias Braun [Wed, 2 Nov 2011 18:00:56 +0000 (19:00 +0100)]
adapt to new Switch node
Matthias Braun [Wed, 2 Nov 2011 18:00:45 +0000 (19:00 +0100)]
adapt to pn_Builtin_1_result removal
Andreas Zwinkau [Fri, 28 Oct 2011 20:09:13 +0000 (22:09 +0200)]
linker flags to the end
Matthias Braun [Tue, 25 Oct 2011 12:53:37 +0000 (14:53 +0200)]
adapt to firm ir_mode changes
Matthias Braun [Tue, 25 Oct 2011 10:53:18 +0000 (12:53 +0200)]
ast2firm: do not load from incomplete typed objects
Matthias Braun [Tue, 25 Oct 2011 10:55:44 +0000 (12:55 +0200)]
sizeof(void) is 1
This only matters when GNU mode is enabled, but then you can perform
pointer arithmetic with void in which case its size should also be 1
Andreas Zwinkau [Wed, 26 Oct 2011 13:52:17 +0000 (15:52 +0200)]
Display libfirm revision on --version
Andreas Zwinkau [Tue, 25 Oct 2011 13:47:04 +0000 (15:47 +0200)]
Update libfirm submodule reference
Matthias Braun [Thu, 20 Oct 2011 12:58:06 +0000 (14:58 +0200)]
repair prepare_main_collect2 hack
Matthias Braun [Thu, 20 Oct 2011 12:28:36 +0000 (14:28 +0200)]
fix typo on systems with unsigned short as wchar_t
Matthias Braun [Wed, 19 Oct 2011 19:47:11 +0000 (21:47 +0200)]
update submodule reference
Matthias Braun [Wed, 19 Oct 2011 19:33:14 +0000 (21:33 +0200)]
all sources are dependent on config.h
Matthias Braun [Wed, 19 Oct 2011 19:32:59 +0000 (21:32 +0200)]
use a better url for the libfirm submodule
Andreas Zwinkau [Wed, 19 Oct 2011 14:39:15 +0000 (16:39 +0200)]
Update libfirm submodule reference
Matthias Braun [Fri, 14 Oct 2011 11:03:47 +0000 (13:03 +0200)]
values resulting from a bitfield store need to be sign extended
This should fix testsuite/C/cp_error069.c
Matthias Braun [Thu, 13 Oct 2011 12:25:39 +0000 (14:25 +0200)]
split enum type construction and value computation
This fixes testsuite/C/cp_error068.c
Matthias Braun [Tue, 27 Sep 2011 15:13:10 +0000 (17:13 +0200)]
pass -ansi flag to preprocessor
Christoph Mallon [Tue, 11 Oct 2011 08:31:33 +0000 (10:31 +0200)]
Remove stale and strange entries from .gitignore.
Christoph Mallon [Tue, 11 Oct 2011 08:20:41 +0000 (10:20 +0200)]
Consistently use $(BUILDDIR) instead of build.
Christoph Mallon [Tue, 11 Oct 2011 08:16:40 +0000 (10:16 +0200)]
cparser.bootstrap2 depends on cparser.bootstrap.
Christoph Mallon [Tue, 11 Oct 2011 08:16:13 +0000 (10:16 +0200)]
Remove dubious/unnecessary dependencies.