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

11 years agoirgwalk: Remove unnecessary skip_Id().
Christoph Mallon [Tue, 27 Nov 2012 09:10:44 +0000 (10:10 +0100)]
irgwalk: Remove unnecessary skip_Id().

n is produced by Id-skipping functions, so cannot be an Id node.

11 years agobearch: Use arch_register_req_is(req, ignore) instead of arch_irn_is_ignore(...)...
Christoph Mallon [Tue, 27 Nov 2012 08:05:27 +0000 (09:05 +0100)]
bearch: Use arch_register_req_is(req, ignore) instead of arch_irn_is_ignore(...), if we use the register requirements multiple times.

11 years agobearch: Use arch_register_req_is().
Christoph Mallon [Tue, 27 Nov 2012 07:25:54 +0000 (08:25 +0100)]
bearch: Use arch_register_req_is().

11 years agobearch: Replace is_2addr_code(req) by arch_register_req_is(req, should_be_same).
Christoph Mallon [Tue, 27 Nov 2012 07:21:55 +0000 (08:21 +0100)]
bearch: Replace is_2addr_code(req) by arch_register_req_is(req, should_be_same).

11 years agoirnode: Remove unnecessary skip_Proj() from get_Block_cfgpred_block_().
Christoph Mallon [Tue, 27 Nov 2012 07:03:10 +0000 (08:03 +0100)]
irnode: Remove unnecessary skip_Proj() from get_Block_cfgpred_block_().

Projs are always in the same block as their predecessor.

11 years agoiredges: Slightly simplify foreach_out_edge_kind_safe().
Christoph Mallon [Mon, 26 Nov 2012 21:05:54 +0000 (22:05 +0100)]
iredges: Slightly simplify foreach_out_edge_kind_safe().

11 years agobelive: Remove duplicate assert()s.
Christoph Mallon [Mon, 26 Nov 2012 20:11:28 +0000 (21:11 +0100)]
belive: Remove duplicate assert()s.

sched_get_time_step() checks the same.

11 years agoimprove arch_dump_reqs_and_registers()
Matthias Braun [Tue, 27 Nov 2012 10:11:50 +0000 (11:11 +0100)]
improve arch_dump_reqs_and_registers()

make it more robust and remove unnecessary req check

11 years agobeinfo: assert() that be_get_info() is not called on Projs.
Christoph Mallon [Mon, 26 Nov 2012 21:22:00 +0000 (22:22 +0100)]
beinfo: assert() that be_get_info() is not called on Projs.

This also corrects dumping schedule edges.

11 years agofix doxygen warning
Matthias Braun [Mon, 26 Nov 2012 20:27:14 +0000 (21:27 +0100)]
fix doxygen warning

11 years agooptimize iredges code
Matthias Braun [Mon, 26 Nov 2012 20:07:51 +0000 (21:07 +0100)]
optimize iredges code

- split edges_notify_edge into add/del/modify and call the correct
  function where we know which is needed
- get rid of some unnecessary flags so the ir_edge_t struct is smaller

11 years agoexpose some critical bearch functions for inlining
Matthias Braun [Mon, 26 Nov 2012 18:21:15 +0000 (19:21 +0100)]
expose some critical bearch functions for inlining

11 years agoslightly optimize liveness code
Matthias Braun [Mon, 26 Nov 2012 18:01:40 +0000 (19:01 +0100)]
slightly optimize liveness code

- save ir_node* instead of irn_idx in the map (saves irn_idx_map
  lookups)
- in liveness_transfer check register class on the inputs (which is
  cheaper) and only then check the operand

11 years agoget rid of get_irg_estimated_node_count
Matthias Braun [Mon, 26 Nov 2012 17:13:13 +0000 (18:13 +0100)]
get rid of get_irg_estimated_node_count

We have simpler code without it, and a heuristic based on
get_irg_last_idx() seems to work as well.

11 years agoremove irprintf_t.h; only unused stuff in it
Matthias Braun [Mon, 26 Nov 2012 16:56:30 +0000 (17:56 +0100)]
remove irprintf_t.h; only unused stuff in it

11 years agofix doxygen warnings
Matthias Braun [Mon, 26 Nov 2012 16:28:19 +0000 (17:28 +0100)]
fix doxygen warnings

