libfirm
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

12 years agoiropt: Or/Eor/Add are sometimes equivalent
Matthias Braun [Fri, 21 Oct 2011 12:40:51 +0000 (14:40 +0200)]
iropt: Or/Eor/Add are sometimes equivalent

If vrp can prove that both operand of an Or/Eor/Add never a bit set in
common then we can match them as each of these opcodes.

12 years agoremove a bunch of comments marking end of blocks
Matthias Braun [Fri, 21 Oct 2011 10:51:31 +0000 (12:51 +0200)]
remove a bunch of comments marking end of blocks

They're adding more noise than they provide gain in readability. They
also make extra work to keep up to date.

12 years agoLet normalize_n_returns cope with Bads
Andreas Zwinkau [Thu, 27 Oct 2011 10:56:30 +0000 (12:56 +0200)]
Let normalize_n_returns cope with Bads

Fixes opt/fehler204 again.

12 years agotailrec requires many Returns
Andreas Zwinkau [Thu, 27 Oct 2011 08:21:17 +0000 (10:21 +0200)]
tailrec requires many Returns

Extend opt_manage framework with MANY_RETURNS condition.

Since normalize_n_returns might introduce unreachable code,
the order should be handled in the framework instead of the
optimization.

Fix opt/gap test.

12 years agoDump alert, backspace and vertical tab in string initializers, too.
Christoph Mallon [Thu, 27 Oct 2011 06:36:43 +0000 (08:36 +0200)]
Dump alert, backspace and vertical tab in string initializers, too.

12 years agoDump special characters in string intializers properly, e.g. tab as \t.
Christoph Mallon [Thu, 27 Oct 2011 06:24:16 +0000 (08:24 +0200)]
Dump special characters in string intializers properly, e.g. tab as \t.

Newer yComp (>= 1.3.14) can handle backslashes in strings.

12 years agoFix lower_mode_b aka x86code/fehler136
Andreas Zwinkau [Wed, 26 Oct 2011 14:36:41 +0000 (16:36 +0200)]
Fix lower_mode_b aka x86code/fehler136

12 years agoAdd remove_tuples function
Andreas Zwinkau [Wed, 26 Oct 2011 14:14:15 +0000 (16:14 +0200)]
Add remove_tuples function

12 years agoCompile git revision into libfirm
Andreas Zwinkau [Wed, 26 Oct 2011 13:51:51 +0000 (15:51 +0200)]
Compile git revision into libfirm

12 years agoUse opt_manage framework for tailrec
Andreas Zwinkau [Wed, 26 Oct 2011 08:48:29 +0000 (10:48 +0200)]
Use opt_manage framework for tailrec

Fixes test opt/fehler204

12 years agoDump array initialisers, which contain only bytes in the printable range, as strings...
Christoph Mallon [Mon, 19 Sep 2011 06:30:33 +0000 (08:30 +0200)]
Dump array initialisers, which contain only bytes in the printable range, as strings instead of separate byte initialisers.

Eg.
[0] = 0x62
[1] = 0x6C
[2] = 0x61
[3] = 0x00]
becomes
[0...3] = "bla<NUL>"

TODO: Fix yComp, so it does not choke on backslashes.

12 years agoRemove ia32_l_Setcc and remove set creation callback from ir_lower_mode_b().
Christoph Mallon [Wed, 21 Sep 2011 12:12:42 +0000 (14:12 +0200)]
Remove ia32_l_Setcc and remove set creation callback from ir_lower_mode_b().

It is just an unnecessary node, which the middleend does not understand and therefore cannot optimize.

12 years agosimply use long long
Matthias Braun [Thu, 20 Oct 2011 17:12:53 +0000 (19:12 +0200)]
simply use long long

Most of the world can handle C99 now, and the important rest (=msvc) can
handle long long as an extension.

12 years agoremove unnecessary libcore bits
Matthias Braun [Thu, 20 Oct 2011 17:08:00 +0000 (19:08 +0200)]
remove unnecessary libcore bits

12 years agoremove is_Global/get_GlobalEntity
Matthias Braun [Thu, 20 Oct 2011 16:32:37 +0000 (18:32 +0200)]
remove is_Global/get_GlobalEntity

They have been unnecessary aliases for is_SymConst_addr_ent() and
get_SymConst_entity().

12 years agoconsolidate utility macros in util.h
Matthias Braun [Thu, 20 Oct 2011 16:16:35 +0000 (18:16 +0200)]
consolidate utility macros in util.h

