libfirm
11 years agoirverify: remove load/store from entity verification
Matthias Braun [Mon, 1 Oct 2012 14:25:39 +0000 (16:25 +0200)]
irverify: remove load/store from entity verification

It was only a valid check in strongly typed unoptimized languages, not
much value in a firm-graph.

11 years agolocalopt stuff for const-code irg
Matthias Braun [Sun, 14 Oct 2012 20:07:02 +0000 (22:07 +0200)]
localopt stuff for const-code irg

11 years agorework timer API
Matthias Braun [Sun, 14 Oct 2012 20:06:03 +0000 (22:06 +0200)]
rework timer API

11 years agomove get_irn_edge_kind to internal API
Matthias Braun [Sun, 14 Oct 2012 14:55:12 +0000 (16:55 +0200)]
move get_irn_edge_kind to internal API

11 years agoreorgranize method properties
Matthias Braun [Tue, 25 Sep 2012 13:17:03 +0000 (15:17 +0200)]
reorgranize method properties

- do not record properties on irgs anymore, always do it on the irgs
  entity; entity properties have to be a superset of the entities method
  type properties.
- Remove special irg_inline_property and use mtp_additional_properties
  instead

11 years agoalways dump additional method props
Matthias Braun [Tue, 25 Sep 2012 10:57:26 +0000 (12:57 +0200)]
always dump additional method props

11 years agoopt_funccall: cleanup, use C99
Matthias Braun [Tue, 25 Sep 2012 10:09:41 +0000 (12:09 +0200)]
opt_funccall: cleanup, use C99

Also removes some debugging output to simplify the code

11 years agoopt_funccall: remove outdated/unused OO optimisations
Matthias Braun [Tue, 25 Sep 2012 08:56:10 +0000 (10:56 +0200)]
opt_funccall: remove outdated/unused OO optimisations

11 years agoia32: cleanup handling of 8/16bit operations
Matthias Braun [Tue, 25 Sep 2012 08:54:44 +0000 (10:54 +0200)]
ia32: cleanup handling of 8/16bit operations

This also fixes backend/sign_bit.c

11 years agofix a bunch of warnings reported by clang analyzer
Matthias Braun [Fri, 21 Sep 2012 11:54:25 +0000 (13:54 +0200)]
fix a bunch of warnings reported by clang analyzer

11 years agoadd some missing cases for copy_const_value
Matthias Braun [Sun, 14 Oct 2012 20:22:22 +0000 (22:22 +0200)]
add some missing cases for copy_const_value

11 years agofix comdat emitting on macho
Matthias Braun [Fri, 21 Sep 2012 11:38:25 +0000 (13:38 +0200)]
fix comdat emitting on macho

11 years agoRemove unused map_Abs().
Christoph Mallon [Wed, 24 Oct 2012 05:23:06 +0000 (07:23 +0200)]
Remove unused map_Abs().

11 years agoRemove duplicate macro.
Christoph Mallon [Wed, 24 Oct 2012 05:15:27 +0000 (07:15 +0200)]
Remove duplicate macro.

11 years agoDon't set copy_attr_func to NULL for nodes without attributes.
Julian Oppermann [Tue, 23 Oct 2012 13:27:17 +0000 (15:27 +0200)]
Don't set copy_attr_func to NULL for nodes without attributes.

11 years agoProperly specify alternate AM in the ia32_IJmp emit clause.
Christoph Mallon [Mon, 22 Oct 2012 19:14:42 +0000 (21:14 +0200)]
Properly specify alternate AM in the ia32_IJmp emit clause.

When hard-coding the *, invalid assembler gets emitted if an immediate ends up as ia32_IJmp operand.

11 years agoPerform switch lowering before double-word lowering.
Sebastian Buchwald [Fri, 19 Oct 2012 12:30:13 +0000 (14:30 +0200)]
Perform switch lowering before double-word lowering.

This fixes gcc/pr37285.c.

