libfirm
13 years agoPrevent SSA construction from running into endless loops.
Sebastian Buchwald [Fri, 15 Apr 2011 14:12:37 +0000 (16:12 +0200)]
Prevent SSA construction from running into endless loops.

If there is an unreachable loop (i.e. there is no loop entry edge)
then there may is a cycle of blocks with only one predecessor.
Since the algorithm handle this case by returning the value of the predecessor,
this causes an endless recursion.
The fix uses the visited flag to detect such cycles.

13 years agoFix stupid typo
Andreas Zwinkau [Fri, 15 Apr 2011 14:18:03 +0000 (16:18 +0200)]
Fix stupid typo

13 years agoHarden ssacons against reintroducing a bug
Andreas Zwinkau [Fri, 15 Apr 2011 14:12:20 +0000 (16:12 +0200)]
Harden ssacons against reintroducing a bug

* use a local variable for the walker function
* use setter function for block settings

13 years agoUse block walk for ssa_cons_start
Andreas Zwinkau [Fri, 15 Apr 2011 13:58:44 +0000 (15:58 +0200)]
Use block walk for ssa_cons_start

The node walk used before was inefficient,
since everything but blocks was ignored.

Additionally, this fixes a bug, because ssa_cons_finish already used a
block walk already, such that unreachable blocks were immatured,
but not matured in the scalar-replace optimization. This bug could
also be avoided by ensuring cfopt before scalar-replace, but keeping
ssacons start and finish symmetric seems to be more robust.

13 years agofix mismatched decl/implementation
Matthias Braun [Fri, 15 Apr 2011 12:41:13 +0000 (14:41 +0200)]
fix mismatched decl/implementation

13 years agoimplement some cases of =A asm-constraint
Matthias Braun [Fri, 15 Apr 2011 12:28:41 +0000 (14:28 +0200)]
implement some cases of =A asm-constraint

13 years agofix cmp_ASM_attr
Matthias Braun [Fri, 15 Apr 2011 11:02:31 +0000 (13:02 +0200)]
fix cmp_ASM_attr

13 years agofix cparser warnings
Matthias Braun [Thu, 14 Apr 2011 16:24:40 +0000 (18:24 +0200)]
fix cparser warnings

13 years agoupdate automake stuff for release
Matthias Braun [Thu, 14 Apr 2011 16:20:36 +0000 (18:20 +0200)]
update automake stuff for release

13 years agoassume regex.h exists
Matthias Braun [Thu, 14 Apr 2011 13:40:08 +0000 (15:40 +0200)]
assume regex.h exists

13 years agoavoid zlib dependency
Matthias Braun [Thu, 14 Apr 2011 13:22:48 +0000 (15:22 +0200)]
avoid zlib dependency

13 years agoassume we always have strings.h
Matthias Braun [Thu, 14 Apr 2011 13:18:54 +0000 (15:18 +0200)]
assume we always have strings.h

13 years agonobody needs alloca.h these days (hopefully) - using HAVE_s in public headers is...
Matthias Braun [Thu, 14 Apr 2011 12:51:51 +0000 (14:51 +0200)]
nobody needs alloca.h these days (hopefully) - using HAVE_s in public headers is wrong anyway

13 years agoremove configfile parsing stuff, this also eliminates the dependency on bison/flex
Matthias Braun [Thu, 14 Apr 2011 12:39:53 +0000 (14:39 +0200)]
remove configfile parsing stuff, this also eliminates the dependency on bison/flex

13 years agosimplify/refactor fltcalc code (avoid some macros)
Matthias Braun [Thu, 14 Apr 2011 12:38:35 +0000 (14:38 +0200)]
simplify/refactor fltcalc code (avoid some macros)