12 years agoirmode: remove support for exotic arithmetics
Matthias Braun [Thu, 20 Oct 2011 16:01:28 +0000 (18:01 +0200)]
irmode: remove support for exotic arithmetics

12 years agotarvals are unique no need to use tarval_cmp for equality checks
Matthias Braun [Thu, 20 Oct 2011 15:57:22 +0000 (17:57 +0200)]
tarvals are unique no need to use tarval_cmp for equality checks

12 years agouse a hook to dump vrp info instead of polluting irdump.c
Matthias Braun [Thu, 20 Oct 2011 14:45:38 +0000 (16:45 +0200)]
use a hook to dump vrp info instead of polluting irdump.c

12 years agoassert that no hook_entry is registered twice
Matthias Braun [Thu, 20 Oct 2011 14:26:30 +0000 (16:26 +0200)]
assert that no hook_entry is registered twice

12 years agorename ir_phase to ir_nodemap and simplify interface
Matthias Braun [Wed, 19 Oct 2011 17:41:18 +0000 (19:41 +0200)]
rename ir_phase to ir_nodemap and simplify interface

The new interface uses no complicated callbacks anymore, but is a simple
ir_node* -> void* nodemap. Adapted all users of ir_phase for this.

12 years agobelive: use sparse hashmap for block->data mapping
Matthias Braun [Wed, 19 Oct 2011 15:13:06 +0000 (17:13 +0200)]
belive: use sparse hashmap for block->data mapping

12 years agocfopt: use a hashmap for sparse block->data mapping
Matthias Braun [Wed, 19 Oct 2011 15:12:18 +0000 (17:12 +0200)]
cfopt: use a hashmap for sparse block->data mapping

12 years agorename irnodemap to irnodehashmap
Matthias Braun [Wed, 19 Oct 2011 11:00:08 +0000 (13:00 +0200)]
rename irnodemap to irnodehashmap

12 years agoiropt: add (a|b) & ~b => a & ~b rule
Matthias Braun [Wed, 19 Oct 2011 09:05:31 +0000 (11:05 +0200)]
iropt: add (a|b) & ~b => a & ~b rule

12 years agoia32: change ShrD/ShlD patterns to match Add instead of Or
Matthias Braun [Wed, 19 Oct 2011 09:05:10 +0000 (11:05 +0200)]
ia32: change ShrD/ShlD patterns to match Add instead of Or

12 years agonormalise Or/Eor => Add where possible
Matthias Braun [Wed, 19 Oct 2011 09:04:34 +0000 (11:04 +0200)]
normalise Or/Eor => Add where possible

12 years agocast ctype functions input to unsigned char
Matthias Braun [Thu, 20 Oct 2011 12:26:36 +0000 (14:26 +0200)]
cast ctype functions input to unsigned char

From the manpage: If c is not an unsigned char value, or EOF, the
behavior of these functions is undefined.
(So putting char into them directly is wrong)

12 years agomake fltcalc.c more portable (and msvc independent)
Matthias Braun [Thu, 20 Oct 2011 11:43:16 +0000 (13:43 +0200)]
make fltcalc.c more portable (and msvc independent)

12 years agorename some constants to avoid clashes with system headers
Matthias Braun [Thu, 20 Oct 2011 10:26:48 +0000 (12:26 +0200)]
rename some constants to avoid clashes with system headers

12 years agoadd a Doxyfile for people without firm-build
Matthias Braun [Wed, 19 Oct 2011 20:03:53 +0000 (22:03 +0200)]
add a Doxyfile for people without firm-build

12 years agogenerate_emitter.pl depends on generate_emitter_new.pl
Matthias Braun [Wed, 19 Oct 2011 19:36:57 +0000 (21:36 +0200)]
generate_emitter.pl depends on generate_emitter_new.pl

12 years agofix perl warning
Matthias Braun [Wed, 19 Oct 2011 19:36:44 +0000 (21:36 +0200)]
fix perl warning

12 years agowe (also) build a shared lib for which some architecture require PIC code
Matthias Braun [Wed, 19 Oct 2011 19:34:14 +0000 (21:34 +0200)]
we (also) build a shared lib for which some architecture require PIC code

12 years agosparc: emit extra-indentation for delay slots
Matthias Braun [Mon, 17 Oct 2011 16:23:43 +0000 (18:23 +0200)]
sparc: emit extra-indentation for delay slots

12 years agosparc: implement more fold-into-restore peephole optimizations
Matthias Braun [Mon, 17 Oct 2011 13:40:00 +0000 (15:40 +0200)]
sparc: implement more fold-into-restore peephole optimizations