11 years agoUpdate documentation.
Christoph Mallon [Thu, 18 Oct 2012 07:10:47 +0000 (09:10 +0200)]
Update documentation.

11 years agoFix doc typo.
Andreas Seltenreich [Mon, 15 Oct 2012 09:43:58 +0000 (11:43 +0200)]
Fix doc typo.

11 years agoExtended public backend API.
Manuel Mohr [Fri, 14 Sep 2012 15:05:34 +0000 (17:05 +0200)]
Extended public backend API.

Added some additional functions that allow direct access to some fields
of the backend params struct.  These functions avoid struct type,
thereby making interfacing with the jFirm library easier.

11 years agoFixed some typos.
Manuel Mohr [Fri, 14 Sep 2012 11:25:09 +0000 (13:25 +0200)]
Fixed some typos.

11 years agoFixed lowering of calls with compound returns.
Manuel Mohr [Fri, 14 Sep 2012 11:15:26 +0000 (13:15 +0200)]
Fixed lowering of calls with compound returns.

Reusing the same dummy struct as a hidden parameter for multiple
calls is not always correct (see opt/structcall2.c for an example).
For now, just use multiple dummy structs.

11 years agochanged the dump format to match the cplex lp format
Sebastian Hack [Thu, 13 Sep 2012 11:56:41 +0000 (13:56 +0200)]
changed the dump format to match the cplex lp format

11 years agosparc: use 128bit long double even for softfloat
Matthias Braun [Thu, 13 Sep 2012 10:02:52 +0000 (12:02 +0200)]
sparc: use 128bit long double even for softfloat

We can't handle 128bit long double in softfloat yet, but most libraries
are compiled like this. It's better to have the compiler fail than to
produce code with a mismatching ABI in the default setting.

11 years agobeverify: simplify by using C99
Matthias Braun [Mon, 3 Sep 2012 08:12:22 +0000 (10:12 +0200)]
beverify: simplify by using C99

Conflicts:
ir/be/beverify.c

11 years agoFixed typo.
Sebastian Buchwald [Wed, 12 Sep 2012 11:52:09 +0000 (13:52 +0200)]
Fixed typo.

11 years agoRevert "Prevent SSA construction from running into endless loops."
Sebastian Buchwald [Tue, 11 Sep 2012 17:00:40 +0000 (19:00 +0200)]
Revert "Prevent SSA construction from running into endless loops."

This reverts commit 2a018b8111bd0596816c1d00c38a0024857753f7.

Unreachable loops always have a loop entry edge and thus a Phi node.

11 years agoDump immature blocks in ird_color_error (red) again.
Christoph Mallon [Tue, 11 Sep 2012 08:48:19 +0000 (10:48 +0200)]
Dump immature blocks in ird_color_error (red) again.

Both mature and immature blocks were dumped in ird_color_block_background.

11 years agoRemove redundant get_Block_matured() check before calling mature_immBlock().
Christoph Mallon [Tue, 11 Sep 2012 08:45:42 +0000 (10:45 +0200)]
Remove redundant get_Block_matured() check before calling mature_immBlock().

11 years agoRemove the unused facility to register space /in front of/ a node.
Christoph Mallon [Mon, 10 Sep 2012 18:05:11 +0000 (20:05 +0200)]
Remove the unused facility to register space /in front of/ a node.

11 years agofurther corrections for the keepalive hack
Matthias Braun [Fri, 31 Aug 2012 12:50:02 +0000 (14:50 +0200)]
further corrections for the keepalive hack

11 years agosparc: be more conservative when moving memops around
Matthias Braun [Fri, 31 Aug 2012 11:33:07 +0000 (13:33 +0200)]
sparc: be more conservative when moving memops around

11 years agoSimplify rounding next_block_nr.
Christoph Mallon [Fri, 31 Aug 2012 10:41:07 +0000 (12:41 +0200)]
Simplify rounding next_block_nr.