11 years agodon't grow the hashset if it just clobbered with deleted entries
Matthias Braun [Mon, 26 Nov 2012 16:10:53 +0000 (17:10 +0100)]
don't grow the hashset if it just clobbered with deleted entries

11 years agofix irhooks move commit
Matthias Braun [Mon, 26 Nov 2012 15:20:11 +0000 (16:20 +0100)]
fix irhooks move commit

11 years agomove internal defines/datatypes from .h in .c file
Matthias Braun [Mon, 26 Nov 2012 14:40:25 +0000 (15:40 +0100)]
move internal defines/datatypes from .h in .c file

11 years agoremove a bunch of pointless asserts for non-NULL pointers
Matthias Braun [Mon, 26 Nov 2012 14:24:35 +0000 (15:24 +0100)]
remove a bunch of pointless asserts for non-NULL pointers

We get a clean SIGSEGV anyway, if they're not fulfilled

11 years agobestack: Remove the unused return value from stack_frame_compute_initial_offset().
Christoph Mallon [Mon, 26 Nov 2012 14:23:07 +0000 (15:23 +0100)]
bestack: Remove the unused return value from stack_frame_compute_initial_offset().

11 years agomove all inline #defines to the begin of their headers
Matthias Braun [Mon, 26 Nov 2012 14:15:43 +0000 (15:15 +0100)]
move all inline #defines to the begin of their headers

So all files in libFirm do this consistently

11 years agomake irhooks API private
Matthias Braun [Mon, 26 Nov 2012 14:11:51 +0000 (15:11 +0100)]
make irhooks API private

11 years agoquery firmstat options through lc_opt system
Matthias Braun [Mon, 26 Nov 2012 14:06:43 +0000 (15:06 +0100)]
query firmstat options through lc_opt system

11 years agoget rid of #define in public headers
Matthias Braun [Mon, 26 Nov 2012 11:50:44 +0000 (12:50 +0100)]
get rid of #define in public headers

11 years agobestack: Simplify collect_stack_nodes_walker().
Christoph Mallon [Mon, 26 Nov 2012 09:46:00 +0000 (10:46 +0100)]
bestack: Simplify collect_stack_nodes_walker().

11 years agocleanup: Remove unnecessary #include from belive_t.h.
Christoph Mallon [Mon, 26 Nov 2012 09:45:34 +0000 (10:45 +0100)]
cleanup: Remove unnecessary #include from belive_t.h.

11 years agobelive: Remove unused (and partially broken) macros.
Christoph Mallon [Mon, 26 Nov 2012 09:34:42 +0000 (10:34 +0100)]
belive: Remove unused (and partially broken) macros.

11 years agobelive: Remove the declaration of the non-existent function be_liveness_add_missing().
Christoph Mallon [Mon, 26 Nov 2012 09:11:50 +0000 (10:11 +0100)]
belive: Remove the declaration of the non-existent function be_liveness_add_missing().

11 years agoia32: Do not call a global variable mcount.
Christoph Mallon [Mon, 26 Nov 2012 06:19:19 +0000 (07:19 +0100)]
ia32: Do not call a global variable mcount.

Profiling uses a magic function named mcount.
When profiling libFirm, these two symbols with the same name lead to strange problems.

11 years agorbitset: Handle the edge case that the start position equals the end position in...
Christoph Mallon [Sun, 25 Nov 2012 22:05:24 +0000 (23:05 +0100)]
rbitset: Handle the edge case that the start position equals the end position in rbitset_next_max().

This fixes rbitset_foreach().

11 years agocleanup: Remove several uses of current_ir_graph.
Christoph Mallon [Sun, 25 Nov 2012 21:12:26 +0000 (22:12 +0100)]
cleanup: Remove several uses of current_ir_graph.

11 years agodocumentation: Update (i.e. mostly delete) information regarding current_ir_graph.
Christoph Mallon [Sun, 25 Nov 2012 20:54:33 +0000 (21:54 +0100)]
documentation: Update (i.e. mostly delete) information regarding current_ir_graph.

11 years agocleanup: Use get_Block_n_cfgpreds()/get_Block_cfgpred() instead of get_irn_arity...
Christoph Mallon [Sun, 25 Nov 2012 18:19:31 +0000 (19:19 +0100)]
cleanup: Use get_Block_n_cfgpreds()/get_Block_cfgpred() instead of get_irn_arity()/get_irn_n().

