libfirm
11 years agotv: Remove mul_table[][][] and simply use * and <<.
Christoph Mallon [Tue, 4 Dec 2012 12:37:29 +0000 (13:37 +0100)]
tv: Remove mul_table[][][] and simply use * and <<.

11 years agotv: Remove add_table[][][] and simply use +.
Christoph Mallon [Tue, 4 Dec 2012 12:24:29 +0000 (13:24 +0100)]
tv: Remove add_table[][][] and simply use +.

11 years agoscripts: Generate accessor functions for nodes with a variable/dynamic number of...
Christoph Mallon [Mon, 3 Dec 2012 18:51:01 +0000 (19:51 +0100)]
scripts: Generate accessor functions for nodes with a variable/dynamic number of inputs.

11 years agoscripts: Fix some whitespace nits.
Christoph Mallon [Mon, 3 Dec 2012 17:25:13 +0000 (18:25 +0100)]
scripts: Fix some whitespace nits.

11 years agobelive: Remove the visited bitset for liveness calculation.
Christoph Mallon [Mon, 3 Dec 2012 15:46:28 +0000 (16:46 +0100)]
belive: Remove the visited bitset for liveness calculation.

Simply check, whether any liveness bits were set before.

11 years agobelive: Directly pass the flags to set to live_end_at_block() instead of passing...
Christoph Mallon [Mon, 3 Dec 2012 15:33:38 +0000 (16:33 +0100)]
belive: Directly pass the flags to set to live_end_at_block() instead of passing a bool.

11 years agobelive: Avoid duplicate map lookups when calculating the liveness of a node in a...
Christoph Mallon [Mon, 3 Dec 2012 15:28:31 +0000 (16:28 +0100)]
belive: Avoid duplicate map lookups when calculating the liveness of a node in a block.

11 years agoRefactoring: Deleted unused inlining functionality.
Tobias Rapp [Mon, 3 Dec 2012 11:51:44 +0000 (12:51 +0100)]
Refactoring: Deleted unused inlining functionality.

11 years agoir: Remove unnecessary mode_b checks of Cond selectors.
Christoph Mallon [Mon, 3 Dec 2012 12:54:00 +0000 (13:54 +0100)]
ir: Remove unnecessary mode_b checks of Cond selectors.

All Conds are boolean.

