libfirm
12 years agomaintain method types variadicity,properties,calling convention when modifying them
Matthias Braun [Fri, 5 Aug 2011 09:06:45 +0000 (11:06 +0200)]
maintain method types variadicity,properties,calling convention when modifying them

12 years agorework taking of parameter addresses
Matthias Braun [Fri, 5 Aug 2011 08:58:44 +0000 (10:58 +0200)]
rework taking of parameter addresses

Use a special kind of entity on the frame type instead of a value_type
struct inside a method type. This makes replacement of function types
slightly easier (it's still a complex operation though) and handling in
the backend a bit more consistent since it's more or less a normal stack
access (with special offsets).

12 years agosimplify/rework lower_calls interface and code
Matthias Braun [Fri, 5 Aug 2011 08:22:30 +0000 (10:22 +0200)]
simplify/rework lower_calls interface and code

This was done by removing unnecessary options/options that only
allowed marginal tweakings to improve performance while at the same time
making the interface cumbersome.

12 years agoa few cleanups in scalar replacement code
Matthias Braun [Thu, 4 Aug 2011 17:17:52 +0000 (19:17 +0200)]
a few cleanups in scalar replacement code

12 years agoremove (broken+unused) support for right_to_left parameter passing
Matthias Braun [Thu, 4 Aug 2011 11:33:57 +0000 (13:33 +0200)]
remove (broken+unused) support for right_to_left parameter passing

12 years agocall hook_new_entity after copying entity so the firm debugger can catch it
Matthias Braun [Thu, 4 Aug 2011 08:49:53 +0000 (10:49 +0200)]
call hook_new_entity after copying entity so the firm debugger can catch it

12 years agosplit irg and irp resources, add IRP_RESOURCE_TYPE_LINK
Matthias Braun [Thu, 4 Aug 2011 07:57:52 +0000 (09:57 +0200)]
split irg and irp resources, add IRP_RESOURCE_TYPE_LINK

12 years agoia32_Minus64Bit needs no contraint copies.
Christoph Mallon [Fri, 29 Jul 2011 08:55:54 +0000 (10:55 +0200)]
ia32_Minus64Bit needs no contraint copies.

Its emitter handles this.

12 years agolowering: fix i_mapper for new exception attributes
Matthias Braun [Thu, 28 Jul 2011 11:03:05 +0000 (13:03 +0200)]
lowering: fix i_mapper for new exception attributes

12 years agofix sparc Call transform rule off-by-one error
Matthias Braun [Thu, 28 Jul 2011 10:41:21 +0000 (12:41 +0200)]
fix sparc Call transform rule off-by-one error

12 years agoWe need a mode_T node for Projs.
Sebastian Buchwald [Thu, 28 Jul 2011 09:15:31 +0000 (11:15 +0200)]
We need a mode_T node for Projs.

12 years agoRemove unnecessary explicit array length spcification.
Christoph Mallon [Wed, 27 Jul 2011 16:25:16 +0000 (18:25 +0200)]
Remove unnecessary explicit array length spcification.

12 years agoActually assert on mode M, as the comment says. We already know it's a Phi.
Christoph Mallon [Wed, 27 Jul 2011 16:24:37 +0000 (18:24 +0200)]
Actually assert on mode M, as the comment says.  We already know it's a Phi.

12 years agoCorrect the NOT+ADC transformation.
Christoph Mallon [Wed, 27 Jul 2011 16:08:48 +0000 (18:08 +0200)]
Correct the NOT+ADC transformation.

12 years agoRemove unused enum entries.
Christoph Mallon [Wed, 27 Jul 2011 16:04:50 +0000 (18:04 +0200)]
Remove unused enum entries.

12 years agoSimplify usage of LC_OPT_ENT_STR(): The length of the buffer is determined in the...
Christoph Mallon [Wed, 27 Jul 2011 16:04:14 +0000 (18:04 +0200)]
Simplify usage of LC_OPT_ENT_STR(): The length of the buffer is determined in the macro, not passed as parameter.

12 years agoGenerate a warning, when LC_OPT_ENT_* macros are used with the wrong type.
Christoph Mallon [Wed, 27 Jul 2011 15:02:00 +0000 (17:02 +0200)]
Generate a warning, when LC_OPT_ENT_* macros are used with the wrong type.

12 years agoTest lower_perm_opt like an enum, not a bitset.
Christoph Mallon [Wed, 27 Jul 2011 14:59:14 +0000 (16:59 +0200)]
Test lower_perm_opt like an enum, not a bitset.

12 years agoCorrect wrong usage of LC_OPT machinery.
Christoph Mallon [Wed, 27 Jul 2011 14:57:36 +0000 (16:57 +0200)]
Correct wrong usage of LC_OPT machinery.

12 years agoCorrect type inconsistency in LC_OPT machinery.
Christoph Mallon [Wed, 27 Jul 2011 14:56:25 +0000 (16:56 +0200)]
Correct type inconsistency in LC_OPT machinery.

12 years agofix statev messing up column-name/value relation in sqlite3
Matthias Braun [Wed, 27 Jul 2011 13:41:58 +0000 (15:41 +0200)]
fix statev messing up column-name/value relation in sqlite3

12 years agofix double free in regex stuff
Matthias Braun [Wed, 27 Jul 2011 13:39:27 +0000 (15:39 +0200)]
fix double free in regex stuff

12 years agoEliminate warning and use static assert.
Christoph Mallon [Wed, 27 Jul 2011 08:31:23 +0000 (10:31 +0200)]
Eliminate warning and use static assert.

12 years agoExtend the NOT+ADC-trick (sic) for SUB to SBB.
Christoph Mallon [Wed, 27 Jul 2011 07:39:45 +0000 (09:39 +0200)]
Extend the NOT+ADC-trick (sic) for SUB to SBB.

This should fix 403.gcc.
A SBB with AM could not fulfill its should_be_same contraint, so the AM gets split from the SBB.
The Load of the AM gets assigned the out register of the SBB, which violates the !in_r5 constraint of the SBB.
Therefore it's necessary to turn the SBB into NOT+ADC.

12 years agoCorrect inaccurate comment: The only corner case of wrong CF in NEG+ADD as replacemen...
Christoph Mallon [Wed, 27 Jul 2011 07:33:58 +0000 (09:33 +0200)]
Correct inaccurate comment: The only corner case of wrong CF in NEG+ADD as replacement for SUB is if both operands are zero.

12 years agoAdded local opt Phi(Pin,...,Pin) -> Pin(Phi(...)).
Sebastian Buchwald [Tue, 26 Jul 2011 12:05:24 +0000 (14:05 +0200)]
Added local opt Phi(Pin,...,Pin) -> Pin(Phi(...)).

This fixes opt/fehler194.c.

12 years agoSet ls_mode for created ia32_Test node.
Sebastian Buchwald [Tue, 19 Jul 2011 14:26:54 +0000 (16:26 +0200)]
Set ls_mode for created ia32_Test node.

12 years agoFixed opt/fehler193.c.
Sebastian Buchwald [Tue, 19 Jul 2011 12:34:02 +0000 (14:34 +0200)]
Fixed opt/fehler193.c.

12 years agoAdded commutative optimization variants.
Sebastian Buchwald [Tue, 19 Jul 2011 09:01:10 +0000 (11:01 +0200)]
Added commutative optimization variants.

12 years agoFixed opt/fehler192.c.
Sebastian Buchwald [Tue, 19 Jul 2011 08:48:51 +0000 (10:48 +0200)]
Fixed opt/fehler192.c.

12 years agoPrevent optimization in case of an Eor, too.
Sebastian Buchwald [Fri, 15 Jul 2011 12:04:30 +0000 (14:04 +0200)]
Prevent optimization in case of an Eor, too.

12 years agoQuick fix for opt/fehler191.c.
Sebastian Buchwald [Fri, 15 Jul 2011 09:26:28 +0000 (11:26 +0200)]
Quick fix for opt/fehler191.c.

This also fixes 176.gcc and 300.twolf.

12 years agoFixed typo.
Sebastian Buchwald [Fri, 15 Jul 2011 09:25:58 +0000 (11:25 +0200)]
Fixed typo.

12 years agoskip Tuples in mode_b lowerer
Matthias Braun [Mon, 11 Jul 2011 11:34:47 +0000 (13:34 +0200)]
skip Tuples in mode_b lowerer

12 years agouse @progbits with .ctors/.dtors section (see also #0000066)
Matthias Braun [Tue, 21 Jun 2011 19:36:07 +0000 (21:36 +0200)]
use @progbits with .ctors/.dtors section (see also #0000066)

12 years agoDon't combine blocks if the first one ends with a Raise.
Julian Oppermann [Tue, 28 Jun 2011 12:10:08 +0000 (14:10 +0200)]
Don't combine blocks if the first one ends with a Raise.

13 years agoC99 feature removed.
Michael Beck [Sat, 25 Jun 2011 16:15:05 +0000 (18:15 +0200)]
C99 feature removed.

13 years agoFixed windows build after lpp merge.
Michael Beck [Sat, 25 Jun 2011 15:52:30 +0000 (17:52 +0200)]
Fixed windows build after lpp merge.

13 years agoMerge Fix: Spills have ProjMs now
Andreas Zwinkau [Fri, 24 Jun 2011 15:33:47 +0000 (17:33 +0200)]
Merge Fix: Spills have ProjMs now

13 years agoFix: Spills have ProjMs now
Andreas Zwinkau [Fri, 24 Jun 2011 15:30:12 +0000 (17:30 +0200)]
Fix: Spills have ProjMs now

13 years agoAdd lpp to Makefile
Andreas Zwinkau [Fri, 24 Jun 2011 13:18:09 +0000 (15:18 +0200)]
Add lpp to Makefile

13 years agofix more cparser warnings, cleanup some libcore code
Matthias Braun [Mon, 20 Jun 2011 17:47:51 +0000 (19:47 +0200)]
fix more cparser warnings, cleanup some libcore code

13 years agofix bug in lower_calls (found by cparser warning)
Matthias Braun [Mon, 20 Jun 2011 12:54:30 +0000 (14:54 +0200)]
fix bug in lower_calls (found by cparser warning)

13 years agofurther cleanup of lpp code
Matthias Braun [Mon, 20 Jun 2011 10:59:02 +0000 (12:59 +0200)]
further cleanup of lpp code

13 years agolpp: adapt to firm coding conventions, warning fixes, cleanup
Matthias Braun [Mon, 20 Jun 2011 10:35:50 +0000 (12:35 +0200)]
lpp: adapt to firm coding conventions, warning fixes, cleanup

13 years agoadd a new aliasing rule (struct access != variable)
Matthias Braun [Fri, 17 Jun 2011 21:22:50 +0000 (23:22 +0200)]
add a new aliasing rule (struct access != variable)

13 years agofix switch lowerer messing up default_proj in some cases
Matthias Braun [Fri, 17 Jun 2011 19:33:28 +0000 (21:33 +0200)]
fix switch lowerer messing up default_proj in some cases

13 years agofix cparser warnings
Matthias Braun [Fri, 17 Jun 2011 19:32:55 +0000 (21:32 +0200)]
fix cparser warnings

13 years agolet backends report their machine_size and the size of long double if supported
Matthias Braun [Wed, 15 Jun 2011 12:59:56 +0000 (14:59 +0200)]
let backends report their machine_size and the size of long double if supported

13 years agoWork around the PIC-in-switch problem by setting the no_pic_adjust flag.
Christoph Mallon [Fri, 17 Jun 2011 12:07:29 +0000 (14:07 +0200)]
Work around the PIC-in-switch problem by setting the no_pic_adjust flag.

This seems wrong. GCC uses PIC for switch on OS X.

13 years agoCorrect usage of ia32_emitf() in emit_ia32_SwitchJmp().
Christoph Mallon [Fri, 17 Jun 2011 09:22:17 +0000 (11:22 +0200)]
Correct usage of ia32_emitf() in emit_ia32_SwitchJmp().

13 years agoReduce code duplication and resolve inconsistencies (due to code duplication) in...
Christoph Mallon [Fri, 17 Jun 2011 09:21:39 +0000 (11:21 +0200)]
Reduce code duplication and resolve inconsistencies (due to code duplication) in ia32_emitf().

13 years agos/threat/treat/.
Christoph Mallon [Fri, 17 Jun 2011 04:08:52 +0000 (06:08 +0200)]
s/threat/treat/.

13 years agofirst experimental version of gurobi ILP solver
Matthias Braun [Thu, 16 Jun 2011 14:29:03 +0000 (16:29 +0200)]
first experimental version of gurobi ILP solver

13 years agooutsourced some functionality
Sebastian Hack [Thu, 16 Jun 2011 13:50:22 +0000 (15:50 +0200)]
outsourced some functionality
adapted to changes

13 years agoremove remaining WITH_ILP uses, fix bug introduced when adapting lpp
Matthias Braun [Thu, 16 Jun 2011 11:50:54 +0000 (13:50 +0200)]
remove remaining WITH_ILP uses, fix bug introduced when adapting lpp

13 years agowe always have liblpp now, remove WITH_ILP flag
Matthias Braun [Thu, 16 Jun 2011 11:32:06 +0000 (13:32 +0200)]
we always have liblpp now, remove WITH_ILP flag

13 years agofix a bunch of warnings reported by cparser
Matthias Braun [Wed, 15 Jun 2011 10:43:56 +0000 (12:43 +0200)]
fix a bunch of warnings reported by cparser

13 years agoadded lpp
Sebastian Hack [Thu, 16 Jun 2011 10:58:11 +0000 (12:58 +0200)]
added lpp

13 years agosome cleanups to opt/loop.c
Matthias Braun [Wed, 15 Jun 2011 08:17:42 +0000 (10:17 +0200)]
some cleanups to opt/loop.c

The optimisation still doesn't appear to do anything for me...

13 years agoadd some const qualifiers to backedges query functions
Matthias Braun [Sat, 11 Jun 2011 13:05:08 +0000 (15:05 +0200)]
add some const qualifiers to backedges query functions

13 years agounify sparc/ia32 SwitchJmp handling
Matthias Braun [Thu, 9 Jun 2011 16:55:48 +0000 (18:55 +0200)]
unify sparc/ia32 SwitchJmp handling

13 years agoimprove jumpthreading comments
Andreas Zwinkau [Fri, 10 Jun 2011 12:20:01 +0000 (14:20 +0200)]
improve jumpthreading comments

13 years agoRevert "jumpthreading must not split edges"
Andreas Zwinkau [Wed, 8 Jun 2011 14:18:59 +0000 (16:18 +0200)]
Revert "jumpthreading must not split edges"

This reverts commit 2dc832999c2d0b91b1d7eb8a5d3de4b89ce5552a.

The commit made jumpthreading "more conservative", which fixed the
problem. However, it is not a good solution in general.

We need a bigger rewrite of opt/jumpthreading, so it analyzes then
modifies the graph instead of on-the-fly changes. This prevents the
infinite loop, which would e.g. happen with such a cf graph:

    \     A         \     A
   __\    |        __\    |
   |  B   |   =>   |  B   |  => ...
   | / \  |        | / \  |
   |    D |        |    E |
   |     \|        |     \|
    \     C         \     D
     \___/           \   /
                      \_C

Breaks opt/jumpthreading5 and opt/jumpthreading5b

13 years agoBetter fix for wrong tarval computation of -(infinity).
Michael Beck [Thu, 9 Jun 2011 15:03:29 +0000 (17:03 +0200)]
Better fix for wrong tarval computation of -(infinity).

Restores the support for no infity, fixed handling of denormals.

13 years agoImproved comment, small cosmetic.
Michael Beck [Tue, 31 May 2011 17:29:01 +0000 (19:29 +0200)]
Improved comment, small cosmetic.

13 years agoFixd typo.
Michael Beck [Tue, 31 May 2011 17:28:11 +0000 (19:28 +0200)]
Fixd typo.

13 years agoFixed wrong tarval computation of -(infinity).
Sebastian Buchwald [Thu, 9 Jun 2011 14:20:05 +0000 (16:20 +0200)]
Fixed wrong tarval computation of -(infinity).

13 years agoFixed some typos.
Sebastian Buchwald [Wed, 8 Jun 2011 12:56:38 +0000 (14:56 +0200)]
Fixed some typos.

13 years agoInclude begin.h and end.h in the generated headers.
Christoph Mallon [Thu, 9 Jun 2011 12:53:06 +0000 (14:53 +0200)]
Include begin.h and end.h in the generated headers.

13 years agoFix typo.
Christoph Mallon [Thu, 9 Jun 2011 12:52:19 +0000 (14:52 +0200)]
Fix typo.

13 years agoadd missing FIRM_API prefixes
Matthias Braun [Thu, 9 Jun 2011 11:49:58 +0000 (13:49 +0200)]
add missing FIRM_API prefixes

13 years agoRemoved the callee/caller saved flag from register specification.
Michael Beck [Wed, 8 Jun 2011 17:39:39 +0000 (19:39 +0200)]
Removed the callee/caller saved flag from register specification.

The callee/caller saved information is not constant accross different
ABI's, so don't make it constant. Instead, all BE that still use beabi
provide a callback now.
This allows to implement support for x64_64/Win32 and is a necessary step
for the combined x86 BE.

13 years agoverify nodes before optimizing them
Matthias Braun [Wed, 8 Jun 2011 17:08:50 +0000 (19:08 +0200)]
verify nodes before optimizing them

13 years agojumpthreading must not split edges
Andreas Zwinkau [Wed, 8 Jun 2011 11:19:33 +0000 (13:19 +0200)]
jumpthreading must not split edges

* the splitted edge is never critical, so the name was misleading
* it might result in an infinite loop
  fixes opt/jumpthreading5 and opt/jumpthreading5b

13 years agoadapt to firm coding conventions, avoid warnings by using INT_TO_PTR and PTR_TO_INT
Matthias Braun [Tue, 7 Jun 2011 11:03:07 +0000 (13:03 +0200)]
adapt to firm coding conventions, avoid warnings by using INT_TO_PTR and PTR_TO_INT

13 years agofix a few comment typos
Matthias Braun [Tue, 7 Jun 2011 10:39:25 +0000 (12:39 +0200)]
fix a few comment typos

13 years agoFix some types
Andreas Zwinkau [Mon, 6 Jun 2011 09:30:00 +0000 (11:30 +0200)]
Fix some types

Fixes issue 64, because casting long to int does work on 64bit.

13 years agoexperimental patch to limit GCSE so we don't produce partially dead code like crazy
Matthias Braun [Wed, 1 Jun 2011 14:15:43 +0000 (16:15 +0200)]
experimental patch to limit GCSE so we don't produce partially dead code like crazy

13 years agolower small switches to ifs
Matthias Braun [Wed, 1 Jun 2011 13:56:48 +0000 (15:56 +0200)]
lower small switches to ifs

13 years agoremove bads in backend
Andreas Zwinkau [Wed, 1 Jun 2011 13:48:29 +0000 (15:48 +0200)]
remove bads in backend

Like the comment says "we can't have Bad-blocks".
However, optimize_cf does not remove them anymore.

13 years agolower_dw must deactivate edges
Andreas Zwinkau [Wed, 1 Jun 2011 12:56:25 +0000 (14:56 +0200)]
lower_dw must deactivate edges

There might be some ProjL nodes reachable via out edges
and the following "local" phase does enqueue_users for
optimized nodes, which might visit the 'undead' ProjL.

13 years agorework fragile ops to have a throws_exception attribute
Matthias Braun [Tue, 31 May 2011 14:27:06 +0000 (16:27 +0200)]
rework fragile ops to have a throws_exception attribute

13 years agochange pn_XXX_max enum to really be the maximum pn and not maximum+1, add n_XXX_max...
Matthias Braun [Wed, 1 Jun 2011 12:06:54 +0000 (14:06 +0200)]
change pn_XXX_max enum to really be the maximum pn and not maximum+1, add n_XXX_max enum

13 years agoAssert that the given node in set_r_cur_block() has mode BB.
Christoph Mallon [Wed, 1 Jun 2011 06:20:31 +0000 (08:20 +0200)]
Assert that the given node in set_r_cur_block() has mode BB.

13 years agoReduce code duplication: Implement set_cur_block() by calling set_r_cur_block().
Christoph Mallon [Wed, 1 Jun 2011 06:22:44 +0000 (08:22 +0200)]
Reduce code duplication: Implement set_cur_block() by calling set_r_cur_block().

13 years agoalways transform integer abs, even in GRAPH_STATE_KEEP_MUX
Matthias Braun [Tue, 31 May 2011 11:23:44 +0000 (13:23 +0200)]
always transform integer abs, even in GRAPH_STATE_KEEP_MUX

13 years agofix transform_node_Cmp
Matthias Braun [Tue, 31 May 2011 11:19:03 +0000 (13:19 +0200)]
fix transform_node_Cmp

13 years agoIntroduce flip-flopping normalisations
Matthias Braun [Tue, 31 May 2011 10:44:52 +0000 (12:44 +0200)]
Introduce flip-flopping normalisations

There are cases where we can normalize in 2 directions and both have
their merits. Just do both in this case. The frontend should at some
point set IRG_GRAPH_STATE_NORMALISATION2 to trigger the 2nd direction.

13 years agoirverify: simplify/refactor internal interfaces
Matthias Braun [Fri, 27 May 2011 16:21:46 +0000 (18:21 +0200)]
irverify: simplify/refactor internal interfaces

13 years agoa const ir_graph is enough for get_idx_irn
Matthias Braun [Fri, 27 May 2011 16:21:17 +0000 (18:21 +0200)]
a const ir_graph is enough for get_idx_irn

13 years agofragile nodes must be exception or memory pinned
Matthias Braun [Fri, 27 May 2011 14:57:31 +0000 (16:57 +0200)]
fragile nodes must be exception or memory pinned

13 years agomove integer abs optimisation from backend to the middleend
Matthias Braun [Mon, 30 May 2011 21:18:31 +0000 (23:18 +0200)]
move integer abs optimisation from backend to the middleend

13 years agoreverse direction of bitop/shift normalisation
Matthias Braun [Mon, 30 May 2011 18:24:08 +0000 (20:24 +0200)]
reverse direction of bitop/shift normalisation

13 years agooptimize_blocks ignores unreachable blocks
Andreas Zwinkau [Tue, 31 May 2011 10:56:27 +0000 (12:56 +0200)]
optimize_blocks ignores unreachable blocks

Fixes opt/ioet.c

13 years agoCosmetics in cfopt
Andreas Zwinkau [Tue, 31 May 2011 08:55:47 +0000 (10:55 +0200)]
Cosmetics in cfopt

* set_irg_outs_inconsistent is unnecessary as exchange does that already
* "useless if optimization" was a confusing comment
* more precise type: int -> block_flags_t

13 years agoFix "Some cleanup of cfopt."
Andreas Zwinkau [Tue, 31 May 2011 08:50:49 +0000 (10:50 +0200)]
Fix "Some cleanup of cfopt."

The remove_empty_blocks function must be used for a pre-walker, otherwise
it might be called on blocks, which were optimized away. Consider infinite
loops and the Keep edges:

  \ ___
   B   |
    \  /
    Empty
    /
   / Keep Edge!

In this example, we must not call remove_empty_blocks on Empty,
after we called it on B, but a post walker would do that.

13 years agoImproved doxygen docu.
unknown [Mon, 30 May 2011 21:59:06 +0000 (23:59 +0200)]
Improved doxygen docu.

13 years agoSome cleanup of cfopt.
unknown [Mon, 30 May 2011 17:00:18 +0000 (19:00 +0200)]
Some cleanup of cfopt.

- renamed clear_link() to clear_link_and_mark_blocks_removable()
- renamed optimize_conds() to optimize_ifs()
- simplified has_*() implementations
- made some walker POST walker
- invalidate out edges
- and add some doxygen docu
- fixed some typos
- adapt to firm indentation style

13 years agoimprove our 'don't use AM' heuristic: immediates do not increase register pressure
Matthias Braun [Mon, 30 May 2011 14:21:52 +0000 (16:21 +0200)]
improve our 'don't use AM' heuristic: immediates do not increase register pressure