libfirm
16 years agoassure_different_constraints():
Michael Beck [Wed, 21 May 2008 15:09:50 +0000 (15:09 +0000)]
assure_different_constraints():
we can safely IGNORE the should_be_different constraint, iff
we have only one, one should be same and both inputs are identical, for instance in
sbb(x,x)

[r19702]

16 years ago- If-conversion can generate SSE min and max nodes again.
Michael Beck [Tue, 20 May 2008 14:22:57 +0000 (14:22 +0000)]
- If-conversion can generate SSE min and max nodes again.
- preliminary support for If-conversion without Cmov

[r19689]

16 years ago- small code cleanup
Michael Beck [Mon, 19 May 2008 00:14:35 +0000 (00:14 +0000)]
- small code cleanup

[r19661]

16 years agofixed indentation
Michael Beck [Mon, 19 May 2008 00:09:55 +0000 (00:09 +0000)]
fixed indentation

[r19660]

16 years ago- BugFix: sometimes a wrong statistic flag was transmitted
Michael Beck [Mon, 19 May 2008 00:07:42 +0000 (00:07 +0000)]
- BugFix: sometimes a wrong statistic flag was transmitted

[r19659]

16 years ago- BugFix of the last fix ...
Michael Beck [Sun, 18 May 2008 23:48:59 +0000 (23:48 +0000)]
- BugFix of the last fix ...

[r19658]

16 years ago- BugFix: we really have to check both sides independently for (a ^ b) ^ a
Michael Beck [Sun, 18 May 2008 23:46:56 +0000 (23:46 +0000)]
- BugFix: we really have to check both sides independently for (a ^ b) ^ a

[r19657]

16 years agoadd missing DBG_OPT calls
Michael Beck [Sun, 18 May 2008 23:44:40 +0000 (23:44 +0000)]
add missing DBG_OPT calls

[r19656]

16 years agoImplement (a ^ b) ^ a -> b (in all four commutative variants).
Christoph Mallon [Sun, 18 May 2008 20:49:17 +0000 (20:49 +0000)]
Implement (a ^ b) ^ a -> b (in all four commutative variants).

[r19655]

16 years agoAllow safe x/y = x * (1.0/y) for exact 1.0/y even if floating point constant folding...
Michael Beck [Sun, 18 May 2008 14:39:10 +0000 (14:39 +0000)]
Allow safe x/y = x * (1.0/y) for exact 1.0/y even if floating point constant folding is disabled

[r19653]

16 years ago- Removed a big performance hit: The MARKS for visiting a node were
Michael Beck [Sat, 17 May 2008 02:18:31 +0000 (02:18 +0000)]
- Removed a big performance hit: The MARKS for visiting a node were
  previously removed after visiting:
  This could lead to visiting the same subgraph more than once (and
  quadratic runtime), but is not neccessary:
  If a subgraph was once visited, all addresses were already added to
  the set of "free" nodes.
  This fixes the mostly endless runs of the compiler for big methods,
  for instance in 176.gcc/calls.c after running cond_eval.c once more
- BugFix: add missing call to new initializer handling
- BugFix: if a node is exchanged, use the new node (not the Id) for
  further checks
- simplified the code
- fixed indentation

[r19652]

16 years ago- fixed indentation
Michael Beck [Sat, 17 May 2008 01:58:48 +0000 (01:58 +0000)]
- fixed indentation
- use the set_using_irn_link() api
- fixed debugging output
- use is_Call()

[r19651]

16 years agosmall code improvements
Michael Beck [Fri, 16 May 2008 09:28:27 +0000 (09:28 +0000)]
small code improvements

[r19644]

16 years agoBugFix: invalidate more data
Michael Beck [Fri, 16 May 2008 09:19:05 +0000 (09:19 +0000)]
BugFix: invalidate more data

[r19643]

16 years agoBelady optimisation:
Matthias Braun [Thu, 15 May 2008 12:18:08 +0000 (12:18 +0000)]
Belady optimisation:
- don't take delayed nodes too aggressively: if they're already dead in the
  known preds, then we'll only induce unnecessary reloads