11 years agoSkip the check whether ifconv is allowed, if both phi operands are identical.
Christoph Mallon [Fri, 31 Aug 2012 08:28:56 +0000 (10:28 +0200)]
Skip the check whether ifconv is allowed, if both phi operands are identical.

In particular this allows ifconv when a PhiM is present, but nothing happens with the memory on the two paths.

11 years agoworkaround for placement of nodes held only by keepalive edge
Matthias Braun [Thu, 30 Aug 2012 11:46:45 +0000 (13:46 +0200)]
workaround for placement of nodes held only by keepalive edge

This is a workaround for keepalive edges which are probably broken
(adding the stuff to the End node is wrong, it should get added to the
 endless loop somehow)

11 years agoset load/store to floating if ptr is never NULL
Matthias Braun [Wed, 29 Aug 2012 16:41:58 +0000 (18:41 +0200)]
set load/store to floating if ptr is never NULL

11 years agoimprove value_not_zero
Matthias Braun [Wed, 29 Aug 2012 16:41:21 +0000 (18:41 +0200)]
improve value_not_zero

SymConst_addr_ent are never zero for example, also there's no need to
give up after seeing a confirm

11 years agomake block numbers accross functions more deterministic
Matthias Braun [Thu, 30 Aug 2012 11:46:38 +0000 (13:46 +0200)]
make block numbers accross functions more deterministic

I aligning them to a multiple of 100 now, so that when code generated in
an earlier functions only changes lightly it is very likely that the
block numbers in later functions stay the same.

11 years agofix crash
Matthias Braun [Wed, 29 Aug 2012 14:18:33 +0000 (16:18 +0200)]
fix crash

11 years agocode_placement: use iredges, respect dep. edges
Matthias Braun [Wed, 29 Aug 2012 13:56:52 +0000 (15:56 +0200)]
code_placement: use iredges, respect dep. edges

11 years agoldstopt: don't count keepalives as users
Matthias Braun [Wed, 29 Aug 2012 11:46:56 +0000 (13:46 +0200)]
ldstopt: don't count keepalives as users

11 years agocleanup irouts
Matthias Braun [Tue, 28 Aug 2012 19:02:12 +0000 (21:02 +0200)]
cleanup irouts

11 years agoimprove tarval printer
Matthias Braun [Tue, 28 Aug 2012 18:12:33 +0000 (20:12 +0200)]
improve tarval printer

11 years agoremove now unused get_irn_outs_computed()
Matthias Braun [Tue, 28 Aug 2012 12:44:52 +0000 (14:44 +0200)]
remove now unused get_irn_outs_computed()

11 years agoremove unused NEW_REASSOC code
Matthias Braun [Tue, 28 Aug 2012 12:43:56 +0000 (14:43 +0200)]
remove unused NEW_REASSOC code

11 years agoremove pointless compute_irp_outs()/free_irp_outs()
Matthias Braun [Tue, 28 Aug 2012 12:36:08 +0000 (14:36 +0200)]
remove pointless compute_irp_outs()/free_irp_outs()

11 years agoremove unused+fragile NULL_OBST
Matthias Braun [Tue, 28 Aug 2012 12:29:34 +0000 (14:29 +0200)]
remove unused+fragile NULL_OBST

11 years agomove load mode shrinking into ldst phase
Matthias Braun [Mon, 27 Aug 2012 12:50:17 +0000 (14:50 +0200)]
move load mode shrinking into ldst phase

Performing it as localopt was hairy as the optimisation dependet on
correct iredges values which were misleading/wrong during construction
of new stuff.

11 years agoia32_transform: remove unused SETCC_TR_SBB
Matthias Braun [Sun, 26 Aug 2012 08:46:10 +0000 (10:46 +0200)]
ia32_transform: remove unused SETCC_TR_SBB

