libfirm
11 years agoprefere local registers when allocating for sparc
Matthias Braun [Mon, 23 Jul 2012 12:16:47 +0000 (14:16 +0200)]
prefere local registers when allocating for sparc

11 years agoAdd and use amd64_emitf().
Christoph Mallon [Tue, 24 Jul 2012 17:42:09 +0000 (19:42 +0200)]
Add and use amd64_emitf().

11 years agoia32: avoid assembler warning for 16bit stores
Matthias Braun [Mon, 23 Jul 2012 12:35:30 +0000 (14:35 +0200)]
ia32: avoid assembler warning for 16bit stores

11 years agoupdate TEMPLATE backend
Matthias Braun [Thu, 19 Jul 2012 08:38:11 +0000 (10:38 +0200)]
update TEMPLATE backend

Still broken for anything except int f(void) { return 0; } though...

11 years agorework ASM node, it always has a memory input now
Matthias Braun [Mon, 23 Jul 2012 12:15:08 +0000 (14:15 +0200)]
rework ASM node, it always has a memory input now

You can still attach NoMem if no memory input is present.
This makes it more consistent with the Call node and fixes failing
get_ASM_mem in case of no memory input.

11 years agoget_Call_n_params: use int for consistency
Matthias Braun [Mon, 23 Jul 2012 11:26:52 +0000 (13:26 +0200)]
get_Call_n_params: use int for consistency

This makes it consistent with other functions like get_irn_arity().
(Though I must admit that we should change all these functions from
 "int" to unsigned at some point)

11 years agoFix random scheduler.
Manuel Mohr [Mon, 23 Jul 2012 12:15:28 +0000 (14:15 +0200)]
Fix random scheduler.

After the switch to C99, the foreach_ir_nodeset macro introduced a separate
loop variable, which shadowed the local variable "irn".  Thus, an uninitialized
pointer was passed to is_cfop.

11 years agoEat format specifier parameter.
Sebastian Buchwald [Mon, 23 Jul 2012 08:30:03 +0000 (10:30 +0200)]
Eat format specifier parameter.

This fixes backend/setmem.c.

11 years agoLet list_for_each_entry(), list_for_each_entry_reverse() and list_for_each_entry_safe...
Christoph Mallon [Fri, 20 Jul 2012 08:24:00 +0000 (10:24 +0200)]
Let list_for_each_entry(), list_for_each_entry_reverse() and list_for_each_entry_safe() declare their iterator variables.

11 years agoRemove __list_for_each().
Christoph Mallon [Fri, 20 Jul 2012 07:43:48 +0000 (09:43 +0200)]
Remove __list_for_each().

It is identical to list_for_each(), though its comment claimed otherwise.

11 years agoRemove the unused ir_lnk_nodeset.
Christoph Mallon [Fri, 20 Jul 2012 07:58:43 +0000 (09:58 +0200)]
Remove the unused ir_lnk_nodeset.

11 years agoRemove the unused ir_lnk_nodemap.
Christoph Mallon [Fri, 20 Jul 2012 07:52:19 +0000 (09:52 +0200)]
Remove the unused ir_lnk_nodemap.

11 years agoLet matrix_foreach(), matrix_foreach_in_col() and matrix_foreach_in_row() declare...
Christoph Mallon [Fri, 20 Jul 2012 07:14:06 +0000 (09:14 +0200)]
Let matrix_foreach(), matrix_foreach_in_col() and matrix_foreach_in_row() declare their iterator variables.

11 years agoLet foreach_ir_nodeset() declare its iterator variables.
Christoph Mallon [Thu, 19 Jul 2012 16:17:24 +0000 (18:17 +0200)]
Let foreach_ir_nodeset() declare its iterator variables.

11 years agoLet panic() print file, line and function.
Christoph Mallon [Thu, 19 Jul 2012 07:50:57 +0000 (09:50 +0200)]
Let panic() print file, line and function.

Remove now redundant (and sometimes wrong) location info from the panic messages.

11 years agoMake \n in arm_emitf() work.
Christoph Mallon [Thu, 19 Jul 2012 07:51:52 +0000 (09:51 +0200)]
Make \n in arm_emitf() work.

11 years agoRemove unused emit_templates.
Christoph Mallon [Thu, 19 Jul 2012 07:51:25 +0000 (09:51 +0200)]
Remove unused emit_templates.

11 years agoAdd sparc_emitf() to make the SPARC emitter more readable.
Christoph Mallon [Tue, 17 Jul 2012 13:46:08 +0000 (15:46 +0200)]
Add sparc_emitf() to make the SPARC emitter more readable.