[r19629]

16 years agoImprove sorting of roots: place live-out nodes later.
Christoph Mallon [Thu, 15 May 2008 11:19:30 +0000 (11:19 +0000)]
Improve sorting of roots: place live-out nodes later.

[r19628]

16 years agoImproved inline heuristic:
Michael Beck [Thu, 15 May 2008 10:59:38 +0000 (10:59 +0000)]
Improved inline heuristic:
 - inline recursive calls in rary cases only (BIG benefice or all
   arguments constant)
 - change some weights to hopefully better values

[r19625]

16 years agodumps now new style initializers
Michael Beck [Thu, 15 May 2008 10:15:52 +0000 (10:15 +0000)]
dumps now new style initializers

[r19623]

16 years agoBugFix: the spillslot coalescer need the ProjM nodes ...
Michael Beck [Wed, 14 May 2008 12:37:44 +0000 (12:37 +0000)]
BugFix: the spillslot coalescer need the ProjM nodes ...

[r19612]

16 years agotestprogram for the fisttp instruction
Michael Beck [Wed, 14 May 2008 11:29:51 +0000 (11:29 +0000)]
testprogram for the fisttp instruction

[r19610]

16 years agoBugFix: add missing copy
Michael Beck [Wed, 14 May 2008 10:31:19 +0000 (10:31 +0000)]
BugFix: add missing copy

[r19609]

16 years ago- modeled vfisttp using a dummy output value, this should fix the non-working copy...
Michael Beck [Wed, 14 May 2008 10:17:58 +0000 (10:17 +0000)]
- modeled vfisttp using a dummy output value, this should fix the non-working copy hack

[r19608]

16 years ago- don't use inc/dec on core2
Michael Beck [Wed, 14 May 2008 02:18:29 +0000 (02:18 +0000)]
- don't use inc/dec on core2
- add full support for SSE3 vfisttp instruction

[r19607]

16 years agoBugFix:
Michael Beck [Tue, 13 May 2008 23:58:35 +0000 (23:58 +0000)]
BugFix:
- jb is jc, not jae
- at&t syntax uses bt bitnumber, value ...

[r19606]

16 years agoSSE3 fisttp instruction added (currently unused due to RA problems)
Michael Beck [Tue, 13 May 2008 21:44:03 +0000 (21:44 +0000)]
SSE3 fisttp instruction added (currently unused due to RA problems)

[r19605]

16 years ago-BugFix: can not handle values with - in in, needed for instance for ia32-opt=k6-2
Michael Beck [Tue, 13 May 2008 21:04:27 +0000 (21:04 +0000)]
-BugFix: can not handle values with - in in, needed for instance for ia32-opt=k6-2

[r19604]

16 years agoBugFix:loop-info must run on copy
Michael Beck [Tue, 13 May 2008 19:24:58 +0000 (19:24 +0000)]
BugFix:loop-info must run on copy

[r19603]

16 years agoinline_leave_functions(): uses new collect_calls2() and needs loop-info
Michael Beck [Tue, 13 May 2008 19:17:20 +0000 (19:17 +0000)]
inline_leave_functions(): uses new collect_calls2() and needs loop-info

[r19602]

16 years agoallow bt instruction for newer AMD processors
Michael Beck [Tue, 13 May 2008 13:59:57 +0000 (13:59 +0000)]
allow bt instruction for newer AMD processors

[r19599]

16 years agoignore Bad control flow predecessors when calculating the CF loop tree
Michael Beck [Tue, 13 May 2008 13:56:06 +0000 (13:56 +0000)]
ignore Bad control flow predecessors when calculating the CF loop tree

[r19598]

16 years agoadd missing dbg hooks for boolean simplifications
Michael Beck [Mon, 12 May 2008 17:09:15 +0000 (17:09 +0000)]
add missing dbg hooks for boolean simplifications

[r19588]

16 years agotest bt instruction
Michael Beck [Mon, 12 May 2008 14:44:14 +0000 (14:44 +0000)]
test bt instruction

[r19585]

