libfirm
12 years agoAdd -c to ar to remove a diagnostic, when the archive is created.
Christoph Mallon [Fri, 2 Dec 2011 11:03:47 +0000 (12:03 +0100)]
Add -c to ar to remove a diagnostic, when the archive is created.

12 years agoRemove duplicate flags for ar.
Christoph Mallon [Fri, 2 Dec 2011 11:03:55 +0000 (12:03 +0100)]
Remove duplicate flags for ar.

12 years agoRemove redundant ranlib after ar.
Christoph Mallon [Fri, 2 Dec 2011 10:21:20 +0000 (11:21 +0100)]
Remove redundant ranlib after ar.

12 years agobecopyilp: fix size_reduction code
Matthias Braun [Thu, 1 Dec 2011 19:14:25 +0000 (20:14 +0100)]
becopyilp: fix size_reduction code

Fix the size reduction stuff which happily assigned non-allocatable
registers. It worked by chance on x86 as all non-allocatable registers
come last.

12 years agocopyopt: miscellaneous code cleanups
Matthias Braun [Thu, 1 Dec 2011 18:50:46 +0000 (19:50 +0100)]
copyopt: miscellaneous code cleanups

12 years agolpp_gurobi:disable log to console unless requested
Matthias Braun [Thu, 1 Dec 2011 18:04:36 +0000 (19:04 +0100)]
lpp_gurobi:disable log to console unless requested

12 years agolpp_gurobi: fix timelimit, do not abort on missing ObjBound
Matthias Braun [Thu, 1 Dec 2011 17:00:54 +0000 (18:00 +0100)]
lpp_gurobi: fix timelimit, do not abort on missing ObjBound

12 years agobecopyilp2: Remove unused timelimit
Matthias Braun [Thu, 1 Dec 2011 16:31:23 +0000 (17:31 +0100)]
becopyilp2: Remove unused timelimit

(There is a timelimit option in becopyilp anyway)

12 years agosparc: optimize float constants function paramters
Matthias Braun [Tue, 29 Nov 2011 17:29:36 +0000 (18:29 +0100)]
sparc: optimize float constants function paramters

(They are passed in integer registers, so we can immediately create
integer constants)

12 years agofix typo
Matthias Braun [Mon, 28 Nov 2011 17:53:39 +0000 (18:53 +0100)]
fix typo

12 years agooutput documentation to file on request
Matthias Braun [Thu, 24 Nov 2011 18:55:42 +0000 (19:55 +0100)]
output documentation to file on request

12 years agoUpdate list of files generated for irio.
Christoph Mallon [Thu, 24 Nov 2011 17:16:45 +0000 (18:16 +0100)]
Update list of files generated for irio.

12 years agofix is_init_string
Matthias Braun [Fri, 18 Nov 2011 16:34:08 +0000 (17:34 +0100)]
fix is_init_string

12 years agofix ir_finish, freeing of irps/irgs
Matthias Braun [Fri, 18 Nov 2011 13:46:47 +0000 (14:46 +0100)]
fix ir_finish, freeing of irps/irgs

12 years agoremove opt_ldst_only_null_ptr_exception
Matthias Braun [Fri, 18 Nov 2011 13:24:12 +0000 (14:24 +0100)]
remove opt_ldst_only_null_ptr_exception

We just define that the only reason a Load/Store node can use the
exception edge is a NULL pointer. Misaligned Load/Store is a problem for
low-level languages which don't use exception edges anyway.

12 years agoremove sel_based_null_check flag
Matthias Braun [Fri, 18 Nov 2011 13:22:09 +0000 (14:22 +0100)]
remove sel_based_null_check flag

We simply always assume that Sel can only return a null pointer if
its input is a null pointer.

12 years agoremove opt_polymorphy
Matthias Braun [Fri, 18 Nov 2011 13:18:55 +0000 (14:18 +0100)]
remove opt_polymorphy

this is part of the initiative to move object-orientation support stuff
out of libfirm into liboo