12 years agobe: factor out can_move_to function from sparc_emitter
Matthias Braun [Mon, 17 Oct 2011 13:39:28 +0000 (15:39 +0200)]
be: factor out can_move_to function from sparc_emitter

12 years agobepeephole: use global register indices
Matthias Braun [Mon, 17 Oct 2011 10:56:19 +0000 (12:56 +0200)]
bepeephole: use global register indices

This simplifies the code and should make it slightly faster

12 years agosparc: use AddCC, SubCC, MulCC
Matthias Braun [Fri, 14 Oct 2011 14:48:51 +0000 (16:48 +0200)]
sparc: use AddCC, SubCC, MulCC

12 years agogenerate nicer emitter code
Matthias Braun [Fri, 14 Oct 2011 14:48:27 +0000 (16:48 +0200)]
generate nicer emitter code

12 years agosparc: improve delay slot picking
Matthias Braun [Thu, 13 Oct 2011 15:48:16 +0000 (17:48 +0200)]
sparc: improve delay slot picking

12 years agobepeephole: make assert about dominance less strict
Matthias Braun [Mon, 17 Oct 2011 13:57:57 +0000 (15:57 +0200)]
bepeephole: make assert about dominance less strict

12 years agochange strange indentation
Matthias Braun [Thu, 13 Oct 2011 15:48:00 +0000 (17:48 +0200)]
change strange indentation

12 years agoXor without address mode is commutative.
Sebastian Buchwald [Mon, 17 Oct 2011 11:03:18 +0000 (13:03 +0200)]
Xor without address mode is commutative.

This fixes backend/builtin_parityl.c and backend/builtin_parityll.c.

12 years agoAlso track extended live ranges.
Sebastian Buchwald [Mon, 17 Oct 2011 10:56:23 +0000 (12:56 +0200)]
Also track extended live ranges.

If the peephole replaced the current node by another node
the corresponding value is live before the current node.

This fixes x86code/flags.c.

12 years agoClean up code.
Sebastian Buchwald [Thu, 13 Oct 2011 12:43:02 +0000 (14:43 +0200)]
Clean up code.

12 years agoFixed typo.
Sebastian Buchwald [Thu, 13 Oct 2011 12:42:47 +0000 (14:42 +0200)]
Fixed typo.

12 years agoLower double word builtins.
Sebastian Buchwald [Tue, 4 Oct 2011 19:22:56 +0000 (21:22 +0200)]
Lower double word builtins.

12 years agoFixed some typos.
Sebastian Buchwald [Mon, 3 Oct 2011 18:34:30 +0000 (20:34 +0200)]
Fixed some typos.

12 years agosparc: prefer andn,orn,xorn when they lead to smaller constants
Matthias Braun [Tue, 11 Oct 2011 13:20:25 +0000 (15:20 +0200)]
sparc: prefer andn,orn,xorn when they lead to smaller constants

(see testsuite/backend/sparc_notconsts.c for an example)

12 years agosparc: peephole - fold copy into restore
Matthias Braun [Sat, 1 Oct 2011 03:11:34 +0000 (05:11 +0200)]
sparc: peephole - fold copy into restore

12 years agosparc: Corrected sp-relative access warning.
Manuel Mohr [Wed, 28 Sep 2011 14:08:21 +0000 (16:08 +0200)]
sparc:  Corrected sp-relative access warning.

12 years agosparc: Restore accidentally deleted assert.
Manuel Mohr [Wed, 28 Sep 2011 12:55:03 +0000 (14:55 +0200)]
sparc:  Restore accidentally deleted assert.

12 years agoFixed local optimization.
Sebastian Buchwald [Wed, 28 Sep 2011 04:26:13 +0000 (06:26 +0200)]
Fixed local optimization.

The transformation (a << c1) | c2 => (a | (c2 >> c1)) << c1
is only valid if the lower bits of c2 are clean.

This fixes opt/pr37102.c.

12 years agosparc: Warn if trying to emit stack relative Lds/Sts with small offsets.
Manuel Mohr [Tue, 27 Sep 2011 12:36:35 +0000 (14:36 +0200)]
sparc:  Warn if trying to emit stack relative Lds/Sts with small offsets.

12 years agosparc: Lower CopyB nodes before lowering double words.
Manuel Mohr [Tue, 27 Sep 2011 10:58:37 +0000 (12:58 +0200)]
sparc:  Lower CopyB nodes before lowering double words.

12 years agosparc: attempt to fix stack alignment/address for omit-fp again
Matthias Braun [Tue, 27 Sep 2011 13:36:14 +0000 (15:36 +0200)]
sparc: attempt to fix stack alignment/address for omit-fp again