11 years agocleanup: Remove pointless assert(is_${NODE}(x)) just before get_${NODE}_${FOO}(x...
Christoph Mallon [Mon, 3 Dec 2012 11:48:08 +0000 (12:48 +0100)]
cleanup: Remove pointless assert(is_${NODE}(x)) just before get_${NODE}_${FOO}(x), which do the same assert.

11 years agoFixed some typos.
Sebastian Buchwald [Mon, 3 Dec 2012 07:29:42 +0000 (08:29 +0100)]
Fixed some typos.

11 years agothe 1/c -> 1*c optimisation is fine for x86 floats too
Matthias Braun [Mon, 3 Dec 2012 00:19:21 +0000 (01:19 +0100)]
the 1/c -> 1*c optimisation is fine for x86 floats too

11 years agomark stores in int->float, float->int and float->float convs as spills
Matthias Braun [Mon, 3 Dec 2012 00:18:25 +0000 (01:18 +0100)]
mark stores in int->float, float->int and float->float convs as spills

That way the spill engine can rematerialize the loads and needs no
extra spills for these values.

11 years agoia32: Merge Store and Store8Bit.
Christoph Mallon [Sun, 2 Dec 2012 22:21:10 +0000 (23:21 +0100)]
ia32: Merge Store and Store8Bit.

11 years agoia32: Merge Conv_I2I and Conv_I2I8Bit.
Christoph Mallon [Sun, 2 Dec 2012 22:11:42 +0000 (23:11 +0100)]
ia32: Merge Conv_I2I and Conv_I2I8Bit.

11 years agoia32: Merge AddMem, AndMem, OrMem, SubMem and XorMem with their 8 bit variants.
Christoph Mallon [Sun, 2 Dec 2012 21:32:51 +0000 (22:32 +0100)]
ia32: Merge AddMem, AndMem, OrMem, SubMem and XorMem with their 8 bit variants.

11 years agoia32: Merge Cmp and Cmp8Bit.
Christoph Mallon [Sun, 2 Dec 2012 21:16:07 +0000 (22:16 +0100)]
ia32: Merge Cmp and Cmp8Bit.

11 years agoia32: Simplify binary emitters for binary operations now that test is handled extra.
Christoph Mallon [Sun, 2 Dec 2012 20:54:24 +0000 (21:54 +0100)]
ia32: Simplify binary emitters for binary operations now that test is handled extra.

11 years agoia32: Merge Test and Test8Bit.
Christoph Mallon [Sun, 2 Dec 2012 18:35:19 +0000 (19:35 +0100)]
ia32: Merge Test and Test8Bit.

11 years agoia32: Use a more logical specification of operand sizes in the binary emitter.
Christoph Mallon [Sun, 2 Dec 2012 17:57:13 +0000 (18:57 +0100)]
ia32: Use a more logical specification of operand sizes in the binary emitter.

11 years agobescripts: Copy all common node attributes into the constructor variants.
Christoph Mallon [Sun, 2 Dec 2012 13:16:38 +0000 (14:16 +0100)]
bescripts: Copy all common node attributes into the constructor variants.

11 years agoarm: Remove unused arity specification from nodes with constructors.
Christoph Mallon [Sun, 2 Dec 2012 12:56:32 +0000 (13:56 +0100)]
arm: Remove unused arity specification from nodes with constructors.

11 years agogenerate inline versions of node get/set functions
Matthias Braun [Sun, 2 Dec 2012 15:24:12 +0000 (16:24 +0100)]
generate inline versions of node get/set functions

11 years agoremove double definition of is_Proj/is_Phi
Matthias Braun [Sun, 2 Dec 2012 13:50:36 +0000 (14:50 +0100)]
remove double definition of is_Proj/is_Phi

11 years agoimplement load after store for different modes in big endian
Matthias Braun [Thu, 29 Nov 2012 21:45:56 +0000 (22:45 +0100)]
implement load after store for different modes in big endian

11 years agoconvert lower_mode_b to assure/confirm_irg_properties style
Matthias Braun [Thu, 29 Nov 2012 16:34:57 +0000 (17:34 +0100)]
convert lower_mode_b to assure/confirm_irg_properties style

11 years agoreassoc: Remove pointless macro indirection.
Christoph Mallon [Sun, 2 Dec 2012 11:33:33 +0000 (12:33 +0100)]
reassoc: Remove pointless macro indirection.

11 years agoopt_ldst: Remove the unused macro BYTE_SIZE().
Christoph Mallon [Sun, 2 Dec 2012 11:30:16 +0000 (12:30 +0100)]
opt_ldst: Remove the unused macro BYTE_SIZE().

11 years agocleanup: Remove end-of-if/for/function comments.
Christoph Mallon [Sun, 2 Dec 2012 11:28:15 +0000 (12:28 +0100)]
cleanup: Remove end-of-if/for/function comments.

11 years agoldstopt: Remove duplicate comments.
Christoph Mallon [Sun, 2 Dec 2012 11:17:40 +0000 (12:17 +0100)]
ldstopt: Remove duplicate comments.

The functions are documented in the header already.

11 years agosparc: Simplify finish_sparc_Return().
Christoph Mallon [Sun, 2 Dec 2012 11:12:13 +0000 (12:12 +0100)]
sparc: Simplify finish_sparc_Return().

11 years agoia32: Clean up peephole_ia32_Cmp().
Christoph Mallon [Sun, 2 Dec 2012 11:11:49 +0000 (12:11 +0100)]
ia32: Clean up peephole_ia32_Cmp().

11 years agobesched: Add and use sched_replace().
Christoph Mallon [Sun, 2 Dec 2012 11:11:34 +0000 (12:11 +0100)]
besched: Add and use sched_replace().

11 years agobe: Use sched_add_before(a, b) instead of sched_add_after(sched_prev(a), b).
Christoph Mallon [Sun, 2 Dec 2012 08:36:47 +0000 (09:36 +0100)]
be: Use sched_add_before(a, b) instead of sched_add_after(sched_prev(a), b).

11 years agoia32: Remove unnecessary tests from transform_to_Load() and transform_to_Store().
Christoph Mallon [Sun, 2 Dec 2012 08:34:35 +0000 (09:34 +0100)]
ia32: Remove unnecessary tests from transform_to_Load() and transform_to_Store().

The reload/spill is always scheduled, because we found it in the schedule.

11 years agobessadestr: Use be_get_end_of_block_insertion_point().
Christoph Mallon [Sun, 2 Dec 2012 08:30:59 +0000 (09:30 +0100)]
bessadestr: Use be_get_end_of_block_insertion_point().

11 years agobescripts: Use strings, instead of arrays, to buffer the generated code.
Christoph Mallon [Sat, 1 Dec 2012 22:10:25 +0000 (23:10 +0100)]
bescripts: Use strings, instead of arrays, to buffer the generated code.

11 years agobescripts: Set be_emit_nothing() as emitter, if the emitter string of a node is empty.
Christoph Mallon [Sat, 1 Dec 2012 22:08:00 +0000 (23:08 +0100)]
bescripts: Set be_emit_nothing() as emitter, if the emitter string of a node is empty.

11 years agobescripts: Remove support for emit templates.
Christoph Mallon [Sat, 1 Dec 2012 20:52:42 +0000 (21:52 +0100)]
bescripts: Remove support for emit templates.

11 years agobescripts: Remove unused execution unit specification.
Christoph Mallon [Sat, 1 Dec 2012 23:11:20 +0000 (00:11 +0100)]
bescripts: Remove unused execution unit specification.

11 years agobescripts: Remove unused features and stale uses of gone features.
Christoph Mallon [Sat, 1 Dec 2012 20:44:59 +0000 (21:44 +0100)]
bescripts: Remove unused features and stale uses of gone features.

11 years agoia32: Remove (empty) emitters from nodes, which should never be emitted.
Christoph Mallon [Sat, 1 Dec 2012 21:18:24 +0000 (22:18 +0100)]
ia32: Remove (empty) emitters from nodes, which should never be emitted.

11 years agoamd64: Simplify amd64_register_saved_by().
Christoph Mallon [Sat, 1 Dec 2012 19:48:57 +0000 (20:48 +0100)]
amd64: Simplify amd64_register_saved_by().

11 years agobeabi: Remove the unnecessary struct reg_node_map_t.
Christoph Mallon [Sat, 1 Dec 2012 17:56:39 +0000 (18:56 +0100)]
beabi: Remove the unnecessary struct reg_node_map_t.

The irn is unused.

11 years agobeabi: Remove unnecessary exclusion/inclusion of ignore registers from call/return.
Christoph Mallon [Sat, 1 Dec 2012 17:41:59 +0000 (18:41 +0100)]
beabi: Remove unnecessary exclusion/inclusion of ignore registers from call/return.

11 years agoia32: Do not ignore the floating point control word anymore and make it callee-save.
Christoph Mallon [Sat, 1 Dec 2012 16:55:24 +0000 (17:55 +0100)]
ia32: Do not ignore the floating point control word anymore and make it callee-save.

This corrects handling in bestate (non-ignore).
beabi attaches the fpcw to Start/Return due to being callee-save.
This was accidently done before due to being ignored.

11 years agoia32: Simplify ia32_register_saved_by().
Christoph Mallon [Sat, 1 Dec 2012 16:40:38 +0000 (17:40 +0100)]
ia32: Simplify ia32_register_saved_by().

This resolves a latent bug that the x87 noreg register was classified as caller save.
The local index of the given register was compared to the global index of the x87 noreg.

11 years agotemplate: Correct comment.
Christoph Mallon [Sat, 1 Dec 2012 15:13:26 +0000 (16:13 +0100)]
template: Correct comment.

11 years agoarray: Add and use NEW_ARR_FZ().
Christoph Mallon [Sat, 1 Dec 2012 11:39:48 +0000 (12:39 +0100)]
array: Add and use NEW_ARR_FZ().

11 years agoarray: Use DUP_ARR_D().
Christoph Mallon [Sat, 1 Dec 2012 11:25:24 +0000 (12:25 +0100)]
array: Use DUP_ARR_D().

11 years agoarray: Add and use NEW_ARR_DZ().
Christoph Mallon [Sat, 1 Dec 2012 11:25:13 +0000 (12:25 +0100)]
array: Add and use NEW_ARR_DZ().

11 years agogvnpre: Put the obstack into struct pre_env instead of delegating it.
Christoph Mallon [Sat, 1 Dec 2012 15:29:23 +0000 (16:29 +0100)]
gvnpre: Put the obstack into struct pre_env instead of delegating it.

11 years agobeblocksched: Put the obstack into blocksched_env_t instead of delegating it.
Christoph Mallon [Sat, 1 Dec 2012 12:10:34 +0000 (13:10 +0100)]
beblocksched: Put the obstack into blocksched_env_t instead of delegating it.

11 years agoirgraph: Factorise common code of the callers of alloc_graph() into it.
Christoph Mallon [Sat, 1 Dec 2012 18:55:40 +0000 (19:55 +0100)]
irgraph: Factorise common code of the callers of alloc_graph() into it.

11 years agoirgraph: Remove the unused facility to register space /in front of/ a graph.
Christoph Mallon [Sat, 1 Dec 2012 18:32:58 +0000 (19:32 +0100)]
irgraph: Remove the unused facility to register space /in front of/ a graph.

11 years agoirgraph: Put the obstack into ir_graph instead of delegating it.
Christoph Mallon [Sat, 1 Dec 2012 12:36:05 +0000 (13:36 +0100)]
irgraph: Put the obstack into ir_graph instead of delegating it.

11 years agoirgraph: Assert in get_irg_obstack(), that no object is currently growing.
Christoph Mallon [Sat, 1 Dec 2012 11:03:26 +0000 (12:03 +0100)]
irgraph: Assert in get_irg_obstack(), that no object is currently growing.

11 years agoirgraph: Use get_irg_obstack() instead of accessing irg->obst directly.
Christoph Mallon [Sat, 1 Dec 2012 11:01:37 +0000 (12:01 +0100)]
irgraph: Use get_irg_obstack() instead of accessing irg->obst directly.

11 years agocleanup: Fix typos in comments.
Christoph Mallon [Sat, 1 Dec 2012 12:29:07 +0000 (13:29 +0100)]
cleanup: Fix typos in comments.

11 years agobearch: When dumping backend info, do not print an error, when a node has no in_reqs...
Christoph Mallon [Sat, 1 Dec 2012 09:59:04 +0000 (10:59 +0100)]
bearch: When dumping backend info, do not print an error, when a node has no in_reqs, if its arity is 0.

11 years agobeprefalloc: Fix a c&p-o in the change to use arch_register_req_is().
Christoph Mallon [Fri, 30 Nov 2012 22:05:27 +0000 (23:05 +0100)]
beprefalloc: Fix a c&p-o in the change to use arch_register_req_is().

This fixes fa66e6b80ee0a2e0c20cd1663c84b06e3178d217.

11 years agoia32: Fix some mostly harmless warnings.
Christoph Mallon [Fri, 30 Nov 2012 17:13:40 +0000 (18:13 +0100)]
ia32: Fix some mostly harmless warnings.

11 years agoia32: When emitting an asm memory operand, ignore the size of the referenced value...
Christoph Mallon [Fri, 30 Nov 2012 10:37:02 +0000 (11:37 +0100)]
ia32: When emitting an asm memory operand, ignore the size of the referenced value and asm operand size modifier.

The register, which is emitted, contains the address of the value, so it always is the size of a pointer, not whatever the register points to.

11 years agoia32: Remove the ia32_x87_attr_t from ia32_asm_attr_t.
Christoph Mallon [Fri, 30 Nov 2012 10:25:22 +0000 (11:25 +0100)]
ia32: Remove the ia32_x87_attr_t from ia32_asm_attr_t.

It does not provide sufficient information to handle float in asm.

11 years agoia32: Factorise setting do_x87_sim into a helper function.
Christoph Mallon [Fri, 30 Nov 2012 10:23:55 +0000 (11:23 +0100)]
ia32: Factorise setting do_x87_sim into a helper function.

11 years agobeinfo: Reduce code duplication.
Christoph Mallon [Fri, 30 Nov 2012 10:22:57 +0000 (11:22 +0100)]
beinfo: Reduce code duplication.

11 years agobespillutil: Remove unnecessary case.
Christoph Mallon [Fri, 30 Nov 2012 08:53:05 +0000 (09:53 +0100)]
bespillutil: Remove unnecessary case.

The reloader never is a block.

11 years agobespillutil: Inline be_add_reload2() into its only caller be_add_reload(), which...
Christoph Mallon [Fri, 30 Nov 2012 08:31:15 +0000 (09:31 +0100)]
bespillutil: Inline be_add_reload2() into its only caller be_add_reload(), which in turn only calls the former.

11 years agobespillutil: Remove the write-only attribute can_spill_after from struct reloader_t.
Christoph Mallon [Fri, 30 Nov 2012 08:28:48 +0000 (09:28 +0100)]
bespillutil: Remove the write-only attribute can_spill_after from struct reloader_t.

11 years agobespillbelady: Remove the global variable instr.
Christoph Mallon [Fri, 30 Nov 2012 08:39:01 +0000 (09:39 +0100)]
bespillbelady: Remove the global variable instr.

11 years agobearch: Remove unused macros.
Christoph Mallon [Fri, 30 Nov 2012 08:07:07 +0000 (09:07 +0100)]
bearch: Remove unused macros.

11 years agobe: inline arch_env_begin_codegeneration() into its only caller.
Christoph Mallon [Thu, 29 Nov 2012 23:13:02 +0000 (00:13 +0100)]
be: inline arch_env_begin_codegeneration() into its only caller.

11 years agobemain: Centrally call be_gas_end_compilation_unit() and be_emit_exit() instead of...
Christoph Mallon [Fri, 30 Nov 2012 07:42:56 +0000 (08:42 +0100)]
bemain: Centrally call be_gas_end_compilation_unit() and be_emit_exit() instead of doing it per backend.

Also remove the now write-only attribute main_env from struct arch_env_t.

11 years agobemain: Centrally call be_emit_init() and be_gas_begin_compilation_unit() instead...
Christoph Mallon [Thu, 29 Nov 2012 23:02:33 +0000 (00:02 +0100)]
bemain: Centrally call be_emit_init() and be_gas_begin_compilation_unit() instead of doing it per backend.

11 years agosparc: Do not force the object file format to ELF.
Christoph Mallon [Thu, 29 Nov 2012 22:50:51 +0000 (23:50 +0100)]
sparc: Do not force the object file format to ELF.

11 years agoscripts: Remove unsed gen_init.py.
Christoph Mallon [Thu, 29 Nov 2012 23:17:00 +0000 (00:17 +0100)]
scripts: Remove unsed gen_init.py.

11 years agoia32: Remove the write-only/unused attributes isa and irg from struct ia32_intrinsic_...
Christoph Mallon [Thu, 29 Nov 2012 16:50:05 +0000 (17:50 +0100)]
ia32: Remove the write-only/unused attributes isa and irg from struct ia32_intrinsic_env_t.

11 years agoia32: There are no Start nodes (only be_Start), which are not to emit.
Christoph Mallon [Thu, 29 Nov 2012 12:38:50 +0000 (13:38 +0100)]
ia32: There are no Start nodes (only be_Start), which are not to emit.

11 years agobeemit: Provide be_emit_node(), which merges the (almost) identical node emit functio...
Christoph Mallon [Thu, 29 Nov 2012 11:22:22 +0000 (12:22 +0100)]
beemit: Provide be_emit_node(), which merges the (almost) identical node emit functions of the backends.

11 years agobeemit: Provide be_set_emitter() replacing identical functions in all backends.
Christoph Mallon [Thu, 29 Nov 2012 12:22:25 +0000 (13:22 +0100)]
beemit: Provide be_set_emitter() replacing identical functions in all backends.

Also use one common be_emit_nothing().

11 years agoirop: Provide macro wrappers for [gs]et_generic_function_ptr_().
Christoph Mallon [Thu, 29 Nov 2012 11:25:55 +0000 (12:25 +0100)]
irop: Provide macro wrappers for [gs]et_generic_function_ptr_().

11 years agobe: Replace generate_emitter.pl by generate_emitter_new.pl.
Christoph Mallon [Thu, 29 Nov 2012 12:17:28 +0000 (13:17 +0100)]
be: Replace generate_emitter.pl by generate_emitter_new.pl.

11 years agobe: Simplify places, which still assumed, that Projs are scheduled.
Christoph Mallon [Thu, 29 Nov 2012 07:39:43 +0000 (08:39 +0100)]
be: Simplify places, which still assumed, that Projs are scheduled.

11 years agoarm: Simplify confusing condition.
Christoph Mallon [Thu, 29 Nov 2012 07:38:43 +0000 (08:38 +0100)]
arm: Simplify confusing condition.

11 years agobespillutil: Remove the unusd function be_add_reload_at_end().
Christoph Mallon [Thu, 29 Nov 2012 07:37:51 +0000 (08:37 +0100)]
bespillutil: Remove the unusd function be_add_reload_at_end().

11 years agobestate: Use be_get_end_of_block_insertion_point() instead of implementing something...
Christoph Mallon [Thu, 29 Nov 2012 07:37:12 +0000 (08:37 +0100)]
bestate: Use be_get_end_of_block_insertion_point() instead of implementing something not entierly unlike it.

11 years agobespillslots: Use be_get_end_of_block_insertion_point() instead of implementing somet...
Christoph Mallon [Thu, 29 Nov 2012 07:35:07 +0000 (08:35 +0100)]
bespillslots: Use be_get_end_of_block_insertion_point() instead of implementing something not entierly unlike it.

11 years agoarch_spec: Remove remnants of unused operands.
Christoph Mallon [Wed, 28 Nov 2012 21:48:34 +0000 (22:48 +0100)]
arch_spec: Remove remnants of unused operands.

11 years agobessaconstr: Factorise common code.
Christoph Mallon [Wed, 28 Nov 2012 20:45:15 +0000 (21:45 +0100)]
bessaconstr: Factorise common code.

11 years agobessaconstr: Avoid duplicate map lookups.
Christoph Mallon [Wed, 28 Nov 2012 20:35:55 +0000 (21:35 +0100)]
bessaconstr: Avoid duplicate map lookups.

11 years agobessaconstr: Remove the unused function be_ssa_construction_set_ignore_uses().
Christoph Mallon [Wed, 28 Nov 2012 20:02:56 +0000 (21:02 +0100)]
bessaconstr: Remove the unused function be_ssa_construction_set_ignore_uses().

11 years agoia32: Replace get_proj() by be_get_Proj_for_pn().
Christoph Mallon [Wed, 28 Nov 2012 19:33:27 +0000 (20:33 +0100)]
ia32: Replace get_proj() by be_get_Proj_for_pn().

11 years agobearch: Add and use be_foreach_value().
Christoph Mallon [Wed, 28 Nov 2012 19:16:27 +0000 (20:16 +0100)]
bearch: Add and use be_foreach_value().

This also handles the latent problem, that nobody checks, whether the user of a tuple is actually a Proj and not the End node.

11 years agobelower: Remove the unused enum entries PERM_COPY and PERM_SWAP.
Christoph Mallon [Wed, 28 Nov 2012 17:02:01 +0000 (18:02 +0100)]
belower: Remove the unused enum entries PERM_COPY and PERM_SWAP.

11 years agobelower: Factorise common code.
Christoph Mallon [Wed, 28 Nov 2012 17:00:01 +0000 (18:00 +0100)]
belower: Factorise common code.

11 years agobelower: Avoid skip_Proj() by simply not setting the sched_point to a Proj.
Christoph Mallon [Wed, 28 Nov 2012 16:58:44 +0000 (17:58 +0100)]
belower: Avoid skip_Proj() by simply not setting the sched_point to a Proj.

11 years agobestate: Remove unnecessary test.
Christoph Mallon [Wed, 28 Nov 2012 16:14:39 +0000 (17:14 +0100)]
bestate: Remove unnecessary test.

Projs are not scheduled anymore.

11 years agobelive: Clean up be_values_interfere() and its cousin my_values_interfere2().
Christoph Mallon [Wed, 28 Nov 2012 15:52:09 +0000 (16:52 +0100)]
belive: Clean up be_values_interfere() and its cousin my_values_interfere2().

11 years agobelive: Change all users of _value_strictly_dominates() to _value_strictly_dominates_...
Christoph Mallon [Wed, 28 Nov 2012 15:33:27 +0000 (16:33 +0100)]
belive: Change all users of _value_strictly_dominates() to _value_strictly_dominates_intrablock().

All users check, that the blocks are equal, beforehand.

11 years agobearch: Use be_foreach_use() in more places.
Christoph Mallon [Wed, 28 Nov 2012 12:33:13 +0000 (13:33 +0100)]
bearch: Use be_foreach_use() in more places.