12 years agoAvoid using uninitialized edge_info->list_heads.
Andreas Seltenreich [Fri, 18 Nov 2011 10:56:17 +0000 (11:56 +0100)]
Avoid using uninitialized edge_info->list_heads.

build_edges_walker calls get_block_n on block preds, possibly consing
and hashing a node which init_lh_walker couldn't reach via
irg_walk_anchors.

This fixes a crash I see when compiling Postgres.

12 years agoremove symconst_type_tag
Matthias Braun [Thu, 17 Nov 2011 17:06:53 +0000 (18:06 +0100)]
remove symconst_type_tag

12 years agoirio: complete rewrite
Matthias Braun [Wed, 16 Nov 2011 18:53:52 +0000 (19:53 +0100)]
irio: complete rewrite

This should fix all known bugs, make the code easier to read and more
robust.

12 years agoinline: we can't inline blocks with entities
Matthias Braun [Thu, 17 Nov 2011 16:31:26 +0000 (17:31 +0100)]
inline: we can't inline blocks with entities

12 years agofix float modes always getting irma_ieee754
Matthias Braun [Thu, 17 Nov 2011 13:17:51 +0000 (14:17 +0100)]
fix float modes always getting irma_ieee754

12 years agouse size_t for ASM n_clobbers, n_outputs
Matthias Braun [Thu, 17 Nov 2011 12:58:54 +0000 (13:58 +0100)]
use size_t for ASM n_clobbers, n_outputs

12 years agoupdate documentation
Matthias Braun [Thu, 17 Nov 2011 12:59:41 +0000 (13:59 +0100)]
update documentation

12 years agowe want to visit NoMem in the const code irg
Matthias Braun [Thu, 17 Nov 2011 12:59:21 +0000 (13:59 +0100)]
we want to visit NoMem in the const code irg

12 years agodifferntiate entity kinds
Matthias Braun [Wed, 16 Nov 2011 23:08:12 +0000 (00:08 +0100)]
differntiate entity kinds

We already saved different entity attributes depending on the entity
type and an is_parameter flag. This unifies handling of different entity
types and introduces normal, method, parameter, label and
compound_member entities.

12 years agohandle Block_entity like other node attributes
Matthias Braun [Wed, 16 Nov 2011 23:05:18 +0000 (00:05 +0100)]
handle Block_entity like other node attributes

12 years agotype list fixes
Matthias Braun [Wed, 16 Nov 2011 19:50:09 +0000 (20:50 +0100)]
type list fixes

Make sure all types are in the global type list, remove type_walk_prog
which was a strange alternative to type_walk attempting to not miss
types not in the global list.

12 years agoadd missing entries in set_default_get_type_attr
Matthias Braun [Wed, 16 Nov 2011 19:27:27 +0000 (20:27 +0100)]
add missing entries in set_default_get_type_attr

12 years agoirop: refactor default_operation setting
Matthias Braun [Wed, 16 Nov 2011 19:21:50 +0000 (20:21 +0100)]
irop: refactor default_operation setting

12 years agodo more assert checking in set_irn_in
Matthias Braun [Wed, 16 Nov 2011 18:53:31 +0000 (19:53 +0100)]
do more assert checking in set_irn_in

12 years agoirverify: check that switch_table != NULL
Matthias Braun [Wed, 16 Nov 2011 18:53:10 +0000 (19:53 +0100)]
irverify: check that switch_table != NULL

12 years agointroduce anchor_first and anchor_last in irg_anchors enum
Matthias Braun [Wed, 16 Nov 2011 18:52:47 +0000 (19:52 +0100)]
introduce anchor_first and anchor_last in irg_anchors enum

12 years agoia32: do not change tarval output modes in init
Matthias Braun [Wed, 16 Nov 2011 18:46:32 +0000 (19:46 +0100)]
ia32: do not change tarval output modes in init

12 years agoremove unused tail_call attribute from Call
Matthias Braun [Mon, 14 Nov 2011 17:59:34 +0000 (18:59 +0100)]
remove unused tail_call attribute from Call