16 years ago- BugFix: added missing test when creating bt instructions
Michael Beck [Mon, 12 May 2008 14:18:24 +0000 (14:18 +0000)]
- BugFix: added missing test when creating bt instructions
- more cases added
- bt instructions leaves other flags undefined

[r19584]

16 years agogenerate bt x,n for if (x & (1 << n)) on Core2:
Michael Beck [Sun, 11 May 2008 13:08:56 +0000 (13:08 +0000)]
generate bt x,n for if (x & (1 << n)) on Core2:
Intel paper Inside_the_Intel_Compiler suggest it

This is probably good for short code and might be even good for newer Athlon machines

[r19580]

16 years ago- BugFix: flags for pad_return
Michael Beck [Sun, 11 May 2008 13:05:40 +0000 (13:05 +0000)]
- BugFix: flags for pad_return
- use_bt added

[r19579]

16 years ago- give bonus to small functions and leaves
Michael Beck [Fri, 9 May 2008 02:40:17 +0000 (02:40 +0000)]
- give bonus to small functions and leaves

[r19572]

16 years agoBugFix: add missing assure_cf_loop() for copy graphs
Michael Beck [Fri, 9 May 2008 02:10:13 +0000 (02:10 +0000)]
BugFix: add missing assure_cf_loop() for copy graphs

[r19571]

16 years ago- improve doxygen comments
Michael Beck [Fri, 9 May 2008 02:01:42 +0000 (02:01 +0000)]
- improve doxygen comments
- simplify code a bit

[r19570]

16 years agoinline_functions now inlines calls inside loops first
Michael Beck [Fri, 9 May 2008 01:56:42 +0000 (01:56 +0000)]
inline_functions now inlines calls inside loops first

[r19569]

16 years agoBugFix r19562: get_nodes_block(skip_Proj(get_irn_n(n,i))) is subtile
Michael Beck [Fri, 9 May 2008 01:49:13 +0000 (01:49 +0000)]
BugFix r19562: get_nodes_block(skip_Proj(get_irn_n(n,i))) is subtile
different from get_Block_cfgpred_block(): the latter might return Bad, while
the first returns the Start block then ...
Strange, but cf loops depend on this which os probably wrong, ARGHH!

[r19568]

16 years agoImprove scheduling: ignore keeps, sort roots by height.
Christoph Mallon [Thu, 8 May 2008 08:53:18 +0000 (08:53 +0000)]
Improve scheduling: ignore keeps, sort roots by height.

[r19563]

16 years ago- added assure_cf_loop()
Michael Beck [Wed, 7 May 2008 23:21:29 +0000 (23:21 +0000)]
- added assure_cf_loop()
- improved doxygen docu
- cleared the code a bit

[r19562]

16 years agoreordered struct for smaller memory print on 64bit
Michael Beck [Wed, 7 May 2008 23:19:08 +0000 (23:19 +0000)]
reordered struct for smaller memory print on 64bit

[r19561]

16 years agodo not count Const/SymConst CSE
Michael Beck [Wed, 7 May 2008 15:35:02 +0000 (15:35 +0000)]
do not count Const/SymConst CSE

[r19554]

16 years ago- add dumping of indirect/external calls
Michael Beck [Wed, 7 May 2008 02:32:30 +0000 (02:32 +0000)]
- add dumping of indirect/external calls
- replace -> by = for better TeX output

[r19542]

16 years agotypos fixed
Michael Beck [Wed, 7 May 2008 01:14:27 +0000 (01:14 +0000)]
typos fixed

[r19541]

16 years agooutputs the layout type for yComp, makes nicer yComp dumps
Michael Beck [Tue, 6 May 2008 21:27:54 +0000 (21:27 +0000)]
outputs the layout type for yComp, makes nicer yComp dumps

[r19539]

16 years ago- add ir_graph to loop element, preventing the ugly casting
Michael Beck [Tue, 6 May 2008 21:24:54 +0000 (21:24 +0000)]
- add ir_graph to loop element, preventing the ugly casting

[r19538]

