libfirm
12 years agoFix Conv node signature in error message.
Julian Oppermann [Fri, 11 May 2012 09:22:46 +0000 (11:22 +0200)]
Fix Conv node signature in error message.

12 years agocopy comp_dir_value
Matthias Braun [Thu, 10 May 2012 21:38:08 +0000 (23:38 +0200)]
copy comp_dir_value

12 years agosparc: fix problem with compound return
Matthias Braun [Thu, 10 May 2012 20:44:04 +0000 (22:44 +0200)]
sparc: fix problem with compound return

12 years agoforbid to set current_block to Bad
Matthias Braun [Thu, 10 May 2012 19:36:44 +0000 (21:36 +0200)]
forbid to set current_block to Bad

This was used as a hack to mark unreachable code by some people, but it
is prefered to simply use a new Block without predecessors, or set NULL
if you have to.

12 years agoremove buffer restriction in be_emit_irprintf
Matthias Braun [Thu, 10 May 2012 17:07:42 +0000 (19:07 +0200)]
remove buffer restriction in be_emit_irprintf

12 years agoimprove docu of ir_visibility_external
Matthias Braun [Fri, 4 May 2012 13:48:37 +0000 (15:48 +0200)]
improve docu of ir_visibility_external

12 years agoTeach new_tarval_from_str_int() to parse binary numbers: 0[bB][01]+.
Christoph Mallon [Sun, 6 May 2012 18:17:06 +0000 (20:17 +0200)]
Teach new_tarval_from_str_int() to parse binary numbers: 0[bB][01]+.

12 years agoCorrect the documentation of new_tarval_from_str().
Christoph Mallon [Sun, 6 May 2012 18:04:33 +0000 (20:04 +0200)]
Correct the documentation of new_tarval_from_str().

12 years agoResolve shadowing warning.
Christoph Mallon [Sat, 5 May 2012 16:05:46 +0000 (18:05 +0200)]
Resolve shadowing warning.

12 years agoRemove unnecessary void cast.
Christoph Mallon [Sat, 5 May 2012 16:03:45 +0000 (18:03 +0200)]
Remove unnecessary void cast.

12 years agoCorrect indentation and excessive spacing.
Christoph Mallon [Sat, 5 May 2012 16:03:10 +0000 (18:03 +0200)]
Correct indentation and excessive spacing.

12 years agoCorrect typo in comment.
Christoph Mallon [Sat, 5 May 2012 15:59:10 +0000 (17:59 +0200)]
Correct typo in comment.

12 years agoDo not refetch a value, which we already have.
Christoph Mallon [Sat, 5 May 2012 15:58:05 +0000 (17:58 +0200)]
Do not refetch a value, which we already have.

12 years agoUnbreak emitting TLS variables in the binary ia32 emitter.
Christoph Mallon [Sun, 6 May 2012 06:02:10 +0000 (08:02 +0200)]
Unbreak emitting TLS variables in the binary ia32 emitter.

12 years agoChange tests for ir_visibility_external, which should really test for entity_has_defi...
Christoph Mallon [Sat, 5 May 2012 21:02:22 +0000 (23:02 +0200)]
Change tests for ir_visibility_external, which should really test for entity_has_definition(), since the meaning of ir_visibility_external changed.

For global variables defined in the current translation unit this restores that
- they are not accessed via trampolines when compiling PIC,
- they are not skipped when emitting debug info.

12 years agoUnbreak PIC: Only stop emitting a global without initializer after emitting its tramp...
Christoph Mallon [Sat, 5 May 2012 15:37:37 +0000 (17:37 +0200)]
Unbreak PIC: Only stop emitting a global without initializer after emitting its trampoline.

12 years agoimprove entity verifier
Matthias Braun [Fri, 4 May 2012 12:31:15 +0000 (14:31 +0200)]
improve entity verifier