11 years agoUse ia32_emitf() in ia32_spec.pl.
Christoph Mallon [Wed, 18 Jul 2012 15:47:28 +0000 (17:47 +0200)]
Use ia32_emitf() in ia32_spec.pl.

11 years agointroduce TEMPLATE_emitf
Matthias Braun [Wed, 18 Jul 2012 14:48:25 +0000 (16:48 +0200)]
introduce TEMPLATE_emitf

11 years agointroduce arm_emitf
Matthias Braun [Wed, 18 Jul 2012 12:12:49 +0000 (14:12 +0200)]
introduce arm_emitf

11 years agouse arch_emitf for emit lines without dot prefix
Matthias Braun [Wed, 18 Jul 2012 12:09:33 +0000 (14:09 +0200)]
use arch_emitf for emit lines without dot prefix

11 years agosparc: Fix Alloc nodes.
Manuel Mohr [Fri, 13 Jul 2012 14:22:03 +0000 (16:22 +0200)]
sparc: Fix Alloc nodes.

11 years agorename hashset.c to hashset.c.inl
Matthias Braun [Mon, 16 Jul 2012 16:17:32 +0000 (18:17 +0200)]
rename hashset.c to hashset.c.inl

11 years agoadd missing doxygen docu
Matthias Braun [Mon, 16 Jul 2012 15:06:27 +0000 (17:06 +0200)]
add missing doxygen docu

11 years agorework hashset
Matthias Braun [Mon, 16 Jul 2012 14:32:55 +0000 (16:32 +0200)]
rework hashset

Only define functions for which the user provided a renaming #define
(instead of forcing the users to create name for everything)
Only define iterator struct if a rename #define is present (instead of
forcing the user to define NO_ITERATOR if he doesn't want one)

11 years agoreplace gnu extension with C99
Matthias Braun [Mon, 16 Jul 2012 14:30:31 +0000 (16:30 +0200)]
replace gnu extension with C99

11 years agofix prefalloc after sched_foreach changes
Matthias Braun [Mon, 16 Jul 2012 13:57:19 +0000 (15:57 +0200)]
fix prefalloc after sched_foreach changes

11 years agouse bool as return value in XXX_insert and ID_HASH
Matthias Braun [Mon, 16 Jul 2012 12:53:46 +0000 (14:53 +0200)]
use bool as return value in XXX_insert and ID_HASH

also flip true/false in the implementation to match the documentation in
irnodeset.h

11 years agosimplify + optimize be_lv_foreach
Matthias Braun [Fri, 13 Jul 2012 21:04:41 +0000 (23:04 +0200)]
simplify + optimize be_lv_foreach

11 years agomake cpset, pset_new API private
Matthias Braun [Mon, 16 Jul 2012 13:22:51 +0000 (15:22 +0200)]
make cpset, pset_new API private

11 years agofix warning
Matthias Braun [Mon, 16 Jul 2012 12:54:31 +0000 (14:54 +0200)]
fix warning

11 years agosparc: Fix gen_Const on 64-bit machines.
Manuel Mohr [Fri, 13 Jul 2012 15:18:59 +0000 (17:18 +0200)]
sparc: Fix gen_Const on 64-bit machines.

11 years agoFixed warnings.
Sebastian Buchwald [Mon, 16 Jul 2012 06:10:49 +0000 (08:10 +0200)]
Fixed warnings.

11 years agoAdd a wrapper macro for ir_nodehashmap_get(), which has the return type as additional...
Christoph Mallon [Fri, 13 Jul 2012 20:57:54 +0000 (22:57 +0200)]
Add a wrapper macro for ir_nodehashmap_get(), which has the return type as additional parameter.

11 years agoUse get_blocksched_entry().
Christoph Mallon [Fri, 13 Jul 2012 20:25:37 +0000 (22:25 +0200)]
Use get_blocksched_entry().

11 years agoAdd wrapper macros for pset_first() and pset_next(), which have the return type as...
Christoph Mallon [Fri, 13 Jul 2012 19:33:43 +0000 (21:33 +0200)]
Add wrapper macros for pset_first() and pset_next(), which have the return type as additional parameter.

11 years agoAdd the * for the type in foreach_pset() automatically.
Christoph Mallon [Fri, 13 Jul 2012 19:16:01 +0000 (21:16 +0200)]
Add the * for the type in foreach_pset() automatically.

11 years agoMake the pointer in the dump_*_FUNC typedefs explicit.
Christoph Mallon [Fri, 13 Jul 2012 19:08:23 +0000 (21:08 +0200)]
Make the pointer in the dump_*_FUNC typedefs explicit.