12 years agoiropt: use Confirm info for Cmp-relations
Matthias Braun [Fri, 11 Nov 2011 17:08:29 +0000 (18:08 +0100)]
iropt: use Confirm info for Cmp-relations

12 years agoconfirm: fix stupid bug, use opt_manage framework
Matthias Braun [Fri, 11 Nov 2011 17:03:24 +0000 (18:03 +0100)]
confirm: fix stupid bug, use opt_manage framework

12 years agoia32: set ls_mode on more nodes
Matthias Braun [Fri, 11 Nov 2011 15:00:55 +0000 (16:00 +0100)]
ia32: set ls_mode on more nodes

12 years agoremove irbitset.h
Matthias Braun [Fri, 11 Nov 2011 12:13:05 +0000 (13:13 +0100)]
remove irbitset.h

12 years agoclean goal should also remove generated code
Andreas Zwinkau [Fri, 11 Nov 2011 11:58:45 +0000 (12:58 +0100)]
clean goal should also remove generated code

12 years agogen_docu: fix missing attributes, show generation time at the end
Matthias Braun [Fri, 11 Nov 2011 11:49:20 +0000 (12:49 +0100)]
gen_docu: fix missing attributes, show generation time at the end

12 years agoa first attempt at a node-documentation tool
Matthias Braun [Thu, 10 Nov 2011 17:40:35 +0000 (18:40 +0100)]
a first attempt at a node-documentation tool

12 years agobe: rework isa_if interface and initialisation
Matthias Braun [Thu, 10 Nov 2011 15:06:58 +0000 (16:06 +0100)]
be: rework isa_if interface and initialisation

This should fix problems with uninitialized backends when
be_get_backend_param() wasn't called also calls be_lower_for_target if
the user hasn't done so yet.

12 years agoremove be_opt_register from public API (ir_init calls it anyway)
Matthias Braun [Thu, 10 Nov 2011 13:56:22 +0000 (14:56 +0100)]
remove be_opt_register from public API (ir_init calls it anyway)

12 years agobe: get rid of arch_irn_classify callback
Matthias Braun [Thu, 10 Nov 2011 12:57:33 +0000 (13:57 +0100)]
be: get rid of arch_irn_classify callback

12 years agoremove unused op_machine, op_machine_op stuff
Matthias Braun [Thu, 10 Nov 2011 12:45:21 +0000 (13:45 +0100)]
remove unused op_machine, op_machine_op stuff

12 years agobe: remove remnants of machine description
Matthias Braun [Thu, 10 Nov 2011 12:35:54 +0000 (13:35 +0100)]
be: remove remnants of machine description

12 years agobe: remove more unnecessary callbacks
Matthias Braun [Thu, 10 Nov 2011 12:07:28 +0000 (13:07 +0100)]
be: remove more unnecessary callbacks

get_backend_irg_list - none of our backends uses it and in the future
                       the backend should drive the compilation and not
                       give hints to a generic driver
reg_class_alignment  - unused

12 years agobe: remove unused reg_class_for_mode callback
Matthias Braun [Thu, 10 Nov 2011 11:50:16 +0000 (12:50 +0100)]
be: remove unused reg_class_for_mode callback

12 years agoremove $Id$, it doesn't work with git anyway
Matthias Braun [Thu, 10 Nov 2011 13:16:58 +0000 (14:16 +0100)]
remove $Id$, it doesn't work with git anyway

12 years agoPrevent computations with tarval_bad.
Sebastian Buchwald [Thu, 10 Nov 2011 09:50:36 +0000 (10:50 +0100)]
Prevent computations with tarval_bad.

This fixes opt/fehler206.c.

12 years agobepeephole: reachability check in can_move_before
Matthias Braun [Wed, 9 Nov 2011 18:22:09 +0000 (19:22 +0100)]
bepeephole: reachability check in can_move_before

before we only tested, if we produce an output that is used as as input
of any schedule node in between. This missed the case where you have
unscheduled utility nodes like Sync in between.

12 years agoheights: use fast access functions for _reachable
Matthias Braun [Wed, 9 Nov 2011 18:21:28 +0000 (19:21 +0100)]
heights: use fast access functions for _reachable