12 years agoIntroduce IR_LINKAGE_NO_CODEGEN
Matthias Braun [Fri, 4 May 2012 12:30:03 +0000 (14:30 +0200)]
Introduce IR_LINKAGE_NO_CODEGEN

This is used to implement C99 "inline"/GNU89 "extern inline" ie. an
entity which is externally defined but where we know an inlineable
definition anyway.

12 years agoir_visibility cleanup
Matthias Braun [Thu, 3 May 2012 18:43:05 +0000 (20:43 +0200)]
ir_visibility cleanup

This commit removes the strange differentiation between
ir_visibility_external and ir_visibility_default. We now only have
ir_visibility_external for all symbols visible across compilation units.
You may or may not attach graphs/initializers to them.

12 years agofix entity_has_definition
Matthias Braun [Thu, 3 May 2012 18:37:15 +0000 (20:37 +0200)]
fix entity_has_definition

12 years agoEmit a \t before .globl.
Christoph Mallon [Thu, 3 May 2012 20:21:04 +0000 (22:21 +0200)]
Emit a \t before .globl.

12 years agofix problem with shared doubleword types
Matthias Braun [Fri, 27 Apr 2012 15:31:21 +0000 (17:31 +0200)]
fix problem with shared doubleword types

12 years agotrverify: cleanup, check irg.entity == entity.irg
Matthias Braun [Thu, 26 Apr 2012 17:58:08 +0000 (19:58 +0200)]
trverify: cleanup, check irg.entity == entity.irg

12 years agodon't fail when printing Sel with entity==NULL
Matthias Braun [Thu, 26 Apr 2012 16:32:27 +0000 (18:32 +0200)]
don't fail when printing Sel with entity==NULL

(This happens when you break on a Sel creation and the firm debugger
 tries to tell you about the created node)

12 years agodwarf: initial support for callframe and params
Matthias Braun [Wed, 25 Apr 2012 21:01:59 +0000 (23:01 +0200)]
dwarf: initial support for callframe and params

- We now always output dwarf3 so we can use DW_OP_call_frame_cfa and avoid
  construction location lists, but just reuse the callframe info lists.
- Backends have to emit debug info as callframe calculation changes:
  The ia32 backend has a preliminary implementation which assumes esp
  offset of frame_type_size at the beginning of a block (currently
  always true), the no-omit-fp mode assumes ebp relative addressing
  (which is correct except for the prolog/epilogue insns)

12 years agobedbgout, stabs: remove obsolete debug modules
Matthias Braun [Wed, 25 Apr 2012 20:52:07 +0000 (22:52 +0200)]
bedbgout, stabs: remove obsolete debug modules

Remove the stabs debugoutput code and with it all the complexity of a
modular debug output system. The only remaining debug output module is
dwarf.

12 years agorename dbg_set_dbg_info to dbg_location
Matthias Braun [Mon, 28 Nov 2011 11:45:05 +0000 (12:45 +0100)]
rename dbg_set_dbg_info to dbg_location

12 years agoadd dwarf register number to register description
Matthias Braun [Thu, 24 Nov 2011 23:22:34 +0000 (00:22 +0100)]
add dwarf register number to register description

12 years agomove custom_abbrevs enum back into bedwarf.c
Matthias Braun [Wed, 25 Apr 2012 13:55:41 +0000 (15:55 +0200)]
move custom_abbrevs enum back into bedwarf.c

It's an internal thing and nothing from the dwarf spec

12 years agofix documentation warnings
Matthias Braun [Wed, 25 Apr 2012 13:29:23 +0000 (15:29 +0200)]
fix documentation warnings

12 years agodebugger: cleanup, add dumpfilter, unify create
Matthias Braun [Wed, 25 Apr 2012 10:33:52 +0000 (12:33 +0200)]
debugger: cleanup, add dumpfilter, unify create

- the "create" command now catches new nodes, entities and types as
  their numbers are unique anyway

12 years agofix typo in comments
Matthias Braun [Wed, 25 Apr 2012 09:07:05 +0000 (11:07 +0200)]
fix typo in comments