11 years agoLet foreach_pset() declare its iterator variable.
Christoph Mallon [Fri, 13 Jul 2012 11:55:40 +0000 (13:55 +0200)]
Let foreach_pset() declare its iterator variable.

11 years agoUse foreach_pset().
Christoph Mallon [Fri, 13 Jul 2012 11:33:21 +0000 (13:33 +0200)]
Use foreach_pset().

11 years agoRemove the unused ir/adt/iterator.[ch].
Christoph Mallon [Fri, 13 Jul 2012 10:51:28 +0000 (12:51 +0200)]
Remove the unused ir/adt/iterator.[ch].

11 years agoLet bitset_foreach() and bitset_foreach_clear() declare their iterator variables.
Christoph Mallon [Fri, 13 Jul 2012 10:41:45 +0000 (12:41 +0200)]
Let bitset_foreach() and bitset_foreach_clear() declare their iterator variables.

11 years agoRemove the unused macro sched_foreach_Phi().
Christoph Mallon [Fri, 13 Jul 2012 08:09:16 +0000 (10:09 +0200)]
Remove the unused macro sched_foreach_Phi().

11 years agoLet sched_foreach_from() and sched_foreach_reverse_from() declare their iterator...
Christoph Mallon [Fri, 13 Jul 2012 08:08:20 +0000 (10:08 +0200)]
Let sched_foreach_from() and sched_foreach_reverse_from() declare their iterator variables.

11 years agoLet foreach_out_edge_kind() and foreach_out_edge_kind_safe() declare their iterator...
Christoph Mallon [Fri, 13 Jul 2012 07:35:51 +0000 (09:35 +0200)]
Let foreach_out_edge_kind() and foreach_out_edge_kind_safe() declare their iterator variables.

11 years agoUse foreach_out_edge_safe() instead of reimplementing it.
Christoph Mallon [Fri, 13 Jul 2012 07:33:12 +0000 (09:33 +0200)]
Use foreach_out_edge_safe() instead of reimplementing it.

11 years agoFix indentation.
Christoph Mallon [Fri, 13 Jul 2012 07:01:53 +0000 (09:01 +0200)]
Fix indentation.

11 years agoAdd ir_nodeset_first() to return the "first" node in an ir_nodeset.
Christoph Mallon [Fri, 13 Jul 2012 06:51:18 +0000 (08:51 +0200)]
Add ir_nodeset_first() to return the "first" node in an ir_nodeset.

11 years agoUse foreach_ir_nodeset() instead of reimplementing it.
Christoph Mallon [Fri, 13 Jul 2012 06:36:51 +0000 (08:36 +0200)]
Use foreach_ir_nodeset() instead of reimplementing it.

11 years agoLet co_gs_foreach_neighb() declare the iterator variable.
Christoph Mallon [Fri, 13 Jul 2012 06:48:34 +0000 (08:48 +0200)]
Let co_gs_foreach_neighb() declare the iterator variable.

11 years agoLet foreach_set() declare the iterator variable.
Christoph Mallon [Fri, 13 Jul 2012 06:30:25 +0000 (08:30 +0200)]
Let foreach_set() declare the iterator variable.

11 years agoUse -std=c99.
Christoph Mallon [Fri, 13 Jul 2012 06:30:02 +0000 (08:30 +0200)]
Use -std=c99.

11 years agoAdd wrapper macros for set_first() and set_next(), which have the return type as...
Christoph Mallon [Fri, 13 Jul 2012 06:22:22 +0000 (08:22 +0200)]
Add wrapper macros for set_first() and set_next(), which have the return type as additional parameter.

11 years agoAdd the return type as parameter to the macros set_find() and set_insert().
Christoph Mallon [Thu, 12 Jul 2012 17:26:10 +0000 (19:26 +0200)]
Add the return type as parameter to the macros set_find() and set_insert().

11 years agoUse foreach_set() instead of reimplementing it.
Christoph Mallon [Fri, 13 Jul 2012 05:56:30 +0000 (07:56 +0200)]
Use foreach_set() instead of reimplementing it.

11 years agoRemove duplicate implementation of foreach_set().
Christoph Mallon [Thu, 12 Jul 2012 17:59:01 +0000 (19:59 +0200)]
Remove duplicate implementation of foreach_set().

11 years agoAdd the * for the type in foreach_set() automatically.
Christoph Mallon [Fri, 13 Jul 2012 06:00:31 +0000 (08:00 +0200)]
Add the * for the type in foreach_set() automatically.

