libfirm
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.

11 years agobearch: Make the register requirements an output parameter of be_foreach_definition().
Christoph Mallon [Wed, 28 Nov 2012 11:55:17 +0000 (12:55 +0100)]
bearch: Make the register requirements an output parameter of be_foreach_definition().

11 years agobespillbelady: Remove now redundant test.
Christoph Mallon [Wed, 28 Nov 2012 11:31:34 +0000 (12:31 +0100)]
bespillbelady: Remove now redundant test.

11 years agoavoid querying End/Anchor for register requirements
Matthias Braun [Wed, 28 Nov 2012 10:18:36 +0000 (11:18 +0100)]
avoid querying End/Anchor for register requirements

11 years agoverify sched_not_scheduled flag
Matthias Braun [Tue, 27 Nov 2012 17:02:33 +0000 (18:02 +0100)]
verify sched_not_scheduled flag

11 years agomake schedule dumper more robust/cleanup
Matthias Braun [Tue, 27 Nov 2012 17:01:39 +0000 (18:01 +0100)]
make schedule dumper more robust/cleanup

11 years agointroduce be_foreach_use and use it
Matthias Braun [Tue, 27 Nov 2012 16:49:06 +0000 (17:49 +0100)]
introduce be_foreach_use and use it

11 years agomore be_foreach_definition usage
Matthias Braun [Tue, 27 Nov 2012 16:44:54 +0000 (17:44 +0100)]
more be_foreach_definition usage

11 years agointroduce be_lv_foreach_cls and use it
Matthias Braun [Tue, 27 Nov 2012 16:31:38 +0000 (17:31 +0100)]
introduce be_lv_foreach_cls and use it

11 years agomove is_liveness_node to irlivechk header and share it with belive
Matthias Braun [Tue, 27 Nov 2012 16:27:10 +0000 (17:27 +0100)]
move is_liveness_node to irlivechk header and share it with belive

11 years agorework liveness dumper
Matthias Braun [Tue, 27 Nov 2012 13:53:54 +0000 (14:53 +0100)]
rework liveness dumper

- some code cleanup
- avoids the case where 2 dumpers are registered

11 years agoRemove unused flags output from AMD64 Neg.
Christoph Mallon [Mon, 18 Jun 2012 13:49:38 +0000 (15:49 +0200)]
Remove unused flags output from AMD64 Neg.

11 years agoMark memory using nodes with "uses_memory".
Christoph Mallon [Mon, 18 Jun 2012 12:16:27 +0000 (14:16 +0200)]
Mark memory using nodes with "uses_memory".

11 years agosparc: Clean up introduce_epilog().
Christoph Mallon [Wed, 28 Nov 2012 09:32:59 +0000 (10:32 +0100)]
sparc: Clean up introduce_epilog().

11 years agosparc: Make kill_unused_stacknodes() work by not shadowing the variable, which should...
Christoph Mallon [Wed, 28 Nov 2012 09:27:18 +0000 (10:27 +0100)]
sparc: Make kill_unused_stacknodes() work by not shadowing the variable, which should be used.

11 years agobenode: Remove be_find_return_reg_input().
Christoph Mallon [Wed, 28 Nov 2012 09:10:40 +0000 (10:10 +0100)]
benode: Remove be_find_return_reg_input().

The only user knwos, where its sp is.

11 years agoia32: Implement ugly fix to use the right noreg, when using SSE.
Christoph Mallon [Wed, 28 Nov 2012 08:32:02 +0000 (09:32 +0100)]
ia32: Implement ugly fix to use the right noreg, when using SSE.

11 years agobearch: Introduce be_foreach_out().
Christoph Mallon [Tue, 27 Nov 2012 22:38:26 +0000 (23:38 +0100)]
bearch: Introduce be_foreach_out().

11 years agobearch: Also dump the slot index of should_be_same and must_be_different constraints.
Christoph Mallon [Tue, 27 Nov 2012 22:36:41 +0000 (23:36 +0100)]
bearch: Also dump the slot index of should_be_same and must_be_different constraints.

11 years agobearch: Dump the output requirement and the assigned register in the same line for...
Christoph Mallon [Tue, 27 Nov 2012 22:35:29 +0000 (23:35 +0100)]
bearch: Dump the output requirement and the assigned register in the same line for better readability.