12 years agoDWARF: Actually emit the list of files, not just the first filename over and over...
Christoph Mallon [Tue, 24 Apr 2012 20:36:46 +0000 (22:36 +0200)]
DWARF: Actually emit the list of files, not just the first filename over and over again, i.e. use index i, not 0.

12 years agoDWARF: Actually set the selected language, not always DW_LANG_C_plus_plus.
Christoph Mallon [Tue, 24 Apr 2012 20:21:53 +0000 (22:21 +0200)]
DWARF: Actually set the selected language, not always DW_LANG_C_plus_plus.

12 years agoDWARF: Move the DWARF constants into a separate header.
Christoph Mallon [Tue, 24 Apr 2012 20:16:15 +0000 (22:16 +0200)]
DWARF: Move the DWARF constants into a separate header.

12 years agoDWARF: Also emit the column in the debug information.
Christoph Mallon [Tue, 24 Apr 2012 19:17:23 +0000 (21:17 +0200)]
DWARF: Also emit the column in the debug information.

12 years agoDWARF: Factorise debug information format registration.
Christoph Mallon [Tue, 24 Apr 2012 19:13:45 +0000 (21:13 +0200)]
DWARF: Factorise debug information format registration.

12 years agoAdd the column to the debug information.
Christoph Mallon [Tue, 24 Apr 2012 18:42:40 +0000 (20:42 +0200)]
Add the column to the debug information.

12 years agodwarf: setter for language and compilation dir
Matthias Braun [Tue, 24 Apr 2012 16:53:59 +0000 (18:53 +0200)]
dwarf: setter for language and compilation dir

12 years agodwarf: preliminary support for class-types
Matthias Braun [Tue, 24 Apr 2012 16:53:41 +0000 (18:53 +0200)]
dwarf: preliminary support for class-types

12 years agodwarf: use ld_names instead of names
Matthias Braun [Tue, 24 Apr 2012 16:53:11 +0000 (18:53 +0200)]
dwarf: use ld_names instead of names

12 years agoMake new_type() static.
Christoph Mallon [Sat, 21 Apr 2012 18:06:22 +0000 (20:06 +0200)]
Make new_type() static.

12 years agoFixed wrong function type.
Sebastian Buchwald [Tue, 17 Apr 2012 16:42:44 +0000 (18:42 +0200)]
Fixed wrong function type.

12 years agoia32: remove pointless downconv skips in gen_Add
Matthias Braun [Tue, 17 Apr 2012 16:26:48 +0000 (18:26 +0200)]
ia32: remove pointless downconv skips in gen_Add

this fixes a bug, because match_arguments determines the operations
mode by looking at the passed operands, so they must still have the
original mode and not the mode after a skip_downconv.

12 years agoControl flow optimization: Merge consecutive blocks.
Ingmar Wirths [Tue, 17 Apr 2012 12:52:51 +0000 (14:52 +0200)]
Control flow optimization: Merge consecutive blocks.

Merge a block with its only control flow predecessor,
if it contains no phi nodes and the block is the only successor of the predecessor.

12 years agoTurn if (x) assert(y); into assert(!x || y);
Christoph Mallon [Sun, 25 Mar 2012 20:11:19 +0000 (22:11 +0200)]
Turn if (x) assert(y); into assert(!x || y);

12 years agoAssert that [gs]et_{,r_}cur_block() are only called in phase_building.
Christoph Mallon [Sun, 25 Mar 2012 20:09:18 +0000 (22:09 +0200)]
Assert that [gs]et_{,r_}cur_block() are only called in phase_building.

12 years agoUpdate/Correct documentation of kill_node().
Christoph Mallon [Thu, 15 Mar 2012 13:44:52 +0000 (14:44 +0100)]
Update/Correct documentation of kill_node().