11 years agoDo not access memory after the end of an object.
Christoph Mallon [Thu, 12 Jul 2012 16:01:18 +0000 (18:01 +0200)]
Do not access memory after the end of an object.

11 years agoDirectly use pmap_get() instead of pmap_contains() + pmap_get().
Christoph Mallon [Thu, 12 Jul 2012 15:26:04 +0000 (17:26 +0200)]
Directly use pmap_get() instead of pmap_contains() + pmap_get().

11 years agoAdd a wrapper macro for pmap_get(), which has the return type as additional parameter.
Christoph Mallon [Thu, 12 Jul 2012 10:57:15 +0000 (12:57 +0200)]
Add a wrapper macro for pmap_get(), which has the return type as additional parameter.

11 years agoAdd a wrapper macro for ir_nodemap_get(), which has the return type as additional...
Christoph Mallon [Thu, 12 Jul 2012 10:56:49 +0000 (12:56 +0200)]
Add a wrapper macro for ir_nodemap_get(), which has the return type as additional parameter.

11 years agoRemove pointless casts.
Christoph Mallon [Fri, 13 Jul 2012 06:09:17 +0000 (08:09 +0200)]
Remove pointless casts.

The expressions have that type.

11 years agoRemove the unused macro co_gs_nodes_break().
Christoph Mallon [Fri, 13 Jul 2012 05:57:16 +0000 (07:57 +0200)]
Remove the unused macro co_gs_nodes_break().

11 years agoGet rid of an anonymous union.
Christoph Mallon [Thu, 12 Jul 2012 17:47:17 +0000 (19:47 +0200)]
Get rid of an anonymous union.

11 years agoRemove the declaration of the deleted function firm_default_hash().
Christoph Mallon [Thu, 12 Jul 2012 17:39:09 +0000 (19:39 +0200)]
Remove the declaration of the deleted function firm_default_hash().

11 years agoRemove the pointless if in if (pmap_get(k) != v) pmap_insert(k, v).
Christoph Mallon [Thu, 12 Jul 2012 15:34:39 +0000 (17:34 +0200)]
Remove the pointless if in if (pmap_get(k) != v) pmap_insert(k, v).

11 years agoRemove the unnecessary perm_map.
Christoph Mallon [Thu, 12 Jul 2012 15:22:40 +0000 (17:22 +0200)]
Remove the unnecessary perm_map.

11 years agosimplify be_lv_foreach
Matthias Braun [Fri, 13 Jul 2012 20:09:58 +0000 (22:09 +0200)]
simplify be_lv_foreach

11 years agoremove write-only bitset
Matthias Braun [Fri, 13 Jul 2012 20:09:44 +0000 (22:09 +0200)]
remove write-only bitset

11 years agoadapt to -std=c99
Matthias Braun [Fri, 13 Jul 2012 20:02:50 +0000 (22:02 +0200)]
adapt to -std=c99

11 years agoremove old #undef
Matthias Braun [Fri, 13 Jul 2012 19:31:52 +0000 (21:31 +0200)]
remove old #undef

11 years agomove domfront from be to ana
Matthias Braun [Wed, 11 Jul 2012 11:46:36 +0000 (13:46 +0200)]
move domfront from be to ana

Also add a GRAPH_PROPERTY for the analysis state.

11 years agoremove unused block_attr.succ_head, cond_attr.default_proj
Matthias Braun [Wed, 11 Jul 2012 11:15:28 +0000 (13:15 +0200)]
remove unused block_attr.succ_head, cond_attr.default_proj

11 years agofix warning
Matthias Braun [Fri, 13 Jul 2012 09:43:14 +0000 (11:43 +0200)]
fix warning

11 years agoRemoved Tuple nodes hold by End node.
Sebastian Buchwald [Fri, 13 Jul 2012 15:57:51 +0000 (17:57 +0200)]
Removed Tuple nodes hold by End node.

11 years agorespect dependency edges in dead code elimination
Christopher Frieler [Tue, 3 Jul 2012 15:24:22 +0000 (17:24 +0200)]
respect dependency edges in dead code elimination

11 years agomake dependency edge handling more robust
Matthias Braun [Tue, 10 Jul 2012 20:19:21 +0000 (22:19 +0200)]
make dependency edge handling more robust

11 years agorework add_irn_dep, add delete_irn_dep
Matthias Braun [Tue, 10 Jul 2012 20:18:39 +0000 (22:18 +0200)]
rework add_irn_dep, add delete_irn_dep

- Setting dep edges to NULL is illegal now
- add_irn_dep is simpler but does not check for duplicates anymore