12 years agoirloop: remove get_loop_son, get_loop_node
Matthias Braun [Tue, 8 Nov 2011 12:39:01 +0000 (13:39 +0100)]
irloop: remove get_loop_son, get_loop_node

The interface was really inefficient and shouldn't be used like that.
So simply don't provide functions that make inefficient code convenient.

12 years agoiropt: Don't try to optimize Mux D.
Andreas Seltenreich [Wed, 9 Nov 2011 16:16:34 +0000 (17:16 +0100)]
iropt: Don't try to optimize Mux D.

12 years agoFix setoutfile/irgname debugger commands.
Andreas Seltenreich [Tue, 8 Nov 2011 22:31:15 +0000 (23:31 +0100)]
Fix setoutfile/irgname debugger commands.

12 years agoRemove warning
Andreas Zwinkau [Mon, 7 Nov 2011 13:53:11 +0000 (14:53 +0100)]
Remove warning

12 years agoAdd missing external function implementations
Andreas Zwinkau [Mon, 7 Nov 2011 13:49:34 +0000 (14:49 +0100)]
Add missing external function implementations

12 years agoiropt: return after making a new node
Matthias Braun [Mon, 7 Nov 2011 12:52:43 +0000 (13:52 +0100)]
iropt: return after making a new node

12 years agoiropt: make sure we reach the fixpoint
Matthias Braun [Mon, 7 Nov 2011 12:27:15 +0000 (13:27 +0100)]
iropt: make sure we reach the fixpoint

We missed the case where transform_node created a node that
computed_value or equivalent_node would catch

12 years agoonly add new X nodes as tuple preds if CopyB throws an exception
Matthias Braun [Mon, 7 Nov 2011 12:24:49 +0000 (13:24 +0100)]
only add new X nodes as tuple preds if CopyB throws an exception

12 years agofix arch_dep for mul(x,0)
Matthias Braun [Mon, 7 Nov 2011 11:38:05 +0000 (12:38 +0100)]
fix arch_dep for mul(x,0)

12 years agodisallow Conv Is(xx b)
Matthias Braun [Fri, 4 Nov 2011 23:10:55 +0000 (00:10 +0100)]
disallow Conv Is(xx b)

It was a strange feature only inspired by the lazyness of some frontend
developer (=me)

12 years agoSet optimisations moved to transform_node_Mux
Matthias Braun [Sat, 5 Nov 2011 11:13:00 +0000 (12:13 +0100)]
Set optimisations moved to transform_node_Mux

they were in lower_mode_b but just generically apply to all Mux(c, 0, 1)

12 years agoiropt: optimize Cmp(Mux(c, c0, c1), c2)
Matthias Braun [Fri, 4 Nov 2011 21:51:11 +0000 (22:51 +0100)]
iropt: optimize Cmp(Mux(c, c0, c1), c2)

12 years agotarval: allow or/eor/and/andnot on references
Matthias Braun [Fri, 4 Nov 2011 21:42:16 +0000 (22:42 +0100)]
tarval: allow or/eor/and/andnot on references

12 years agolocalopt: x + signbit => x ^ signbit
Matthias Braun [Thu, 3 Nov 2011 22:57:32 +0000 (23:57 +0100)]
localopt: x + signbit => x ^ signbit

12 years agoia32: split peephole opts into 2 passes
Matthias Braun [Fri, 4 Nov 2011 17:41:43 +0000 (18:41 +0100)]
ia32: split peephole opts into 2 passes

Some peephole optimisations enable others, so splitting into multiple
passes makes sense.

12 years agoia32: improve Test peephole optimisation
Matthias Braun [Fri, 4 Nov 2011 17:26:02 +0000 (18:26 +0100)]
ia32: improve Test peephole optimisation

A test can exactly be removed if we are only interested in the sign and
zero flag. Rewrote and refactored code.
Now we don't miss some cases anymore where only sign was requested.

12 years agoia32: sign flag is enough if no overflow
Matthias Braun [Fri, 4 Nov 2011 17:25:20 +0000 (18:25 +0100)]
ia32: sign flag is enough if no overflow