12 years agoCode placement cannot handle unreachable code.
Sebastian Buchwald [Sun, 25 Mar 2012 18:34:22 +0000 (20:34 +0200)]
Code placement cannot handle unreachable code.

12 years agofix sparc backend restore node
Matthias Braun [Wed, 14 Mar 2012 12:16:34 +0000 (13:16 +0100)]
fix sparc backend restore node

12 years agoReduce code duplication.
Christoph Mallon [Tue, 13 Mar 2012 13:53:19 +0000 (14:53 +0100)]
Reduce code duplication.

12 years agosupport for variable sized compound/array types
Matthias Braun [Mon, 12 Mar 2012 18:31:12 +0000 (19:31 +0100)]
support for variable sized compound/array types

This adds support for C99/gcc style compound types where the last
element is an array of unspecified size. The compound size is the
minimum size (assuming the array has no elements), or is calculated
by the size of an initializer.

12 years agoAdd missing FIRM_API.
Christoph Mallon [Fri, 9 Mar 2012 12:32:11 +0000 (13:32 +0100)]
Add missing FIRM_API.

12 years agoFix typo in comment.
Christoph Mallon [Fri, 9 Mar 2012 09:51:58 +0000 (10:51 +0100)]
Fix typo in comment.

12 years agoRemove ia32_code_gen_config_t::use_ftst.
Christoph Mallon [Fri, 9 Mar 2012 09:46:31 +0000 (10:46 +0100)]
Remove ia32_code_gen_config_t::use_ftst.

ftst is always available and faster than fldz+fucom.

12 years agoSimplify code to relax the condition in get_flags_node().
Christoph Mallon [Fri, 9 Mar 2012 09:37:41 +0000 (10:37 +0100)]
Simplify code to relax the condition in get_flags_node().

12 years agoMove a set_ia32_commutative() into the branch where it belongs.
Christoph Mallon [Tue, 6 Mar 2012 13:38:52 +0000 (14:38 +0100)]
Move a set_ia32_commutative() into the branch where it belongs.

The ftst from the other branch cannot be commutative (it only has 1 operand).

12 years agoRemove stale comment and simplify the code accordingly.
Christoph Mallon [Wed, 29 Feb 2012 13:26:52 +0000 (14:26 +0100)]
Remove stale comment and simplify the code accordingly.

12 years agobeabi: remove a bunch of unused/deprecated flags
Matthias Braun [Tue, 6 Mar 2012 11:47:31 +0000 (12:47 +0100)]
beabi: remove a bunch of unused/deprecated flags

12 years agoRoute stackpointer through Restore node
Matthias Braun [Tue, 7 Feb 2012 11:51:39 +0000 (12:51 +0100)]
Route stackpointer through Restore node

(This avoids effects where compilation fails because of an unused
 stackpointer)

12 years agoupdate doc Makefile targets
Matthias Braun [Thu, 2 Feb 2012 10:06:31 +0000 (11:06 +0100)]
update doc Makefile targets

12 years agolower_dw: don't fail on Tuple-nodes
Matthias Braun [Mon, 30 Jan 2012 18:05:39 +0000 (19:05 +0100)]
lower_dw: don't fail on Tuple-nodes

12 years agobecopyilp: fix search for aligned free color
Matthias Braun [Thu, 26 Jan 2012 17:37:05 +0000 (18:37 +0100)]
becopyilp: fix search for aligned free color

12 years agosimplify splitting for double-width values
Matthias Braun [Tue, 24 Jan 2012 16:47:36 +0000 (17:47 +0100)]
simplify splitting for double-width values

We regard them as "constraints" now, so the existing code inserts splits
for these nodes. This simplifies the code as we don't have to check for
already existing Permutations anymore.

12 years agoClarify interpretation of limited for wide values
Matthias Braun [Tue, 10 Jan 2012 12:59:20 +0000 (13:59 +0100)]
Clarify interpretation of limited for wide values