11 years agoshow optimisation warnings in ia32 conv/conv opts
Matthias Braun [Fri, 24 Aug 2012 17:03:54 +0000 (19:03 +0200)]
show optimisation warnings in ia32 conv/conv opts

The middleend should optimize all these cases, it does so for 99% of
them already. There are just some cases where ands get transformed into
conversions which the middleend doesn't catch yet.

11 years agoshrink load mode if not all bits are used
Matthias Braun [Fri, 24 Aug 2012 16:51:21 +0000 (18:51 +0200)]
shrink load mode if not all bits are used

11 years agofactorize upper_bits_clean and use in sparc+ia32
Matthias Braun [Fri, 24 Aug 2012 16:49:53 +0000 (18:49 +0200)]
factorize upper_bits_clean and use in sparc+ia32

This needed some rewriting as ia32 previously checked already
transformed nodes while sparc was checking nodes before transformation.
Change ia32 to check nodes before transformation too. Also improved some
code in sparc+ia32.

11 years agoirop: add more generic function callbacks
Matthias Braun [Mon, 27 Aug 2012 11:41:15 +0000 (13:41 +0200)]
irop: add more generic function callbacks

11 years agotarval: shift variants with unsigned right operand
Matthias Braun [Fri, 24 Aug 2012 15:44:09 +0000 (17:44 +0200)]
tarval: shift variants with unsigned right operand

11 years agoia32: skip downconvs in front of Store
Matthias Braun [Thu, 23 Aug 2012 12:04:55 +0000 (14:04 +0200)]
ia32: skip downconvs in front of Store

11 years agoadd more Conv(Conv) localopt rules
Matthias Braun [Wed, 22 Aug 2012 14:41:09 +0000 (16:41 +0200)]
add more Conv(Conv) localopt rules

11 years agofix some problems in ia32_intrinsice/map_Conv
Matthias Braun [Thu, 23 Aug 2012 11:34:18 +0000 (13:34 +0200)]
fix some problems in ia32_intrinsice/map_Conv

11 years agouse confirm_irg_properties in lower_intrinsics
Matthias Braun [Thu, 23 Aug 2012 09:02:26 +0000 (11:02 +0200)]
use confirm_irg_properties in lower_intrinsics

11 years agoexecfreq calculation fails in case of unreachable code
Matthias Braun [Thu, 23 Aug 2012 09:02:12 +0000 (11:02 +0200)]
execfreq calculation fails in case of unreachable code

11 years agoput execfreq in block-attrs instead of hashmap
Matthias Braun [Thu, 23 Aug 2012 09:00:58 +0000 (11:00 +0200)]
put execfreq in block-attrs instead of hashmap

The hashmap used to point to blocks which have already been deleted.

11 years agoremove unnecessary irma_unitialized
Matthias Braun [Wed, 22 Aug 2012 13:19:40 +0000 (15:19 +0200)]
remove unnecessary irma_unitialized

11 years agoImprove documentation about float mantissa size
Matthias Braun [Wed, 22 Aug 2012 12:21:42 +0000 (14:21 +0200)]
Improve documentation about float mantissa size

11 years agoremove the concept of a strictconv
Matthias Braun [Tue, 21 Aug 2012 13:49:02 +0000 (15:49 +0200)]
remove the concept of a strictconv

This means floatingpoint calculation in a firm graph must be performed
in the mode specified (and may not be performed in a wider mode as
before).

11 years agoremove unused dead_node_elim_subst hook
Matthias Braun [Fri, 17 Aug 2012 11:25:37 +0000 (13:25 +0200)]
remove unused dead_node_elim_subst hook

11 years agoavoid usage of modifies_fp flags in sparc backend
Matthias Braun [Thu, 16 Aug 2012 17:49:48 +0000 (19:49 +0200)]
avoid usage of modifies_fp flags in sparc backend

11 years agouse be_foreach_definition in liveness_transfer
Matthias Braun [Thu, 16 Aug 2012 14:30:56 +0000 (16:30 +0200)]
use be_foreach_definition in liveness_transfer