16 years ago- add ir_graph to loop element, preventing the ugly casting
Michael Beck [Tue, 6 May 2008 21:23:28 +0000 (21:23 +0000)]
- add ir_graph to loop element, preventing the ugly casting

[r19537]

16 years agomark start end end blocks
Michael Beck [Tue, 6 May 2008 13:00:09 +0000 (13:00 +0000)]
mark start end end blocks

[r19531]

16 years agoupdated for new optimization
Michael Beck [Tue, 6 May 2008 12:56:59 +0000 (12:56 +0000)]
updated for new optimization

[r19530]

16 years agomissing entry added
Michael Beck [Mon, 5 May 2008 11:42:16 +0000 (11:42 +0000)]
missing entry added

[r19515]

16 years agoadd a parameter to limit the maximum size of methods when inlining, otherwise some...
Michael Beck [Mon, 5 May 2008 10:46:08 +0000 (10:46 +0000)]
add a parameter to limit the maximum size of methods when inlining, otherwise some files explode

[r19511]

16 years agofixed comment
Michael Beck [Mon, 5 May 2008 10:43:43 +0000 (10:43 +0000)]
fixed comment

[r19510]

16 years agoredo wrong 19491: DIV and IDIV are different
Michael Beck [Sun, 4 May 2008 00:43:18 +0000 (00:43 +0000)]
redo wrong 19491: DIV and IDIV are different

[r19502]

16 years ago- fixed r19477: pin_state MUST be the first attribute
Michael Beck [Sat, 3 May 2008 18:16:43 +0000 (18:16 +0000)]
- fixed r19477: pin_state MUST be the first attribute

[r19499]

16 years agoreduce code size
Michael Beck [Fri, 2 May 2008 20:56:20 +0000 (20:56 +0000)]
reduce code size

[r19491]

16 years ago- reduce lifetime of variables
Michael Beck [Fri, 2 May 2008 19:24:38 +0000 (19:24 +0000)]
- reduce lifetime of variables

[r19490]

16 years ago- reorder if to place cheapest test first
Michael Beck [Fri, 2 May 2008 18:01:21 +0000 (18:01 +0000)]
- reorder if to place cheapest test first
- reduce lifetime of two variables

[r19488]

16 years agouse mode_xmm where appropriate
Michael Beck [Fri, 2 May 2008 00:48:42 +0000 (00:48 +0000)]
use mode_xmm where appropriate

[r19484]

16 years agouse mode_xmm where appropriate
Michael Beck [Thu, 1 May 2008 23:57:25 +0000 (23:57 +0000)]
use mode_xmm where appropriate

[r19483]

16 years ago- transfor xorps r,r and xorpd r,r into pxor on netburst CPU's
Michael Beck [Thu, 1 May 2008 20:32:11 +0000 (20:32 +0000)]
- transfor xorps r,r and xorpd r,r into pxor on netburst CPU's

[r19482]

16 years ago- renamed SymConst num attribute into more logical kind
Michael Beck [Wed, 30 Apr 2008 19:59:49 +0000 (19:59 +0000)]
- renamed SymConst num attribute into more logical kind
- reordered some struct attributes for better 64bit memory layout

[r19477]

16 years agocorrect fix for benode comparison
Matthias Braun [Wed, 30 Apr 2008 12:16:02 +0000 (12:16 +0000)]
correct fix for benode comparison

[r19469]

16 years agoforgot to commit rbitset_requal
Matthias Braun [Wed, 30 Apr 2008 12:07:30 +0000 (12:07 +0000)]
forgot to commit rbitset_requal

[r19468]

16 years agoavoid dangerous use of memcmp
Matthias Braun [Wed, 30 Apr 2008 12:05:02 +0000 (12:05 +0000)]
avoid dangerous use of memcmp

[r19467]

16 years agoadd a comment that memcmp is not hostile here
Michael Beck [Wed, 30 Apr 2008 11:50:20 +0000 (11:50 +0000)]
add a comment that memcmp is not hostile here

[r19466]