12 years agolocalopt: simple associativity optimisation
Matthias Braun [Fri, 4 Nov 2011 15:22:18 +0000 (16:22 +0100)]
localopt: simple associativity optimisation

Add op(op(x, c0), c1) => op(x, op(c0, c1)) as localopt rule. This is an
very usual and often encountered case so it makes sense to have this
working without explicitely invoking the associativity optimisation phase.

12 years agoiropt: cmp(~x & 1, 0) => !cmp(x & 1, 0)
Matthias Braun [Fri, 4 Nov 2011 14:38:34 +0000 (15:38 +0100)]
iropt: cmp(~x & 1, 0) => !cmp(x & 1, 0)

when bits are flipped for a bittest we can just as well negate the pnc
and don't flip the bits

12 years agoWrap optimize_graph_df in opt_manage framework
Andreas Zwinkau [Fri, 4 Nov 2011 12:58:09 +0000 (13:58 +0100)]
Wrap optimize_graph_df in opt_manage framework

12 years agocfopt can skip jump blocks now
Andreas Zwinkau [Fri, 4 Nov 2011 12:44:34 +0000 (13:44 +0100)]
cfopt can skip jump blocks now

The preconditions were too tight

12 years agoia32: improve AM-matching for x87-fpu nodes
Matthias Braun [Fri, 4 Nov 2011 12:47:19 +0000 (13:47 +0100)]
ia32: improve AM-matching for x87-fpu nodes

12 years agolower_switch: fix bug in normalisation
Matthias Braun [Thu, 3 Nov 2011 17:43:49 +0000 (18:43 +0100)]
lower_switch: fix bug in normalisation

12 years agoirverify: switch entry modes must match selector
Matthias Braun [Thu, 3 Nov 2011 17:19:10 +0000 (18:19 +0100)]
irverify: switch entry modes must match selector

12 years agosparc: Pass correct argument to lower_alloc.
Manuel Mohr [Thu, 3 Nov 2011 16:54:22 +0000 (17:54 +0100)]
sparc: Pass correct argument to lower_alloc.

12 years agoupdate jinja2 to avoid some annoying warnings
Matthias Braun [Thu, 3 Nov 2011 10:13:41 +0000 (11:13 +0100)]
update jinja2 to avoid some annoying warnings

12 years agoirmode: set some default values for (un)signed_eq of mode_P
Matthias Braun [Thu, 3 Nov 2011 10:13:15 +0000 (11:13 +0100)]
irmode: set some default values for (un)signed_eq of mode_P

12 years agointroduce Switch node
Matthias Braun [Wed, 2 Nov 2011 17:57:20 +0000 (18:57 +0100)]
introduce Switch node

This is the new way of handling switch-jumps. The node contains a table
which maps (ranges of) input values to proj numbers. Compared to a
Cond-node this results in a clean consecutive sequence of Proj numbers
(no searching for a free number for the default_pn anymore) and allows
factoring multiple cases jumping to the same block in a single Proj
(though we still need the optimisation in cfopt for that).

12 years agocritical_edges: set NO_CRITICAL_EDGES graph flag
Matthias Braun [Wed, 2 Nov 2011 15:28:22 +0000 (16:28 +0100)]
critical_edges: set NO_CRITICAL_EDGES graph flag

12 years agogenerate irdump proj-number lookup tables
Matthias Braun [Mon, 31 Oct 2011 13:25:37 +0000 (14:25 +0100)]
generate irdump proj-number lookup tables

12 years agoavoid _ prefix in identifiers, correct coding style
Matthias Braun [Mon, 31 Oct 2011 12:08:13 +0000 (13:08 +0100)]
avoid _ prefix in identifiers, correct coding style

They are reserved in ANSI-C so instead of _XXX we use XXX_ now.

12 years agotv: fix float->int conversion problems
Matthias Braun [Wed, 2 Nov 2011 18:47:47 +0000 (19:47 +0100)]
tv: fix float->int conversion problems

