libfirm
13 years agogeneralize bittest pattern
Matthias Braun [Thu, 24 Feb 2011 18:41:52 +0000 (19:41 +0100)]
generalize bittest pattern

13 years agodo gigo earlier to avoid optimisations seeing bad inputs with wrong more
Matthias Braun [Thu, 24 Feb 2011 18:17:02 +0000 (19:17 +0100)]
do gigo earlier to avoid optimisations seeing bad inputs with wrong more

13 years agofix a bunch of whitespace errors in headerfiles
Matthias Braun [Thu, 24 Feb 2011 12:00:10 +0000 (13:00 +0100)]
fix a bunch of whitespace errors in headerfiles

13 years agoUse Lea instead of Add in the ia32 transformer.
Christoph Mallon [Thu, 24 Feb 2011 14:30:17 +0000 (14:30 +0000)]
Use Lea instead of Add in the ia32 transformer.

[r28454]

13 years agoia32_Lea cannot use immediates, set the offset instead.
Christoph Mallon [Thu, 24 Feb 2011 14:30:15 +0000 (14:30 +0000)]
ia32_Lea cannot use immediates, set the offset instead.

[r28453]

13 years agofix broken bt instruction after ia32 cc rewrite
Matthias Braun [Thu, 24 Feb 2011 10:29:09 +0000 (10:29 +0000)]
fix broken bt instruction after ia32 cc rewrite

[r28447]

13 years agoFix beabi call sorting
Andreas Zwinkau [Tue, 22 Feb 2011 10:24:27 +0000 (10:24 +0000)]
Fix beabi call sorting

Difference of idx for Calls with no order relation is stable,
but may lead to circular dependencies. Fixed by looking at
the heights first.

Fixes backend/transform_loop.c (with -O0)

[r28436]

13 years agoremove confusing, unused and broken function
Matthias Braun [Mon, 21 Feb 2011 15:52:05 +0000 (15:52 +0000)]
remove confusing, unused and broken function

[r28435]

13 years agoSkip shift dependency if no other users
Andreas Zwinkau [Mon, 21 Feb 2011 15:27:12 +0000 (15:27 +0000)]
Skip shift dependency if no other users

If a shift operation has a dependency operand (64bit shifts),
then instruction selection inserts a dependency edge between them,
so the scheduler orders them correctly. However, if the operand
is not used, the scheduler is confused about the dependency edge, which
is never resolved.

Fixes opt/longlong.c testcase

[r28434]

13 years agoFix opt/fehler180
Andreas Zwinkau [Mon, 21 Feb 2011 12:58:44 +0000 (12:58 +0000)]
Fix opt/fehler180

Respect block dominance in localopt. Node a may not be live in b's block.

[r28430]

13 years agofix wrong usage of ircons functions
Matthias Braun [Mon, 21 Feb 2011 11:44:34 +0000 (11:44 +0000)]
fix wrong usage of ircons functions

[r28426]

13 years agoBugFix: ensure that two ASM nodes are never congruent in combo.
Michael Beck [Fri, 18 Feb 2011 22:44:01 +0000 (22:44 +0000)]
BugFix: ensure that two ASM nodes are never congruent in combo.

Without parsing the text of a ASM node it is not possible to decide whether two
ASM nodes are congruent. Don't even try it.

This fixes testsuite/opt/comboattrs.c

[r28422]

13 years agoRemoved C99 feature, adapt to Firm coding conventions.
Michael Beck [Fri, 18 Feb 2011 22:22:29 +0000 (22:22 +0000)]
Removed C99 feature, adapt to Firm coding conventions.

[r28421]

13 years agoFix opt/git_error.c testcase
Andreas Zwinkau [Fri, 18 Feb 2011 14:24:25 +0000 (14:24 +0000)]
Fix opt/git_error.c testcase

Extend the fix_adds_and_subs pass after strength reduction, which
inserts Convs to make the verifier happy. In case the index
variable is inverted (i=1-i) on each loop iteration, the optimization
may yield a SubP(ConstIu,PhiP), which is rejected by the verifier.

[r28409]

13 years agoFixed iterations broken with size_t refactoring.
Michael Beck [Thu, 17 Feb 2011 22:20:23 +0000 (22:20 +0000)]
Fixed iterations broken with size_t refactoring.