11 years agofix be_foreach_definition cls argument
Matthias Braun [Thu, 16 Aug 2012 14:21:15 +0000 (16:21 +0200)]
fix be_foreach_definition cls argument

11 years agosimplify by using C99
Matthias Braun [Thu, 16 Aug 2012 12:25:01 +0000 (14:25 +0200)]
simplify by using C99

11 years agorefactor specfiles/scripts
Matthias Braun [Thu, 16 Aug 2012 11:43:55 +0000 (13:43 +0200)]
refactor specfiles/scripts

11 years agofix dwarf abbrev registration
Matthias Braun [Wed, 15 Aug 2012 17:27:14 +0000 (19:27 +0200)]
fix dwarf abbrev registration

apparently abbrev number 0 is not allowed, so we have to start our
abbrev numbers at 1

11 years agoDon't use consecutive numbers for basic blocks from different functions.
Manuel Mohr [Mon, 13 Aug 2012 12:44:00 +0000 (14:44 +0200)]
Don't use consecutive numbers for basic blocks from different functions.

Consecutive numbers can make it difficult to combine assembly output from
different compiler runs, which is done by the check/checkfile scripts to find
bugs in the SPEC suite.  If the number of basic blocks of a function changed
between compiler runs, the assembler will likely complain about duplicate labels.
Leaving a bit more space, e.g. 100, is a pragmatic fix.

11 years agosparc: Use be_peephole_exchange instead of exchange to update liveness information.
Manuel Mohr [Mon, 13 Aug 2012 12:42:04 +0000 (14:42 +0200)]
sparc: Use be_peephole_exchange instead of exchange to update liveness information.

11 years agofix bug introduced in 'cleanup' commit
Matthias Braun [Thu, 9 Aug 2012 16:40:40 +0000 (18:40 +0200)]
fix bug introduced in 'cleanup' commit

11 years agosparc: fix wrong delay slot test
Matthias Braun [Thu, 9 Aug 2012 16:34:30 +0000 (18:34 +0200)]
sparc: fix wrong delay slot test

11 years agosparc: fix delayslot picking order
Matthias Braun [Thu, 9 Aug 2012 14:53:37 +0000 (16:53 +0200)]
sparc: fix delayslot picking order

11 years agobeprefalloc: fix assignment of big values
Matthias Braun [Thu, 9 Aug 2012 10:06:34 +0000 (12:06 +0200)]
beprefalloc: fix assignment of big values

11 years agosparc: support float perms
Matthias Braun [Thu, 9 Aug 2012 10:04:59 +0000 (12:04 +0200)]
sparc: support float perms

11 years agosparc: split128 bit float loads into 2x64bit load
Matthias Braun [Thu, 9 Aug 2012 10:03:59 +0000 (12:03 +0200)]
sparc: split128 bit float loads into 2x64bit load

11 years agobeprefalloc: simplify by using C99
Matthias Braun [Mon, 6 Aug 2012 09:25:56 +0000 (11:25 +0200)]
beprefalloc: simplify by using C99

11 years agomore irouts cleanup
Matthias Braun [Mon, 6 Aug 2012 08:08:35 +0000 (10:08 +0200)]
more irouts cleanup

11 years agoirouts: cleanup use C99
Matthias Braun [Thu, 2 Aug 2012 20:45:47 +0000 (22:45 +0200)]
irouts: cleanup use C99

11 years agouse is_$KIND(n) instead of get_irn_op(n) == op_$KIND.
Christoph Mallon [Sun, 5 Aug 2012 09:37:12 +0000 (11:37 +0200)]
use is_$KIND(n) instead of get_irn_op(n) == op_$KIND.

11 years agoRemove duplicate calls to register_node_cmp_func().
Christoph Mallon [Sun, 5 Aug 2012 09:37:58 +0000 (11:37 +0200)]
Remove duplicate calls to register_node_cmp_func().