16 years agodon't use memcmp for tarval comparison, there might be padding bytes with random...
Matthias Braun [Wed, 30 Apr 2008 11:47:02 +0000 (11:47 +0000)]
don't use memcmp for tarval comparison, there might be padding bytes with random content

[r19465]

16 years agofix 64bit warnings
Michael Beck [Tue, 29 Apr 2008 16:37:50 +0000 (16:37 +0000)]
fix 64bit warnings

[r19454]

16 years agofix 64bit warnings
Michael Beck [Tue, 29 Apr 2008 16:12:15 +0000 (16:12 +0000)]
fix 64bit warnings

[r19451]

16 years agofix 64bit warnings
Michael Beck [Tue, 29 Apr 2008 15:18:36 +0000 (15:18 +0000)]
fix 64bit warnings

[r19450]

16 years agoBugFix: ls_mode must be set to Iu when transforming float stores to int stores
Michael Beck [Tue, 29 Apr 2008 10:03:28 +0000 (10:03 +0000)]
BugFix: ls_mode must be set to Iu when transforming float stores to int stores

[r19431]

16 years agotransform stores of floating point constants into integer stores
Michael Beck [Mon, 28 Apr 2008 19:03:09 +0000 (19:03 +0000)]
transform stores of floating point constants into integer stores

[r19425]

16 years agoWhen transforming floating point constants into load AM, use the mode of the entity...
Christoph Mallon [Mon, 28 Apr 2008 12:04:39 +0000 (12:04 +0000)]
When transforming floating point constants into load AM, use the mode of the entity as ls_mode instead of the mode of the constant node.

[r19412]

16 years ago- when creating a x87 memory constant, check if the constant can be created using...
Michael Beck [Sun, 27 Apr 2008 14:20:05 +0000 (14:20 +0000)]
- when creating a x87 memory constant, check if the constant can be created using less bits without precision loss

[r19406]

16 years ago- added fc_can_lossless_conv_to() / tarval_ieee754_can_conv_lossless()
Michael Beck [Sun, 27 Apr 2008 14:18:26 +0000 (14:18 +0000)]
- added fc_can_lossless_conv_to() / tarval_ieee754_can_conv_lossless()
- BugFix: the buffer REALLY must been cleared in fc_val_from_ieee754()
- replaced the constant 2 by ROUNDING_BITS
- replaced division in exponent bias calculation
- replaced assert(0) by panic()
- add panic when tarval_carry() is used (not fully implemented)
- improved doxygen docu

[r19405]

16 years agoallow Cmp, Neg, Abs for floating point even if no_float is set: these Operations...
Michael Beck [Sat, 26 Apr 2008 17:22:18 +0000 (17:22 +0000)]
allow Cmp, Neg, Abs for floating point even if no_float is set: these Operations should be safe as they cannot produce more mantissa bits

[r19400]

16 years agofixed warning
Michael Beck [Sat, 26 Apr 2008 16:25:15 +0000 (16:25 +0000)]
fixed warning

[r19398]

16 years ago- BugFix:
Michael Beck [Sat, 26 Apr 2008 16:22:36 +0000 (16:22 +0000)]
- BugFix:
when creating vfldz nodes for float unknown, place them after the frame pointer so they could be spilled ...

[r19397]

16 years agoGive some node inputs more meaningful names.
Christoph Mallon [Wed, 23 Apr 2008 12:17:54 +0000 (12:17 +0000)]
Give some node inputs more meaningful names.

[r19369]

16 years agoMove the if-not-AM-input of ia32 Div and IDiv to slot 3 to make it more unop-like.
Christoph Mallon [Wed, 23 Apr 2008 11:58:34 +0000 (11:58 +0000)]
Move the if-not-AM-input of ia32 Div and IDiv to slot 3 to make it more unop-like.

[r19368]

16 years agoSet SVN properties.
Christoph Mallon [Wed, 23 Apr 2008 11:41:59 +0000 (11:41 +0000)]
Set SVN properties.

[r19367]

16 years agoInclude stdlib.h for atoi().
Christoph Mallon [Wed, 23 Apr 2008 11:37:10 +0000 (11:37 +0000)]
Include stdlib.h for atoi().