12 years agoFix the way simplifiable node are colored when alignment is in the game
Quentin Colombet [Mon, 12 Dec 2011 11:29:43 +0000 (12:29 +0100)]
Fix the way simplifiable node are colored when alignment is in the game

12 years agoFirst try to add aliasing support in ilp coalescer
Quentin Colombet [Fri, 9 Dec 2011 11:46:01 +0000 (12:46 +0100)]
First try to add aliasing support in ilp coalescer

12 years agoAdd a phase before coloring thats split all live variables before each instruction...
Quentin Colombet [Wed, 30 Nov 2011 13:26:45 +0000 (14:26 +0100)]
Add a phase before coloring thats split all live variables before each instruction that defines a paired value.

12 years agofix backend Cond/Cmp flag optimization failing for unoptimized code
Matthias Braun [Thu, 1 Mar 2012 15:01:09 +0000 (16:01 +0100)]
fix backend Cond/Cmp flag optimization failing for unoptimized code

12 years agoiropt: fix direct calls to compute_cmp
Matthias Braun [Thu, 1 Mar 2012 14:47:00 +0000 (15:47 +0100)]
iropt: fix direct calls to compute_cmp

- The direct call did not respect the get_opt_constant_folding() flag

12 years agoexpose get_opt_constant_folding in public API
Matthias Braun [Thu, 1 Mar 2012 14:46:40 +0000 (15:46 +0100)]
expose get_opt_constant_folding in public API

12 years agoFixed typo.
Sebastian Buchwald [Wed, 29 Feb 2012 13:43:43 +0000 (14:43 +0100)]
Fixed typo.

12 years agoRemove the questionable and unused functions find_value() and r_find_value().
Christoph Mallon [Mon, 27 Feb 2012 13:11:13 +0000 (14:11 +0100)]
Remove the questionable and unused functions find_value() and r_find_value().

12 years agoCorrect comment: The first block in a graph is matured.
Christoph Mallon [Mon, 27 Feb 2012 13:04:20 +0000 (14:04 +0100)]
Correct comment: The first block in a graph is matured.

12 years agoCorrect comments: Remark does not mean what the author thought it means.
Christoph Mallon [Mon, 27 Feb 2012 13:00:43 +0000 (14:00 +0100)]
Correct comments: Remark does not mean what the author thought it means.

12 years agoCorrect comments: pos must be < n_loc, not <=.
Christoph Mallon [Mon, 27 Feb 2012 12:59:54 +0000 (13:59 +0100)]
Correct comments: pos must be < n_loc, not <=.

12 years agoCorrect comment: xvcg wants LF, not CR.
Christoph Mallon [Mon, 27 Feb 2012 12:58:32 +0000 (13:58 +0100)]
Correct comment: xvcg wants LF, not CR.

12 years agoident: remove id_mangle_entity
Matthias Braun [Sun, 19 Feb 2012 15:55:12 +0000 (16:55 +0100)]
ident: remove id_mangle_entity

the ident module shouldn't have name-mangling policies builtin.

12 years agoremove id_decorate_win32_c_fkt
Matthias Braun [Sun, 19 Feb 2012 15:48:52 +0000 (16:48 +0100)]
remove id_decorate_win32_c_fkt