Some iterations must be done backwards.

[r28401]

13 years agoFinally fix the "wrong" assert of r28379.
Michael Beck [Thu, 17 Feb 2011 20:46:37 +0000 (20:46 +0000)]
Finally fix the "wrong" assert of r28379.

Introduce a get_irn_resmode() and use it at all places in combo where the
part of the opcode is meaned.

[r28400]

13 years agoFixes testcase opt/gzip_error
Andreas Zwinkau [Thu, 17 Feb 2011 12:56:12 +0000 (12:56 +0000)]
Fixes testcase opt/gzip_error

The backend sometimes creates ProjM with a temporarily broken pn,
so the verifier must not check them.

[r28392]

13 years agofixed broken builtins and added some comments
Matthias Braun [Thu, 17 Feb 2011 12:52:36 +0000 (12:52 +0000)]
fixed broken builtins and added some comments

[r28391]

13 years agoRevert reversion of r28379. Maybe this way it's clear why the assert was wrong.
Matthias Braun [Thu, 17 Feb 2011 00:13:54 +0000 (00:13 +0000)]
Revert reversion of r28379. Maybe this way it's clear why the assert was wrong.

[r28387]

13 years agoreworked ia32 condition code handling, remove backend Bound support (really someone...
Matthias Braun [Thu, 17 Feb 2011 00:13:53 +0000 (00:13 +0000)]
reworked ia32 condition code handling, remove backend Bound support (really someone should lower it before the backend

[r28386]

13 years agoRevert r28379.
Michael Beck [Wed, 16 Feb 2011 21:08:35 +0000 (21:08 +0000)]
Revert r28379.

This optimization is unsafe and breaks Load-Store-optimization.

It is not enough that both loads are connected by the memory edge,
if one Load has an exception-edge, they cannot be parallelized, because
this would destroy exception order.
load-store-opt handle this case and many others, but expect all
Loads in order yet.
opt_parallelize_mem() does this optimization in a wider range.

[r28385]

13 years agoRevert r28379.
Michael Beck [Wed, 16 Feb 2011 20:56:43 +0000 (20:56 +0000)]
Revert r28379.

All leaders of a partition must have the same opcode, which is the pair
of <irn_opcode, ir_mode> in Firm.

[r28384]

13 years agofix docu
Matthias Braun [Wed, 16 Feb 2011 17:43:15 +0000 (17:43 +0000)]
fix docu

[r28383]

13 years agoimprove bittest normalization
Matthias Braun [Wed, 16 Feb 2011 15:41:29 +0000 (15:41 +0000)]
improve bittest normalization

[r28382]

13 years agonormalize some bittest constructs
Matthias Braun [Wed, 16 Feb 2011 15:39:24 +0000 (15:39 +0000)]
normalize some bittest constructs

[r28381]

13 years agoRemove broken assert
Andreas Zwinkau [Wed, 16 Feb 2011 15:00:19 +0000 (15:00 +0000)]
Remove broken assert

[r28379]

13 years agoNew localopt: parallelize non-volatile loads
Andreas Zwinkau [Wed, 16 Feb 2011 15:00:18 +0000 (15:00 +0000)]
New localopt: parallelize non-volatile loads

[r28378]

13 years agoRemoved: list_sched_single_block
Andreas Zwinkau [Wed, 16 Feb 2011 12:17:16 +0000 (12:17 +0000)]
Removed: list_sched_single_block

Was used by the (removed) ILP scheduler. Dead code now.

[r28377]

13 years agoFurther spread size_t.
Michael Beck [Fri, 11 Feb 2011 15:21:45 +0000 (15:21 +0000)]
Further spread size_t.

[r28375]

13 years agoFixed comments.
Michael Beck [Fri, 11 Feb 2011 15:18:07 +0000 (15:18 +0000)]
Fixed comments.

[r28374]

13 years agoFixed backward iteration using size_t again.
Michael Beck [Fri, 11 Feb 2011 15:17:57 +0000 (15:17 +0000)]
Fixed backward iteration using size_t again.

[r28373]

13 years agouse long for now so at least not half the testsuite is broken
Matthias Braun [Fri, 11 Feb 2011 15:10:15 +0000 (15:10 +0000)]
use long for now so at least not half the testsuite is broken

[r28372]

13 years agotarval_quo has been removed in favor of tarval_div
Matthias Braun [Fri, 11 Feb 2011 15:04:34 +0000 (15:04 +0000)]
tarval_quo has been removed in favor of tarval_div

[r28371]

13 years agoSome size_t related fixes.
Michael Beck [Fri, 11 Feb 2011 14:03:03 +0000 (14:03 +0000)]
Some size_t related fixes.

[r28369]

13 years agoSimplified implementation by removing unused args and impossible conditions.
Michael Beck [Fri, 11 Feb 2011 14:02:53 +0000 (14:02 +0000)]
Simplified implementation by removing unused args and impossible conditions.

There seems to be no "open" methods at all (at least now, this concept seems
to be dead).

[r28368]

13 years agocomparing timesteps in different blocks is pointless and here more conservative than...
Matthias Braun [Fri, 11 Feb 2011 13:52:47 +0000 (13:52 +0000)]
comparing timesteps in different blocks is pointless and here more conservative than necessary

[r28367]

13 years agoAmendment to r28345-r28346.
Michael Beck [Fri, 11 Feb 2011 13:19:11 +0000 (13:19 +0000)]
Amendment to r28345-r28346.

Check for mode int on several places where Div nodes are handled:
- fixed arch_dep_replace_div_by_const() (works for int only)
- fixed constant folding for Div nodes (different for float and int)
- fixed transform_node_Div() (some code pathes allowed only for int)
- fixed comment and one missing check in Div mode verifycation

[r28366]

13 years agoRemoved C99 feature.
Michael Beck [Fri, 11 Feb 2011 13:18:59 +0000 (13:18 +0000)]
Removed C99 feature.

[r28365]

13 years agoWindows has no ssize_t ...
Michael Beck [Fri, 11 Feb 2011 13:18:49 +0000 (13:18 +0000)]
Windows has no ssize_t ...

[r28364]

13 years agoFixed typo.
Sebastian Buchwald [Thu, 10 Feb 2011 12:24:14 +0000 (12:24 +0000)]
Fixed typo.

[r28361]

13 years agoremove Quot node (just use Div instead)
Matthias Braun [Wed, 9 Feb 2011 13:55:18 +0000 (13:55 +0000)]
remove Quot node (just use Div instead)

[r28346]

13 years agoremove DivMod
Matthias Braun [Wed, 9 Feb 2011 13:55:16 +0000 (13:55 +0000)]
remove DivMod

[r28345]

13 years agodo not output no_dead_strip for anonymous entities on macho targets
Matthias Braun [Wed, 9 Feb 2011 13:55:14 +0000 (13:55 +0000)]
do not output no_dead_strip for anonymous entities on macho targets

[r28344]

13 years agorecursively optimize phi to get real minimal SSA-form for reducible CFGs
Matthias Braun [Wed, 9 Feb 2011 13:55:13 +0000 (13:55 +0000)]
recursively optimize phi to get real minimal SSA-form for reducible CFGs

[r28343]

13 years agoebx is no problem with pic when compiling in 64bit (but the pushl+popl are)
Matthias Braun [Wed, 9 Feb 2011 13:55:12 +0000 (13:55 +0000)]
ebx is no problem with pic when compiling in 64bit (but the pushl+popl are)

[r28342]

13 years agotranslate comment to english
Matthias Braun [Wed, 9 Feb 2011 13:55:11 +0000 (13:55 +0000)]
translate comment to english

[r28341]

13 years agofurther spread size_t (all warnings on linux/gcc fixed)
Matthias Braun [Wed, 9 Feb 2011 13:55:10 +0000 (13:55 +0000)]
further spread size_t (all warnings on linux/gcc fixed)

[r28340]

13 years agofix bugs introduced in last commit
Matthias Braun [Wed, 9 Feb 2011 13:55:08 +0000 (13:55 +0000)]
fix bugs introduced in last commit

[r28339]

13 years agoFurther spread size_t.
Michael Beck [Wed, 9 Feb 2011 00:03:31 +0000 (00:03 +0000)]
Further spread size_t.

[r28338]

13 years agofurther spread size_t
Matthias Braun [Tue, 8 Feb 2011 18:08:39 +0000 (18:08 +0000)]
further spread size_t

[r28337]

13 years agoavoid some warnings by not using macros
Matthias Braun [Tue, 8 Feb 2011 18:08:38 +0000 (18:08 +0000)]
avoid some warnings by not using macros

[r28336]

13 years agoHandle some cases of </<=/>=/> comparisons in the fixpoint vrp.
Christoph Mallon [Sun, 6 Feb 2011 18:36:30 +0000 (18:36 +0000)]
Handle some cases of </<=/>=/> comparisons in the fixpoint vrp.

[r28334]

13 years agoAdd a hint about the infamous pn_Cmp_Lg/Ne mixup in the assertion message of verify_n...
Christoph Mallon [Sun, 6 Feb 2011 18:36:27 +0000 (18:36 +0000)]
Add a hint about the infamous pn_Cmp_Lg/Ne mixup in the assertion message of verify_node_Proj_Cmp().

[r28333]

13 years agoProperly check whether sscanf() succeeded.
Christoph Mallon [Sun, 6 Feb 2011 18:36:24 +0000 (18:36 +0000)]
Properly check whether sscanf() succeeded.

[r28332]

13 years agoReplace strcpy()+strcat() song and dance by a single sprintf().
Christoph Mallon [Sun, 6 Feb 2011 18:36:21 +0000 (18:36 +0000)]
Replace strcpy()+strcat() song and dance by a single sprintf().

[r28331]

13 years agoFix several size_t related signed/unsigned warnings.
Christoph Mallon [Sun, 6 Feb 2011 18:36:17 +0000 (18:36 +0000)]
Fix several size_t related signed/unsigned warnings.

[r28330]

13 years agoRemove surplus {}.
Christoph Mallon [Sun, 6 Feb 2011 18:36:10 +0000 (18:36 +0000)]
Remove surplus {}.

[r28329]

13 years agoRemoved unused parameter from_step of be_get_next_use().
Michael Beck [Sun, 6 Feb 2011 15:05:57 +0000 (15:05 +0000)]
Removed unused parameter from_step of be_get_next_use().

Additionally
- switched the type of a visitor counter to ir_visited_t
- add some doxygen docu

[r28328]

13 years agoFixed size_t related warnings by isolating PTR_TO_INT macros.
Michael Beck [Sun, 6 Feb 2011 12:15:30 +0000 (12:15 +0000)]
Fixed size_t related warnings by isolating PTR_TO_INT macros.

Additionally:
- rename some variables to reflect its content
- add some doxygen comments

[r28327]

13 years agoSprinkle const on the in array of node constructors with variable arity.
Christoph Mallon [Sat, 5 Feb 2011 15:40:02 +0000 (15:40 +0000)]
Sprinkle const on the in array of node constructors with variable arity.

[r28310]

13 years agoFixed more size_T related warnings.
Michael Beck [Thu, 3 Feb 2011 21:51:17 +0000 (21:51 +0000)]
Fixed more size_T related warnings.

[r28292]

13 years agoBugFix: when we create a new Conv node in combo's exchange_leader(), this irn has...
Michael Beck [Thu, 3 Feb 2011 21:50:54 +0000 (21:50 +0000)]
BugFix: when we create a new Conv node in combo's exchange_leader(), this irn has no node_t.

When we create a new Conv node in combo's exchange_leader(), this irn has no node_t.
This is ok, replace the original node in a post walker.
However, as the new node has a visited count of 0 it might be revisited
again.
Fix this by copying the visited count.

This fixes testsuite/opt/fehler179.c

[r28291]

13 years agoadd #include <stddef.h>
Julius Neuffer [Thu, 3 Feb 2011 13:48:09 +0000 (13:48 +0000)]
add #include <stddef.h>

[r28289]

13 years agoCorrect typo in comment.
Christoph Mallon [Mon, 31 Jan 2011 10:18:11 +0000 (10:18 +0000)]
Correct typo in comment.

[r28287]

13 years agoRemove pointless assert: size_t nelts is always >= 0.
Christoph Mallon [Mon, 31 Jan 2011 10:18:10 +0000 (10:18 +0000)]
Remove pointless assert: size_t nelts is always >= 0.

[r28286]

13 years agoAdd #include for size_t.
Christoph Mallon [Mon, 31 Jan 2011 10:18:09 +0000 (10:18 +0000)]
Add #include for size_t.

[r28285]

13 years agoMore size_t related changes.
Michael Beck [Sun, 30 Jan 2011 15:23:18 +0000 (15:23 +0000)]
More size_t related changes.

[r28282]

13 years agoAPI change: lower_intrinsics() uses size_t for length now.
Michael Beck [Sun, 30 Jan 2011 15:22:58 +0000 (15:22 +0000)]
API change: lower_intrinsics() uses size_t for length now.

[r28281]

13 years agoSimplyfied firm arrays by deleting useless macro and union.
Michael Beck [Sat, 29 Jan 2011 03:07:07 +0000 (03:07 +0000)]
Simplyfied firm arrays by deleting useless macro and union.

[r28280]

13 years agopdeq_len() returns size_t now, switch the internal types of pdeq to size_t.
Michael Beck [Sat, 29 Jan 2011 00:18:20 +0000 (00:18 +0000)]
pdeq_len() returns size_t now, switch the internal types of pdeq to size_t.

[r28279]

13 years agoFixed size_t related warnings in macros.
Michael Beck [Fri, 28 Jan 2011 01:20:58 +0000 (01:20 +0000)]
Fixed size_t related warnings in macros.

[r28278]

13 years agoFixed firmEvaluator debug build.
Michael Beck [Fri, 28 Jan 2011 01:13:57 +0000 (01:13 +0000)]
Fixed firmEvaluator debug build.

[r28277]

13 years agoFixed more size_t related warnings.
Michael Beck [Fri, 28 Jan 2011 01:13:44 +0000 (01:13 +0000)]
Fixed more size_t related warnings.

[r28276]

13 years agoFixed a lot of size_t related warnings, most of them due to array implementation...
Michael Beck [Mon, 24 Jan 2011 23:31:53 +0000 (23:31 +0000)]
Fixed a lot of size_t related warnings, most of them due to array implementation change.

[r28272]

13 years agoSwitch array to size_t for length parameter ...
Michael Beck [Mon, 24 Jan 2011 23:31:13 +0000 (23:31 +0000)]
Switch array to size_t for length parameter ...

[r28271]

13 years agoFixed broken refactoring of r28264.
Michael Beck [Mon, 24 Jan 2011 23:30:57 +0000 (23:30 +0000)]
Fixed broken refactoring of r28264.

[r28270]

13 years agoFixed size_t issues.
Michael Beck [Mon, 24 Jan 2011 00:27:20 +0000 (00:27 +0000)]
Fixed size_t issues.

[r28268]

13 years agoSwitch pqueue to size_t.
Michael Beck [Mon, 24 Jan 2011 00:27:06 +0000 (00:27 +0000)]
Switch pqueue to size_t.

[r28267]

13 years agoFixed some size_t related warnings.
Michael Beck [Mon, 24 Jan 2011 00:22:16 +0000 (00:22 +0000)]
Fixed some size_t related warnings.

[r28266]

13 years agoFixed wrong type cast spotted by the intel compiler in our portale obstack.h.
Michael Beck [Wed, 19 Jan 2011 23:24:56 +0000 (23:24 +0000)]
Fixed wrong type cast spotted by the intel compiler in our portale obstack.h.

[r28265]

13 years agoAmendment of r28263 which was committed too early.
Michael Beck [Wed, 19 Jan 2011 23:12:39 +0000 (23:12 +0000)]
Amendment of r28263 which was committed too early.

Another interface change: gc_irgs() now gets an size_t parameter.
Additionally fixed a memory leak.

[r28264]

13 years agoFixed more size_t related warnings, one interface change.
Michael Beck [Wed, 19 Jan 2011 22:59:02 +0000 (22:59 +0000)]
Fixed more size_t related warnings, one interface change.

cgana() returns now the lenght of the free_methods array instead of
setting a passed pointer.

[r28263]

13 years agoFixed r28259 which broke hh and h modifier.
Michael Beck [Wed, 19 Jan 2011 22:34:59 +0000 (22:34 +0000)]
Fixed r28259 which broke hh and h modifier.

We must differentiate between the value type and the va_arg type ...

[r28262]

13 years agova_arg must be used with int instead of char/short. All integer arguments are at...
Christoph Mallon [Wed, 19 Jan 2011 13:02:24 +0000 (13:02 +0000)]
va_arg must be used with int instead of char/short.  All integer arguments are at least promoted to int.

[r28259]

13 years agoCorrect signed/unsigned mismatches due to size_t.
Christoph Mallon [Wed, 19 Jan 2011 13:02:23 +0000 (13:02 +0000)]
Correct signed/unsigned mismatches due to size_t.

[r28258]

13 years agoRemove assert, which generates a warning, because a variable of type size_t is always...
Christoph Mallon [Wed, 19 Jan 2011 13:02:21 +0000 (13:02 +0000)]
Remove assert, which generates a warning, because a variable of type size_t is always >= 0.

[r28257]

13 years agoInclude stddef.h for size_t.
Christoph Mallon [Wed, 19 Jan 2011 13:02:19 +0000 (13:02 +0000)]
Include stddef.h for size_t.

[r28256]

13 years agoLet PTR_TO_INT return ptrdiff_t now instead of int.
Michael Beck [Wed, 19 Jan 2011 00:02:20 +0000 (00:02 +0000)]
Let PTR_TO_INT return ptrdiff_t now instead of int.

[r28255]

13 years agoFixed some size_t related warnings.
Michael Beck [Tue, 18 Jan 2011 23:49:31 +0000 (23:49 +0000)]
Fixed some size_t related warnings.

[r28254]

13 years agoSwitched set, pset, eset to size_t, hash remains unsigned.
Michael Beck [Tue, 18 Jan 2011 23:49:12 +0000 (23:49 +0000)]
Switched set, pset, eset to size_t, hash remains unsigned.

[r28253]

13 years agoLet the length of tarval be of type size_t.
Michael Beck [Tue, 18 Jan 2011 21:38:47 +0000 (21:38 +0000)]
Let the length of tarval be of type size_t.

[r28251]

13 years agoadd another special case to begnuas so string-sub-initializer are emitted as .string too
Matthias Braun [Mon, 17 Jan 2011 15:58:56 +0000 (15:58 +0000)]
add another special case to begnuas so string-sub-initializer are emitted as .string too

[r28249]

13 years agoBail out if we do not know how to assemble CPUID.
Christoph Mallon [Mon, 17 Jan 2011 15:38:35 +0000 (15:38 +0000)]
Bail out if we do not know how to assemble CPUID.

[r28248]

13 years agoDo not use b (ebx) as asm constraint, when compiling with __PIC__. GCC cannot handle...
Christoph Mallon [Mon, 17 Jan 2011 15:38:33 +0000 (15:38 +0000)]
Do not use b (ebx) as asm constraint, when compiling with __PIC__.  GCC cannot handle this.

[r28247]

13 years agoRemove NOP-cast.
Christoph Mallon [Mon, 17 Jan 2011 15:38:30 +0000 (15:38 +0000)]
Remove NOP-cast.

[r28246]

13 years agocleanup and simplify phi-construction code
Matthias Braun [Tue, 11 Jan 2011 19:46:48 +0000 (19:46 +0000)]
cleanup and simplify phi-construction code

[r28242]

13 years agoRemoved old and unused support for sorted arrays.
Michael Beck [Sat, 8 Jan 2011 21:33:10 +0000 (21:33 +0000)]
Removed old and unused support for sorted arrays.

[r28241]

13 years agoremove get_irn_modename, get_irn_modeident from public API. It's unclear why we need...
Matthias Braun [Sat, 8 Jan 2011 12:32:25 +0000 (12:32 +0000)]
remove get_irn_modename, get_irn_modeident from public API. It's unclear why we need an explicit combination of get_irn_mode and get_mode_name

[r28240]

13 years agofix doxygen warnings
Matthias Braun [Sat, 8 Jan 2011 12:32:22 +0000 (12:32 +0000)]
fix doxygen warnings

[r28239]

13 years agoautomatically generate node constructor declarations
Matthias Braun [Sat, 8 Jan 2011 12:32:19 +0000 (12:32 +0000)]
automatically generate node constructor declarations

[r28238]