13 years agoassume everyone except msvc has long double (it's C99 after all)
Matthias Braun [Thu, 14 Apr 2011 10:37:45 +0000 (12:37 +0200)]
assume everyone except msvc has long double (it's C99 after all)

13 years agominimize number of build variants: always enable statistics
Matthias Braun [Thu, 14 Apr 2011 10:29:54 +0000 (12:29 +0200)]
minimize number of build variants: always enable statistics

13 years agoremove unused code
Matthias Braun [Thu, 14 Apr 2011 09:24:41 +0000 (11:24 +0200)]
remove unused code

13 years agoNEWS update
Matthias Braun [Wed, 13 Apr 2011 16:59:21 +0000 (18:59 +0200)]
NEWS update

13 years agofix warning
Matthias Braun [Wed, 13 Apr 2011 13:54:04 +0000 (15:54 +0200)]
fix warning

13 years agoremove unused code
Matthias Braun [Wed, 13 Apr 2011 13:51:18 +0000 (15:51 +0200)]
remove unused code

13 years agoChange use of rdtsc so it works with AMD64, too.
Christoph Mallon [Fri, 15 Apr 2011 13:52:18 +0000 (15:52 +0200)]
Change use of rdtsc so it works with AMD64, too.

13 years agoUse get/set functions instead of direct access to is_matured
Andreas Zwinkau [Fri, 15 Apr 2011 12:21:14 +0000 (14:21 +0200)]
Use get/set functions instead of direct access to is_matured

13 years agoTry fixing if-conversion in presence of endless loops.
Christoph Mallon [Thu, 14 Apr 2011 17:36:39 +0000 (19:36 +0200)]
Try fixing if-conversion in presence of endless loops.

Merge the lower block into the upper block (instead of the other way round), so we do not turn the upper block, which might still be in the DFS stack, into and ID node.

13 years agoRevert "Let the block walker enter endless loops only at kept blocks, not Phis."
Christoph Mallon [Thu, 14 Apr 2011 14:42:47 +0000 (16:42 +0200)]
Revert "Let the block walker enter endless loops only at kept blocks, not Phis."

It does not fix the if-conv problem (there can still be odd keeps into if diamonds) and it also breaks removal of unreachable code, which is only kept at PhiMs.

This reverts commit 351a807ef7c6225b11cc3ac88be60ea0c9db9b7f.

13 years agoRemove the unused function fail_char().
Christoph Mallon [Thu, 14 Apr 2011 12:22:20 +0000 (14:22 +0200)]
Remove the unused function fail_char().

13 years agoMake debug output more portable.
Christoph Mallon [Thu, 14 Apr 2011 12:09:26 +0000 (14:09 +0200)]
Make debug output more portable.

13 years agoReduce code duplication in the (long)-double-int-union-hack.
Christoph Mallon [Thu, 14 Apr 2011 11:53:37 +0000 (13:53 +0200)]
Reduce code duplication in the (long)-double-int-union-hack.

13 years agoLet the block walker enter endless loops only at kept blocks, not Phis.
Christoph Mallon [Thu, 14 Apr 2011 09:26:00 +0000 (11:26 +0200)]
Let the block walker enter endless loops only at kept blocks, not Phis.

- This is sufficient, because every endless loop must have one kept block.
- This also prevents that the if-conversion enters endless loops at strange points.
  This lead to exchanging a block, which is currently being recursed, so when later returning to the exchanged block (which now is an Id-node) in the walker stuff blew up.

13 years agoadapt sparc backend to new prolog/epilog handling
Matthias Braun [Wed, 13 Apr 2011 12:18:35 +0000 (14:18 +0200)]
adapt sparc backend to new prolog/epilog handling

13 years agopanic if TLS is found in sparc backend
Matthias Braun [Wed, 13 Apr 2011 13:01:29 +0000 (15:01 +0200)]
panic if TLS is found in sparc backend

13 years agoremove r_keep_alive and let keep_alive decide irg based on the node
Matthias Braun [Wed, 13 Apr 2011 12:12:53 +0000 (14:12 +0200)]
remove r_keep_alive and let keep_alive decide irg based on the node

13 years agoremove stray declaration
Matthias Braun [Wed, 13 Apr 2011 11:06:37 +0000 (13:06 +0200)]
remove stray declaration

13 years agoBugFix: fixed access to free'ed pointer.
Michael Beck [Wed, 13 Apr 2011 11:32:36 +0000 (13:32 +0200)]
BugFix: fixed access to free'ed pointer.

13 years agoC99 feature removed.
Michael Beck [Wed, 13 Apr 2011 11:13:46 +0000 (13:13 +0200)]
C99 feature removed.

13 years agofix incorrect and(Cmp(a,0),Cmp(b,0)) localopt
Matthias Braun [Wed, 13 Apr 2011 10:26:08 +0000 (12:26 +0200)]
fix incorrect and(Cmp(a,0),Cmp(b,0)) localopt

13 years agoadd notes about const/pure properties and inifite loops
Matthias Braun [Tue, 12 Apr 2011 11:03:49 +0000 (13:03 +0200)]
add notes about const/pure properties and inifite loops

13 years agoavoid new_NoMem in favor or get_irg_no_mem
Matthias Braun [Tue, 12 Apr 2011 09:08:18 +0000 (11:08 +0200)]
avoid new_NoMem in favor or get_irg_no_mem

13 years agofix some warnings by removing the strange abi_get_ignore_irn API
Matthias Braun [Mon, 11 Apr 2011 17:12:50 +0000 (19:12 +0200)]
fix some warnings by removing the strange abi_get_ignore_irn API

13 years agoremove old+unused code
Matthias Braun [Mon, 11 Apr 2011 12:46:35 +0000 (14:46 +0200)]
remove old+unused code

13 years agomove private API into .c file
Matthias Braun [Mon, 11 Apr 2011 12:45:34 +0000 (14:45 +0200)]
move private API into .c file

13 years agoadd another out-edges hack to avoid finding dead code
Matthias Braun [Mon, 11 Apr 2011 11:47:48 +0000 (13:47 +0200)]
add another out-edges hack to avoid finding dead code

13 years agoAdded missing proj nr.
Sebastian Buchwald [Tue, 12 Apr 2011 08:51:17 +0000 (10:51 +0200)]
Added missing proj nr.

13 years agoBoth memory projs are involved in the transformation.
Sebastian Buchwald [Mon, 11 Apr 2011 13:35:50 +0000 (15:35 +0200)]
Both memory projs are involved in the transformation.

This fixes opt/fehler183.c.

13 years agoFixed warning.
Sebastian Buchwald [Mon, 11 Apr 2011 09:08:15 +0000 (11:08 +0200)]
Fixed warning.

13 years agoFixed some whitespaces.
Sebastian Buchwald [Mon, 11 Apr 2011 09:10:51 +0000 (11:10 +0200)]
Fixed some whitespaces.

13 years agoSimplify code
Andreas Zwinkau [Mon, 11 Apr 2011 08:56:38 +0000 (10:56 +0200)]
Simplify code

13 years agoC99 features removed.
Michael Beck [Sat, 9 Apr 2011 01:04:25 +0000 (03:04 +0200)]
C99 features removed.

13 years agoBugFix: fixed type name.
Michael Beck [Sat, 9 Apr 2011 00:59:05 +0000 (02:59 +0200)]
BugFix: fixed type name.

13 years agoRemove superfluous asserts
Andreas Zwinkau [Fri, 8 Apr 2011 14:21:07 +0000 (16:21 +0200)]
Remove superfluous asserts

13 years agomore aggressive node-killing to avoid dangling edges
Matthias Braun [Fri, 8 Apr 2011 13:34:21 +0000 (15:34 +0200)]
more aggressive node-killing to avoid dangling edges

13 years agoMerge branch 'kaps-included' into master
Andreas Zwinkau [Fri, 8 Apr 2011 13:43:15 +0000 (15:43 +0200)]
Merge branch 'kaps-included' into master

13 years agoAnother rewrite of prolog/epilog handling: Delay their creation until after register...
Matthias Braun [Fri, 1 Apr 2011 08:17:03 +0000 (10:17 +0200)]
Another rewrite of prolog/epilog handling: Delay their creation until after register allocation

13 years agoRemove ifdef FIRM_KAPS
Andreas Zwinkau [Fri, 8 Apr 2011 12:44:11 +0000 (14:44 +0200)]
Remove ifdef FIRM_KAPS

Always make pbqp coloring available

13 years agoInclude kaps into build
Andreas Zwinkau [Fri, 8 Apr 2011 12:14:10 +0000 (14:14 +0200)]
Include kaps into build

13 years agomerge kaps
Andreas Zwinkau [Fri, 8 Apr 2011 12:10:06 +0000 (14:10 +0200)]
merge kaps

13 years agoRevived grgen dumper for TTC 2011.
Sebastian Buchwald [Tue, 22 Mar 2011 18:31:38 +0000 (19:31 +0100)]
Revived grgen dumper for TTC 2011.

13 years agono conservative recalculation of everything in irlivechk
Matthias Braun [Thu, 31 Mar 2011 17:47:52 +0000 (19:47 +0200)]
no conservative recalculation of everything in irlivechk

13 years agoall backends have decreasing stack
Matthias Braun [Tue, 5 Apr 2011 14:59:36 +0000 (16:59 +0200)]
all backends have decreasing stack

13 years agochange get_ignore_irn API to take irg instead of abi
Matthias Braun [Thu, 31 Mar 2011 17:17:35 +0000 (19:17 +0200)]
change get_ignore_irn API to take irg instead of abi

13 years agorename be_pos_XXX to n_be_XXX to be consistent with the architecture specific constants
Matthias Braun [Thu, 31 Mar 2011 11:40:12 +0000 (13:40 +0200)]
rename be_pos_XXX to n_be_XXX to be consistent with the architecture specific constants

13 years agocleanup iredges API a bit
Matthias Braun [Thu, 31 Mar 2011 07:57:30 +0000 (09:57 +0200)]
cleanup iredges API a bit

13 years agoidentify bitfield types based on whether they have a base_type set (maybe should...
Matthias Braun [Wed, 30 Mar 2011 16:49:33 +0000 (18:49 +0200)]
identify bitfield types based on whether they have a base_type set (maybe should introduce a real type for bitfield types?)

13 years agoUse a more scalable algorithm for SSA reconstruction.
Sebastian Buchwald [Thu, 17 Mar 2011 17:56:08 +0000 (18:56 +0100)]
Use a more scalable algorithm for SSA reconstruction.

The algorithm now processes a block at most once,
instead of |uses| times.

13 years agoRevert "Prepared for diff."
Sebastian Buchwald [Fri, 8 Apr 2011 09:03:17 +0000 (11:03 +0200)]
Revert "Prepared for diff."

This reverts commit 0a8187425d279eb16ba56f5f04465653a9dfb26a.

13 years agoPrepared for diff.
Sebastian Buchwald [Thu, 17 Mar 2011 17:56:08 +0000 (18:56 +0100)]
Prepared for diff.

13 years agoFixed some typos.
Sebastian Buchwald [Wed, 9 Mar 2011 15:07:01 +0000 (16:07 +0100)]
Fixed some typos.

13 years agoRemove stale ENUM_BITSET(pn_Cmp).
Christoph Mallon [Thu, 7 Apr 2011 11:43:00 +0000 (13:43 +0200)]
Remove stale ENUM_BITSET(pn_Cmp).

13 years agoirg_verify() now runs on unpinned graphs without asserting.
Michael Beck [Thu, 7 Apr 2011 07:28:36 +0000 (09:28 +0200)]
irg_verify() now runs on unpinned graphs without asserting.

13 years agoFix regression: Allow setting the current block to NULL.
Christoph Mallon [Wed, 6 Apr 2011 13:27:06 +0000 (15:27 +0200)]
Fix regression: Allow setting the current block to NULL.

13 years agoFixed tail recursion optimization.
Michael Beck [Sun, 3 Apr 2011 16:44:25 +0000 (18:44 +0200)]
Fixed tail recursion optimization.

- use get_r/set_r instead of get_/set_* functions, so we
  can operate without current_ir_graph set
- set current_ir_graph, but only for debugging now
- fixed wrong usage of indexes for local SSA variables
- placed resorce checking at the right plaace
- removed #if 0'ed debug code and replace it by DB()
- fixed doxygen comments

13 years agoAdd assertions if set_cur_block() is tried for a block on a wrong irg.
Michael Beck [Sun, 3 Apr 2011 16:36:47 +0000 (18:36 +0200)]
Add assertions if set_cur_block() is tried for a block on a wrong irg.

Fixed typo.

13 years agoC99 feature removed.
Michael Beck [Sun, 3 Apr 2011 15:09:10 +0000 (17:09 +0200)]
C99 feature removed.

13 years agoRevert "merge gcse into place_code (a better solution would be having it always on...
Matthias Braun [Wed, 30 Mar 2011 14:46:12 +0000 (16:46 +0200)]
Revert "merge gcse into place_code (a better solution would be having it always on until the backend scheduler)"

This reverts commit bdddae273a9cd497dc79c2f90726482620d3c8d4.

13 years agosimplify Sel lowering code
Matthias Braun [Wed, 23 Mar 2011 13:20:34 +0000 (14:20 +0100)]
simplify Sel lowering code

13 years agoamend to tls_chagnes
Matthias Braun [Wed, 23 Mar 2011 13:19:33 +0000 (14:19 +0100)]
amend to tls_chagnes

13 years agoremove get_irg_tls() concept, simply use SymConst and let the backend figure it out
Matthias Braun [Wed, 23 Mar 2011 13:01:42 +0000 (14:01 +0100)]
remove get_irg_tls() concept, simply use SymConst and let the backend figure it out

13 years agoremove the deprecated and unused construct of a value_res_base entities in method...
Matthias Braun [Thu, 17 Mar 2011 17:59:05 +0000 (18:59 +0100)]
remove the deprecated and unused construct of a value_res_base entities in method-types

13 years agoremove names from parameters of method_types - it is pure debug info and should alrea...
Matthias Braun [Thu, 17 Mar 2011 15:30:47 +0000 (16:30 +0100)]
remove names from parameters of method_types - it is pure debug info and should already be contained in type_dbg_info if available

13 years agoremove pointless first_variadic_param attribute from method types
Matthias Braun [Thu, 17 Mar 2011 15:09:52 +0000 (16:09 +0100)]
remove pointless first_variadic_param attribute from method types

13 years agorename Store_align/Load_align to XXX_unaligned and correctly put it into the spec...
Matthias Braun [Thu, 17 Mar 2011 10:19:16 +0000 (11:19 +0100)]
rename Store_align/Load_align to XXX_unaligned and correctly put it into the spec file

13 years agosimplify opt_funccall interface
Matthias Braun [Wed, 30 Mar 2011 12:48:42 +0000 (14:48 +0200)]
simplify opt_funccall interface

13 years agomerge gcse into place_code (a better solution would be having it always on until...
Matthias Braun [Wed, 30 Mar 2011 13:10:30 +0000 (15:10 +0200)]
merge gcse into place_code (a better solution would be having it always on until the backend scheduler)

13 years agofix wrong usage of inverted vs negated condition codes
Matthias Braun [Fri, 25 Mar 2011 16:31:51 +0000 (17:31 +0100)]
fix wrong usage of inverted vs negated condition codes

13 years agofix ir_is_equality_cmp_0 returning true for signed_var > 0
Matthias Braun [Fri, 25 Mar 2011 15:05:27 +0000 (16:05 +0100)]
fix ir_is_equality_cmp_0 returning true for signed_var > 0

13 years agofix firm producing invalid code for return a > 0 with a being an int
Matthias Braun [Fri, 25 Mar 2011 15:05:07 +0000 (16:05 +0100)]
fix firm producing invalid code for return a > 0 with a being an int

13 years agoUpdated comment.
Michael Beck [Thu, 24 Mar 2011 23:32:07 +0000 (00:32 +0100)]
Updated comment.

13 years agoFix typos in comments: s/wether/whether/ and related corrections.
Michael Beck [Thu, 24 Mar 2011 23:30:05 +0000 (00:30 +0100)]
Fix typos in comments: s/wether/whether/ and related corrections.

13 years agoC99 feature removed.
Michael Beck [Thu, 24 Mar 2011 23:16:08 +0000 (00:16 +0100)]
C99 feature removed.

13 years agoUse debug printer instead direct output, fix some size_t related warnings.
Michael Beck [Thu, 24 Mar 2011 23:01:28 +0000 (00:01 +0100)]
Use debug printer instead direct output, fix some size_t related warnings.

13 years agofix and(cmp,cmp) optimisation rule, loosen verify to allow and/or/xor for reference...
Matthias Braun [Thu, 24 Mar 2011 19:28:16 +0000 (20:28 +0100)]
fix and(cmp,cmp) optimisation rule, loosen verify to allow and/or/xor for reference modes

13 years agoimplement some localopt rules for And(Cmp(a,0), Cmp(b,0))
Matthias Braun [Thu, 24 Mar 2011 17:29:23 +0000 (18:29 +0100)]
implement some localopt rules for And(Cmp(a,0), Cmp(b,0))

13 years agofix lower_d lowering Cmps too realy resulting in unnecessary 0/1 production
Matthias Braun [Thu, 24 Mar 2011 16:48:24 +0000 (17:48 +0100)]
fix lower_d lowering Cmps too realy resulting in unnecessary 0/1 production

13 years agopin prolog/epilog nodes
Matthias Braun [Tue, 22 Mar 2011 19:01:54 +0000 (20:01 +0100)]
pin prolog/epilog nodes

13 years agoadd exc_attr to all be_nodes so you can dynamically pin/unpin them
Matthias Braun [Tue, 22 Mar 2011 19:00:50 +0000 (20:00 +0100)]
add exc_attr to all be_nodes so you can dynamically pin/unpin them

13 years agoMove macro constant into the only file, which uses it.
Christoph Mallon [Thu, 17 Mar 2011 13:01:38 +0000 (14:01 +0100)]
Move macro constant into the only file, which uses it.

13 years agoRemove dead assignment und subsequently unused macro constant.
Christoph Mallon [Thu, 17 Mar 2011 13:01:05 +0000 (14:01 +0100)]
Remove dead assignment und subsequently unused macro constant.

13 years agos/keeped/kept/.
Christoph Mallon [Thu, 17 Mar 2011 13:00:12 +0000 (14:00 +0100)]
s/keeped/kept/.

13 years agoia32: get_eip and fpu_trunc_mode are not always NULL before transformation
Matthias Braun [Thu, 17 Mar 2011 13:34:38 +0000 (14:34 +0100)]
ia32: get_eip and fpu_trunc_mode are not always NULL before transformation

13 years agoRemoved unused variables.
Michael Beck [Thu, 17 Mar 2011 12:20:01 +0000 (13:20 +0100)]
Removed unused variables.