Mangling logic should not be in the ident module, frontends should provide it
(there's also the compilerlib interface for it)

12 years agobegnuas: make panic for tls on macho more clear
Matthias Braun [Sat, 18 Feb 2012 13:09:03 +0000 (14:09 +0100)]
begnuas: make panic for tls on macho more clear

12 years agoia32: fix and optimize bswap sequence on i386
Matthias Braun [Fri, 17 Feb 2012 15:53:56 +0000 (16:53 +0100)]
ia32: fix and optimize bswap sequence on i386

12 years agolower_dw: fix mode mixups, handle ir_bk_bswap
Matthias Braun [Fri, 17 Feb 2012 15:48:27 +0000 (16:48 +0100)]
lower_dw: fix mode mixups, handle ir_bk_bswap

12 years agoNew basic gvnpre implementation.
Christian Helmer [Fri, 17 Feb 2012 13:55:52 +0000 (14:55 +0100)]
New basic gvnpre implementation.

12 years agobe: fix phi constraints double width values
Matthias Braun [Thu, 26 Jan 2012 17:13:44 +0000 (18:13 +0100)]
be: fix phi constraints double width values

12 years agosparc: fix too short Save offsets
Matthias Braun [Thu, 26 Jan 2012 19:11:14 +0000 (20:11 +0100)]
sparc: fix too short Save offsets

We have to perform the stackframe-type alignment adjustments before we
set the immediates of the Save instruction are adjusted.

12 years agosparc: another fix for sparc stack alignment
Matthias Braun [Thu, 26 Jan 2012 17:14:25 +0000 (18:14 +0100)]
sparc: another fix for sparc stack alignment

12 years agosparc: fix float to short conversion
Matthias Braun [Thu, 26 Jan 2012 18:10:47 +0000 (19:10 +0100)]
sparc: fix float to short conversion

12 years agosparc: fix wrong mode on Div result
Matthias Braun [Thu, 26 Jan 2012 17:57:18 +0000 (18:57 +0100)]
sparc: fix wrong mode on Div result

12 years agoirio: do not leave construction mode too early
Matthias Braun [Thu, 9 Feb 2012 17:00:43 +0000 (18:00 +0100)]
irio: do not leave construction mode too early

(otherwise CSE merges temporary Phi nodes without inputs)

12 years agoremove Phi0 concept at some places
Matthias Braun [Thu, 9 Feb 2012 16:57:26 +0000 (17:57 +0100)]
remove Phi0 concept at some places

12 years agoleave -> leaf
Andreas Zwinkau [Fri, 3 Feb 2012 13:56:18 +0000 (14:56 +0100)]
leave -> leaf

One of the green things on plants is a 'leaf'.
A 'leave', would be a vacation.

For the plural of 'leaf', 'leaves' is more common,
but 'leafs' is also correct and more regular.

12 years agosparc: implement float->unsigned conversions
Matthias Braun [Wed, 11 Jan 2012 18:35:05 +0000 (19:35 +0100)]
sparc: implement float->unsigned conversions

12 years agosparc: respect frame_type alignment
Matthias Braun [Wed, 11 Jan 2012 16:18:22 +0000 (17:18 +0100)]
sparc: respect frame_type alignment

This fixes the case where the stackframe size is not a multiple of the
alignment.

12 years agofix frame_alloc_area not always updating alignment
Matthias Braun [Wed, 11 Jan 2012 16:17:26 +0000 (17:17 +0100)]
fix frame_alloc_area not always updating alignment

12 years agocondition instead of assert
Andreas Zwinkau [Wed, 18 Jan 2012 15:27:51 +0000 (16:27 +0100)]
condition instead of assert

12 years agocondition instead of assert
Andreas Zwinkau [Wed, 18 Jan 2012 15:21:51 +0000 (16:21 +0100)]
condition instead of assert

12 years agosched: do not show first->block schedule edge
Matthias Braun [Tue, 10 Jan 2012 12:32:37 +0000 (13:32 +0100)]
sched: do not show first->block schedule edge

12 years agosparc: implement 64bit from/to float conversions
Matthias Braun [Tue, 10 Jan 2012 12:32:03 +0000 (13:32 +0100)]
sparc: implement 64bit from/to float conversions

12 years agolower_dw: respect endianess in Conv builtin funcs
Matthias Braun [Tue, 10 Jan 2012 12:31:16 +0000 (13:31 +0100)]
lower_dw: respect endianess in Conv builtin funcs

12 years agodo not cache types in global variables
Matthias Braun [Tue, 10 Jan 2012 12:10:22 +0000 (13:10 +0100)]
do not cache types in global variables

(or multiple ir_init/ir_finishs will fail)