12 years agosparc: fix wrong stack-offset in omit-fp commits
Matthias Braun [Tue, 27 Sep 2011 12:21:45 +0000 (14:21 +0200)]
sparc: fix wrong stack-offset in omit-fp commits

12 years agosparc: va_arg functions may not use omit-fp
Matthias Braun [Tue, 27 Sep 2011 12:19:30 +0000 (14:19 +0200)]
sparc: va_arg functions may not use omit-fp

12 years agosparc: read mode_gp from regclass instead of hardcoding mode_Iu
Matthias Braun [Mon, 26 Sep 2011 09:07:46 +0000 (11:07 +0200)]
sparc: read mode_gp from regclass instead of hardcoding mode_Iu

12 years agofix frame_alloc_area not setting a type size
Matthias Braun [Fri, 23 Sep 2011 12:23:00 +0000 (14:23 +0200)]
fix frame_alloc_area not setting a type size

12 years agoinclude backend headers without "../"
Matthias Braun [Fri, 23 Sep 2011 12:05:12 +0000 (14:05 +0200)]
include backend headers without "../"

This was an odd convention from the past, there's no need for it
anymore.

12 years agoremove old/unused XXX_transform_env_t structs
Matthias Braun [Fri, 23 Sep 2011 11:44:54 +0000 (13:44 +0200)]
remove old/unused XXX_transform_env_t structs

12 years agosparc: mark has_delay_slot as node flag
Matthias Braun [Fri, 23 Sep 2011 09:33:23 +0000 (11:33 +0200)]
sparc: mark has_delay_slot as node flag

12 years agoAdded option to prevent creation of misaligned loads/stores during CopyB lowering.
Manuel Mohr [Tue, 27 Sep 2011 08:05:39 +0000 (10:05 +0200)]
Added option to prevent creation of misaligned loads/stores during CopyB lowering.

12 years agoremove warning
Andreas Zwinkau [Mon, 26 Sep 2011 08:37:06 +0000 (10:37 +0200)]
remove warning

12 years agoEnqueue Phi nodes to reach fixpoint.
Sebastian Buchwald [Fri, 23 Sep 2011 13:25:20 +0000 (15:25 +0200)]
Enqueue Phi nodes to reach fixpoint.

12 years agoFixed typos.
Sebastian Buchwald [Mon, 18 Jul 2011 16:16:24 +0000 (18:16 +0200)]
Fixed typos.

12 years agoConsistently use new function to create compilerlib function entities.
Manuel Mohr [Fri, 23 Sep 2011 10:49:38 +0000 (12:49 +0200)]
Consistently use new function to create compilerlib function entities.

12 years agoAdded callback mechanism to determine compilerlib function names.
Manuel Mohr [Thu, 22 Sep 2011 14:34:55 +0000 (16:34 +0200)]
Added callback mechanism to determine compilerlib function names.

12 years agoconvenience function to see if mux gets optimized away
Matthias Braun [Thu, 22 Sep 2011 14:35:56 +0000 (16:35 +0200)]
convenience function to see if mux gets optimized away

backends can use this to allow all mux nodes which get optimized away by
the middleend anyway.
This fixes abs handling on sparc.

12 years agosimplify transform_node_Mux by using is_single_bit
Matthias Braun [Thu, 22 Sep 2011 12:56:22 +0000 (14:56 +0200)]
simplify transform_node_Mux by using is_single_bit

12 years agocleanup in firm_types.h
Matthias Braun [Thu, 22 Sep 2011 12:34:39 +0000 (14:34 +0200)]
cleanup in firm_types.h

12 years agokill deprecated firm_parameter_t interface
Matthias Braun [Thu, 22 Sep 2011 12:29:47 +0000 (14:29 +0200)]
kill deprecated firm_parameter_t interface

12 years agoremove old+unused interval_analysis
Matthias Braun [Thu, 22 Sep 2011 12:23:32 +0000 (14:23 +0200)]
remove old+unused interval_analysis

12 years agoremove old+unused execution_frequency/field_temperature
Matthias Braun [Thu, 22 Sep 2011 12:21:02 +0000 (14:21 +0200)]
remove old+unused execution_frequency/field_temperature

12 years agocleanup comments in public headers
Matthias Braun [Thu, 22 Sep 2011 12:06:04 +0000 (14:06 +0200)]
cleanup comments in public headers

12 years agoremove old+unused structure analysis
Matthias Braun [Thu, 22 Sep 2011 11:51:48 +0000 (13:51 +0200)]
remove old+unused structure analysis