11 years agoia32: Prevent out-of-bounds access after calling emit_asm_operand().
Christoph Mallon [Tue, 27 Nov 2012 22:21:19 +0000 (23:21 +0100)]
ia32: Prevent out-of-bounds access after calling emit_asm_operand().

11 years agoia32: Inline get_ia32_orig_node() into its only caller.
Christoph Mallon [Tue, 27 Nov 2012 22:15:54 +0000 (23:15 +0100)]
ia32: Inline get_ia32_orig_node() into its only caller.

11 years agoia32: Remove declarations of non-existent functions.
Christoph Mallon [Tue, 27 Nov 2012 22:12:17 +0000 (23:12 +0100)]
ia32: Remove declarations of non-existent functions.

11 years agoia32: Remove the unnecessary functions is_ia32_AddrModeS() and is_ia32_AddrModeD().
Christoph Mallon [Tue, 27 Nov 2012 22:06:42 +0000 (23:06 +0100)]
ia32: Remove the unnecessary functions is_ia32_AddrModeS() and is_ia32_AddrModeD().

11 years agoia32: Make some tests a bit cheaper by checking for ia32_Normal (0) instead of ia32_A...
Christoph Mallon [Tue, 27 Nov 2012 21:59:50 +0000 (22:59 +0100)]
ia32: Make some tests a bit cheaper by checking for ia32_Normal (0) instead of ia32_AddrModeS (2).

11 years agoia32: Do not use current_ir_graph in ia32_make_register_req().
Christoph Mallon [Tue, 27 Nov 2012 21:56:48 +0000 (22:56 +0100)]
ia32: Do not use current_ir_graph in ia32_make_register_req().

11 years agoia32: Do not use current_ir_graph in ia32_create_Immediate().
Christoph Mallon [Tue, 27 Nov 2012 21:55:06 +0000 (22:55 +0100)]
ia32: Do not use current_ir_graph in ia32_create_Immediate().

11 years agoia32: Clean up ia32_try_create_Immediate().
Christoph Mallon [Tue, 27 Nov 2012 21:42:40 +0000 (22:42 +0100)]
ia32: Clean up ia32_try_create_Immediate().

11 years agoia32: Allow symconsts in "i" asm constraints.
Christoph Mallon [Tue, 27 Nov 2012 21:04:59 +0000 (22:04 +0100)]
ia32: Allow symconsts in "i" asm constraints.

11 years agoia32: Remove the parameter immediate_constraint_type, which is always 0, from create_...
Christoph Mallon [Tue, 27 Nov 2012 21:01:13 +0000 (22:01 +0100)]
ia32: Remove the parameter immediate_constraint_type, which is always 0, from create_immediate_or_transform().

11 years agoscripts: Reduce scope of variable.
Christoph Mallon [Tue, 27 Nov 2012 20:49:05 +0000 (21:49 +0100)]
scripts: Reduce scope of variable.

11 years agoscripts: Use a string instead of magic numbers for register types.
Christoph Mallon [Tue, 27 Nov 2012 20:46:40 +0000 (21:46 +0100)]
scripts: Use a string instead of magic numbers for register types.

11 years agoscripts: Simplify mapping flags.
Christoph Mallon [Tue, 27 Nov 2012 20:42:48 +0000 (21:42 +0100)]
scripts: Simplify mapping flags.

11 years agoamd64: Remove copy&past-ed comments from the node specification.
Christoph Mallon [Tue, 27 Nov 2012 20:39:33 +0000 (21:39 +0100)]
amd64: Remove copy&past-ed comments from the node specification.

11 years agobeschednormal: Properly check for nodes, which are not scheduled.
Christoph Mallon [Tue, 27 Nov 2012 16:57:49 +0000 (17:57 +0100)]
beschednormal: Properly check for nodes, which are not scheduled.

11 years agobesched: Remove redundant assert()s.
Christoph Mallon [Tue, 27 Nov 2012 16:23:47 +0000 (17:23 +0100)]
besched: Remove redundant assert()s.

sched_get_time_step() checks the same.

11 years agobeverify: Simply use the register, which we already have, instead of fetching it...
Christoph Mallon [Tue, 27 Nov 2012 16:09:49 +0000 (17:09 +0100)]
beverify: Simply use the register, which we already have, instead of fetching it again via its global index.