11 years agomake code C++ warning clean (again)
Matthias Braun [Tue, 10 Jul 2012 13:52:01 +0000 (15:52 +0200)]
make code C++ warning clean (again)

11 years agocleanup ia32_architecture (enum usage)
Matthias Braun [Tue, 10 Jul 2012 13:34:06 +0000 (15:34 +0200)]
cleanup ia32_architecture (enum usage)

11 years agobedwarf: always use custom abbrev numbers
Matthias Braun [Tue, 10 Jul 2012 12:27:15 +0000 (14:27 +0200)]
bedwarf: always use custom abbrev numbers

12 years agoirop: refactor node_ops registration code
Matthias Braun [Thu, 28 Jun 2012 11:49:58 +0000 (13:49 +0200)]
irop: refactor node_ops registration code

Get away from the strange set_default_XXX_op style and instead let the
code modules register their node ops directly.

12 years agoMake spiller more deterministic.
Manuel Mohr [Wed, 27 Jun 2012 12:01:07 +0000 (14:01 +0200)]
Make spiller more deterministic.

12 years agoFixed typo.
Manuel Mohr [Tue, 26 Jun 2012 13:28:43 +0000 (15:28 +0200)]
Fixed typo.

12 years agoAdd support for setting initial node number through debugging extension.
Manuel Mohr [Wed, 20 Jun 2012 11:51:15 +0000 (13:51 +0200)]
Add support for setting initial node number through debugging extension.

This also supports setting the initial node number to "rand", thereby
replacing randnodenr.

12 years agomake spiller more deterministic
Matthias Braun [Wed, 27 Jun 2012 11:00:18 +0000 (13:00 +0200)]
make spiller more deterministic

12 years agomake heur4 a bit more deterministic
Matthias Braun [Wed, 27 Jun 2012 10:45:04 +0000 (12:45 +0200)]
make heur4 a bit more deterministic

12 years agolong double has 4 byte alignment
Matthias Braun [Wed, 27 Jun 2012 10:44:47 +0000 (12:44 +0200)]
long double has 4 byte alignment

12 years agoOnly (IV - RC) is allowed for induction variables.
Sebastian Buchwald [Fri, 22 Jun 2012 17:43:37 +0000 (19:43 +0200)]
Only (IV - RC) is allowed for induction variables.

12 years agomake basic block scheduler more deterministic
Matthias Braun [Thu, 21 Jun 2012 14:15:49 +0000 (16:15 +0200)]
make basic block scheduler more deterministic

12 years agodisplay block node nr in verboseasm mode
Matthias Braun [Thu, 21 Jun 2012 14:15:34 +0000 (16:15 +0200)]
display block node nr in verboseasm mode

12 years agobespillslots: cleanup, make it deterministic
Matthias Braun [Thu, 21 Jun 2012 13:01:59 +0000 (15:01 +0200)]
bespillslots: cleanup, make it deterministic

12 years agomake compiler more deterministic by sorting Perm inputs
Matthias Braun [Thu, 21 Jun 2012 10:00:05 +0000 (12:00 +0200)]
make compiler more deterministic by sorting Perm inputs

12 years agonormalize Sync node by sorting their inputs
Matthias Braun [Thu, 21 Jun 2012 09:48:21 +0000 (11:48 +0200)]
normalize Sync node by sorting their inputs

This also makes the compiler alot more deterministic avoiding, lots of
"random" jumping around in series of stores and loads.

12 years agoavoid "Unknown" hacks with reroute_edges_except
Matthias Braun [Thu, 21 Jun 2012 09:47:17 +0000 (11:47 +0200)]
avoid "Unknown" hacks with reroute_edges_except

12 years agoiredges: introduce new reroute_edges_except
Matthias Braun [Thu, 21 Jun 2012 09:46:29 +0000 (11:46 +0200)]
iredges: introduce new reroute_edges_except

I expect this to be a common pattern

12 years agoRemove the unused flag irop_flag_always_opt.
Christoph Mallon [Tue, 19 Jun 2012 07:31:15 +0000 (09:31 +0200)]
Remove the unused flag irop_flag_always_opt.

12 years agoRemove the never read flag irop_flag_dump_noinput.
Christoph Mallon [Tue, 19 Jun 2012 07:20:26 +0000 (09:20 +0200)]
Remove the never read flag irop_flag_dump_noinput.

12 years agoRemove the never read flag irop_flag_labeled.
Christoph Mallon [Tue, 19 Jun 2012 07:11:45 +0000 (09:11 +0200)]
Remove the never read flag irop_flag_labeled.