11 years agocleanup: Remove unnecessary #include "obst.h".
Christoph Mallon [Sun, 25 Nov 2012 17:45:56 +0000 (18:45 +0100)]
cleanup: Remove unnecessary #include "obst.h".

11 years agobechordal: Remove T_RA_PROLOG.
Christoph Mallon [Sun, 25 Nov 2012 17:30:35 +0000 (18:30 +0100)]
bechordal: Remove T_RA_PROLOG.

It only measures initializing a single struct.

11 years agobechordal: Put the chordal obstack into be_chordal_env_t instead of delegating it.
Christoph Mallon [Sun, 25 Nov 2012 17:28:48 +0000 (18:28 +0100)]
bechordal: Put the chordal obstack into be_chordal_env_t instead of delegating it.

11 years agobechordal: Replace struct post_spill_env_t by its only attribute.
Christoph Mallon [Sun, 25 Nov 2012 17:21:26 +0000 (18:21 +0100)]
bechordal: Replace struct post_spill_env_t by its only attribute.

11 years agobechordal: Remove the attribute cls from struct post_spill_env_t.
Christoph Mallon [Sun, 25 Nov 2012 17:19:20 +0000 (18:19 +0100)]
bechordal: Remove the attribute cls from struct post_spill_env_t.

11 years agobechordal: Remove the attribute pre_spill_cost from struct post_spill_env_t.
Christoph Mallon [Sun, 25 Nov 2012 17:16:00 +0000 (18:16 +0100)]
bechordal: Remove the attribute pre_spill_cost from struct post_spill_env_t.

11 years agobechordal: Remove the attribute irg from struct post_spill_env_t.
Christoph Mallon [Sun, 25 Nov 2012 17:09:24 +0000 (18:09 +0100)]
bechordal: Remove the attribute irg from struct post_spill_env_t.

11 years agobechordal: Remove the parameter iteration, which is always 0, from post_spill().
Christoph Mallon [Sun, 25 Nov 2012 17:06:49 +0000 (18:06 +0100)]
bechordal: Remove the parameter iteration, which is always 0, from post_spill().

11 years agosparc: Remove wrong register assignment code from transformer.
Christoph Mallon [Sun, 25 Nov 2012 16:44:53 +0000 (17:44 +0100)]
sparc: Remove wrong register assignment code from transformer.

11 years agobeinsn: Do not store the register requirements in struct be_operand_t.
Christoph Mallon [Sun, 25 Nov 2012 14:44:07 +0000 (15:44 +0100)]
beinsn: Do not store the register requirements in struct be_operand_t.

11 years agobeinsn: Avoid copying bitsets by using a raw bitset for the admissible registers.
Christoph Mallon [Sun, 25 Nov 2012 16:14:41 +0000 (17:14 +0100)]
beinsn: Avoid copying bitsets by using a raw bitset for the admissible registers.

11 years agorbitset: Let rbitset_alloca() return the new raw bitset.
Christoph Mallon [Sun, 25 Nov 2012 16:05:24 +0000 (17:05 +0100)]
rbitset: Let rbitset_alloca() return the new raw bitset.

11 years agobeinsn: Remove attribute irn from struct be_operand_t.
Christoph Mallon [Sun, 25 Nov 2012 14:13:20 +0000 (15:13 +0100)]
beinsn: Remove attribute irn from struct be_operand_t.

It is always the same as the irn of the corresponding insn.

11 years agobeinsn: Do not store, whether an insn has constraints.
Christoph Mallon [Sun, 25 Nov 2012 14:02:47 +0000 (15:02 +0100)]
beinsn: Do not store, whether an insn has constraints.

Simply return no insn, if it has no constraints.

11 years agobechordal: Remove remnants of the long gone split phase.
Christoph Mallon [Sun, 25 Nov 2012 13:48:52 +0000 (14:48 +0100)]
bechordal: Remove remnants of the long gone split phase.

11 years agobechordal: Remove struct be_chordal_alloc_env_t.
Christoph Mallon [Sun, 25 Nov 2012 13:35:57 +0000 (14:35 +0100)]
bechordal: Remove struct be_chordal_alloc_env_t.

11 years agobechordal: Simplify get_next_free_reg() by priming the set of available registers...
Christoph Mallon [Sun, 25 Nov 2012 13:31:38 +0000 (14:31 +0100)]
bechordal: Simplify get_next_free_reg() by priming the set of available registers only with the allocatable registers.