[r19365]

16 years agoFix logic error in IncSP-to-Push/Pop optimisation, which caused the optimisation...
Christoph Mallon [Tue, 22 Apr 2008 14:51:17 +0000 (14:51 +0000)]
Fix logic error in IncSP-to-Push/Pop optimisation, which caused the optimisation to be performed exactly when it was NOT requested.

[r19361]

16 years agoFix return value of main().
Christoph Mallon [Tue, 22 Apr 2008 14:44:04 +0000 (14:44 +0000)]
Fix return value of main().

[r19359]

16 years agoFix inconsistency between reg_req and ins of Push: reg_req expected the stack in...
Christoph Mallon [Tue, 22 Apr 2008 14:41:59 +0000 (14:41 +0000)]
Fix inconsistency between reg_req and ins of Push: reg_req expected the stack in the fourth place and val as fith, ins said "val" before "stack".  Make the val parameter fourth and stack last to be more consistent with most other AM nodes.

[r19358]

16 years agoPanic when right shifting non-32bit values.
Christoph Mallon [Mon, 21 Apr 2008 14:20:18 +0000 (14:20 +0000)]
Panic when right shifting non-32bit values.

[r19349]

16 years ago- more SSE constants handled by instructions
Michael Beck [Mon, 21 Apr 2008 00:22:07 +0000 (00:22 +0000)]
- more SSE constants handled by instructions

[r19345]

16 years ago- moved the imul mem,imm32 splitting into peephole optimizations
Michael Beck [Sun, 20 Apr 2008 23:49:53 +0000 (23:49 +0000)]
- moved the imul mem,imm32 splitting into peephole optimizations
- instead of issuing a rep ret, issue a ret 0 as recommended in k10 optimization manual

[r19344]

16 years agotypo fixed
Michael Beck [Sun, 20 Apr 2008 23:45:43 +0000 (23:45 +0000)]
typo fixed

[r19343]

16 years agomore SSE constants handled without float_entity
Michael Beck [Sun, 20 Apr 2008 02:20:16 +0000 (02:20 +0000)]
more SSE constants handled without float_entity

[r19341]

16 years ago- add optimisation for size
Michael Beck [Sat, 19 Apr 2008 23:58:08 +0000 (23:58 +0000)]
- add optimisation for size

[r19340]

16 years ago- don't dump alignment 0
Michael Beck [Sat, 19 Apr 2008 23:54:53 +0000 (23:54 +0000)]
- don't dump alignment 0

[r19339]

16 years ago- added alignment_label_max_skip
Michael Beck [Sat, 19 Apr 2008 21:27:14 +0000 (21:27 +0000)]
- added alignment_label_max_skip

[r19338]

16 years agofix r19298: offsets must be fixed for PopMem
Michael Beck [Sat, 19 Apr 2008 21:21:54 +0000 (21:21 +0000)]
fix r19298: offsets must be fixed for PopMem

[r19337]

16 years agosyntay error fixed
Michael Beck [Sat, 19 Apr 2008 17:56:41 +0000 (17:56 +0000)]
syntay error fixed

[r19336]

16 years ago- handle failure of getpwuid() more gracefully
Michael Beck [Sat, 19 Apr 2008 17:55:32 +0000 (17:55 +0000)]
- handle failure of getpwuid() more gracefully

[r19335]

16 years agoalways align blocks if there is no fall-through
Michael Beck [Sat, 19 Apr 2008 17:05:00 +0000 (17:05 +0000)]
always align blocks if there is no fall-through

[r19334]

16 years agoreorganized cpu's, architectures, and features, hopefully more logical now (and possi...
Michael Beck [Sat, 19 Apr 2008 17:03:18 +0000 (17:03 +0000)]
reorganized cpu's, architectures, and features, hopefully more logical now (and possibly better working)

[r19333]

16 years agofixed indentation
Michael Beck [Sat, 19 Apr 2008 12:40:57 +0000 (12:40 +0000)]
fixed indentation

[r19332]