11 years agobe: Pass ir_graph* instead of ir_node* to allocate_reg_req().
Christoph Mallon [Tue, 27 Nov 2012 15:43:21 +0000 (16:43 +0100)]
be: Pass ir_graph* instead of ir_node* to allocate_reg_req().

11 years agoia32: Simply return the single_req in ia32_parse_clobber().
Christoph Mallon [Tue, 27 Nov 2012 15:24:52 +0000 (16:24 +0100)]
ia32: Simply return the single_req in ia32_parse_clobber().

11 years agoia32: Clean ip ia32_make_register_req().
Christoph Mallon [Tue, 27 Nov 2012 15:21:54 +0000 (16:21 +0100)]
ia32: Clean ip ia32_make_register_req().

11 years agoia32: Simply return the class_req in ia32_make_register_req(), when possible.
Christoph Mallon [Tue, 27 Nov 2012 15:14:55 +0000 (16:14 +0100)]
ia32: Simply return the class_req in ia32_make_register_req(), when possible.

11 years agoia32: Make ia32_make_register_req() static.
Christoph Mallon [Tue, 27 Nov 2012 14:59:09 +0000 (15:59 +0100)]
ia32: Make ia32_make_register_req() static.

11 years agobestack: Simplify be_abi_fix_stack_nodes() using be_create_reg_req().
Christoph Mallon [Tue, 27 Nov 2012 14:45:34 +0000 (15:45 +0100)]
bestack: Simplify be_abi_fix_stack_nodes() using be_create_reg_req().

11 years agobenode: Remove unused support for a flexible number of reg_out_info_t.
Christoph Mallon [Tue, 27 Nov 2012 13:58:34 +0000 (14:58 +0100)]
benode: Remove unused support for a flexible number of reg_out_info_t.

11 years agobearch: Make arch_dump_register_req() static.
Christoph Mallon [Tue, 27 Nov 2012 13:46:12 +0000 (14:46 +0100)]
bearch: Make arch_dump_register_req() static.

11 years agoAllow the first line to be a comment.
Ingmar Wirths [Tue, 24 Jul 2012 13:10:17 +0000 (15:10 +0200)]
Allow the first line to be a comment.

A comments starts with '#'.

11 years agobeschedregpress: Remove unnecessary tests.
Christoph Mallon [Tue, 27 Nov 2012 12:26:45 +0000 (13:26 +0100)]
beschedregpress: Remove unnecessary tests.

It is impossible for a node in the schedule to be a Proj or not be scheduled.

11 years agobeprefalloc: Correct typo in comment.
Christoph Mallon [Tue, 27 Nov 2012 12:26:27 +0000 (13:26 +0100)]
beprefalloc: Correct typo in comment.

11 years agoFixed warnings introduced in 97080a1af7b7e8a4969d2fba25e065df417ff074.
Sebastian Buchwald [Tue, 27 Nov 2012 10:15:03 +0000 (11:15 +0100)]
Fixed warnings introduced in 97080a1af7b7e8a4969d2fba25e065df417ff074.

11 years agobearch: Remove the special case for Projs from arch_get_irn_flags().
Christoph Mallon [Tue, 27 Nov 2012 11:31:04 +0000 (12:31 +0100)]
bearch: Remove the special case for Projs from arch_get_irn_flags().

Nobody should ask Projs for arch_irn_flags_t.

11 years agobeschednormal: Remove strange scheduled test from tree cost calculation.
Christoph Mallon [Tue, 27 Nov 2012 11:28:05 +0000 (12:28 +0100)]
beschednormal: Remove strange scheduled test from tree cost calculation.

The test simply makes no sense.

11 years agoutil: Remove duplicate definitions of the macros MAX and MIN.
Christoph Mallon [Tue, 27 Nov 2012 10:43:54 +0000 (11:43 +0100)]
util: Remove duplicate definitions of the macros MAX and MIN.

11 years agoarray: Remove the attribute eltsize from struct ir_arr_descr.
Christoph Mallon [Tue, 27 Nov 2012 09:56:47 +0000 (10:56 +0100)]
array: Remove the attribute eltsize from struct ir_arr_descr.

It is hardly able to catch problems, because most arrays contain pointers.

11 years agoarray: Remove the write-only attribute u.obstack from struct ir_arr_descr.
Christoph Mallon [Tue, 27 Nov 2012 09:49:58 +0000 (10:49 +0100)]
array: Remove the write-only attribute u.obstack from struct ir_arr_descr.