(they were introduced when moving value_classes out of the descriptor)

12 years agocleanup return.c a bit
Matthias Braun [Thu, 27 Oct 2011 12:22:07 +0000 (14:22 +0200)]
cleanup return.c a bit

12 years agoavoid special case of a node input being NULL
Matthias Braun [Wed, 26 Oct 2011 13:16:07 +0000 (15:16 +0200)]
avoid special case of a node input being NULL

12 years agofix missing PTR_TO_INT macros in release mode
Matthias Braun [Wed, 26 Oct 2011 12:18:11 +0000 (14:18 +0200)]
fix missing PTR_TO_INT macros in release mode

12 years agobe: let begnuas call be_dbg_method_begin/end
Matthias Braun [Wed, 26 Oct 2011 11:50:35 +0000 (13:50 +0200)]
be: let begnuas call be_dbg_method_begin/end

12 years agoInitial support for dwarf debug info
Matthias Braun [Fri, 21 Oct 2011 07:46:32 +0000 (09:46 +0200)]
Initial support for dwarf debug info

12 years agolet backends decide wether to use begnuas
Matthias Braun [Tue, 25 Oct 2011 15:40:17 +0000 (17:40 +0200)]
let backends decide wether to use begnuas

This also means that dependent modules like bedbgout should be
initialized by begnuas.

12 years agofinalize debug stuff before arch_env_done which frees be_emitter
Matthias Braun [Tue, 25 Oct 2011 15:10:17 +0000 (17:10 +0200)]
finalize debug stuff before arch_env_done which frees be_emitter

12 years agoir_mode: simplify interface, improve float-mode handling
Matthias Braun [Tue, 25 Oct 2011 12:47:25 +0000 (14:47 +0200)]
ir_mode: simplify interface, improve float-mode handling

The main change here is splitting new_ir_mode into new_int_mode,
new_reference_mode and new_float_mode. You can now specify
mantissa+exponent size in new_float_mode. This also changes:

- x86 80bit-FP mode is NOT a ieee754 don't put "ieee754" into functions
  names that can also handle x86 80bit fps
- Move ieee_descriptor_t from tarval module into ir_mode struct
  (and rename to float_descriptor_t)
- Introduce mode_Q which represents binary128 from ieee754
- You can ask float modes for mantissa/exponent sizes now
- Fix endianess when emitting big float values in begnuas
- A bunch of long double fixes in ia32: the mode there has 10bytes
  (80bit) but the variables typically are 12 or 16 byte big
- This fixes some problems of sparc binary128 handling

12 years agoia32: fix float_const_store for modes with 10bytes
Matthias Braun [Tue, 25 Oct 2011 10:45:55 +0000 (12:45 +0200)]
ia32: fix float_const_store for modes with 10bytes

12 years agoheights: fix usage of uninitialized memory
Matthias Braun [Mon, 24 Oct 2011 16:29:55 +0000 (18:29 +0200)]
heights: fix usage of uninitialized memory

12 years agoremove old+nonworking setting of ieee754 immediate precision
Matthias Braun [Mon, 24 Oct 2011 12:21:15 +0000 (14:21 +0200)]
remove old+nonworking setting of ieee754 immediate precision

12 years agoavoid usage of identifiers with _ prefix
Matthias Braun [Mon, 24 Oct 2011 12:17:24 +0000 (14:17 +0200)]
avoid usage of identifiers with _ prefix

12 years agoirmode: remove support for vector mode
Matthias Braun [Mon, 24 Oct 2011 09:12:27 +0000 (11:12 +0200)]
irmode: remove support for vector mode

There were no users and no tarval support anyway.

12 years agomove floatingpoint number state out of ieee_descriptor_t
Matthias Braun [Mon, 24 Oct 2011 09:00:27 +0000 (11:00 +0200)]
move floatingpoint number state out of ieee_descriptor_t

12 years agoremove old+broken ieee754 tests
Matthias Braun [Mon, 24 Oct 2011 08:42:01 +0000 (10:42 +0200)]
remove old+broken ieee754 tests