11 years agos/get_irn_n(irn, -1)/get_nodes_block(irn)/.
Christoph Mallon [Sun, 5 Aug 2012 08:56:35 +0000 (10:56 +0200)]
s/get_irn_n(irn, -1)/get_nodes_block(irn)/.

11 years agoRemove redundant retrieval of blocks.
Christoph Mallon [Sun, 5 Aug 2012 08:56:10 +0000 (10:56 +0200)]
Remove redundant retrieval of blocks.

11 years agoUse get_Block_cfgpred_pos().
Christoph Mallon [Sat, 4 Aug 2012 12:21:16 +0000 (14:21 +0200)]
Use get_Block_cfgpred_pos().

11 years agoReturn the profile init irg from ir_profile_instrument() instead of guessing that...
Christoph Mallon [Sat, 4 Aug 2012 08:36:00 +0000 (10:36 +0200)]
Return the profile init irg from ir_profile_instrument() instead of guessing that it is the last irg.

11 years agoSimplify control flow.
Christoph Mallon [Sat, 4 Aug 2012 07:27:53 +0000 (09:27 +0200)]
Simplify control flow.

11 years agoReplace the reassoc env struct by its only member.
Christoph Mallon [Fri, 3 Aug 2012 17:05:18 +0000 (19:05 +0200)]
Replace the reassoc env struct by its only member.

11 years agoRemove irg from the reassoc env.
Christoph Mallon [Fri, 3 Aug 2012 17:05:06 +0000 (19:05 +0200)]
Remove irg from the reassoc env.

11 years agoRemove the write-only variable changes from reassoc.
Christoph Mallon [Fri, 3 Aug 2012 16:59:24 +0000 (18:59 +0200)]
Remove the write-only variable changes from reassoc.

11 years agosparc: rework emitter/delayslot handling
Matthias Braun [Wed, 1 Aug 2012 16:22:29 +0000 (18:22 +0200)]
sparc: rework emitter/delayslot handling

We can now pull instructions from other blocks up and use the annul bits
if profitable.

11 years agofix bugs in execfreq rework commit
Matthias Braun [Wed, 1 Aug 2012 16:20:18 +0000 (18:20 +0200)]
fix bugs in execfreq rework commit

11 years agobe: Proj_Cmp transformers are unnecessary
Matthias Braun [Wed, 1 Aug 2012 11:28:32 +0000 (13:28 +0200)]
be: Proj_Cmp transformers are unnecessary

11 years agouse C99 to cleanup code
Matthias Braun [Tue, 31 Jul 2012 12:24:13 +0000 (14:24 +0200)]
use C99 to cleanup code

11 years agoAssert that there is currently no object under construction, when calling be_get_be_o...
Christoph Mallon [Thu, 2 Aug 2012 06:31:02 +0000 (08:31 +0200)]
Assert that there is currently no object under construction, when calling be_get_be_obst().

11 years agoFactorise code to set the register contraints and registers of the SPARC start node.
Christoph Mallon [Wed, 1 Aug 2012 08:19:42 +0000 (10:19 +0200)]
Factorise code to set the register contraints and registers of the SPARC start node.

11 years agoFactorise code to get the register projs of the SPARC start node.
Christoph Mallon [Wed, 1 Aug 2012 08:14:51 +0000 (10:14 +0200)]
Factorise code to get the register projs of the SPARC start node.

11 years agoPut SPARC initial register info into a struct.
Christoph Mallon [Thu, 2 Aug 2012 07:05:13 +0000 (09:05 +0200)]
Put SPARC initial register info into a struct.

11 years agoSimplify emit_sparc_Div(): Pass the instruction mnemonic instead of a bool flag.
Christoph Mallon [Wed, 1 Aug 2012 08:08:03 +0000 (10:08 +0200)]
Simplify emit_sparc_Div(): Pass the instruction mnemonic instead of a bool flag.