libfirm
16 years agofixed condition for add/sub esp, 4/8
Michael Beck [Wed, 28 May 2008 13:05:48 +0000 (13:05 +0000)]
fixed condition for add/sub esp, 4/8

[r19810]

16 years agobock marker can be dumped in the block title
Michael Beck [Wed, 28 May 2008 11:43:30 +0000 (11:43 +0000)]
bock marker can be dumped in the block title

[r19807]

16 years ago- dump the block mark
Michael Beck [Wed, 28 May 2008 11:36:46 +0000 (11:36 +0000)]
- dump the block mark
- reorder output a bit

[r19806]

16 years ago- added is_Id, is_CallBegin, is_Free
Michael Beck [Wed, 28 May 2008 11:29:40 +0000 (11:29 +0000)]
- added is_Id, is_CallBegin, is_Free
- placed mode #ifdef INTERPROCEDURAL_VIEW
- used is_*(x) fucntions instead of x->op == op_X

[r19805]

16 years ago- added is_Filter()
Michael Beck [Wed, 28 May 2008 10:38:15 +0000 (10:38 +0000)]
- added is_Filter()
- fixed is_Proj() implementation
- improved docu a bit

[r19804]

16 years ago- changed docu uses Phi list instead of links now
Michael Beck [Tue, 27 May 2008 17:10:02 +0000 (17:10 +0000)]
- changed docu uses Phi list instead of links now

[r19803]

16 years agoPhi's are now transmitted as a Phi list, not using links
Michael Beck [Tue, 27 May 2008 17:07:31 +0000 (17:07 +0000)]
Phi's are now transmitted as a Phi list, not using links

[r19802]

16 years agoBugFix: phi node might be exchanged, read the next Phi before this can happen
Michael Beck [Tue, 27 May 2008 15:35:47 +0000 (15:35 +0000)]
BugFix: phi node might be exchanged, read the next Phi before this can happen

[r19801]

16 years ago- BugFix: set the mark on the right block
Michael Beck [Tue, 27 May 2008 15:17:05 +0000 (15:17 +0000)]
- BugFix: set the mark on the right block
- fixed warning
- use get_Block_cfgpred_block() where appropriate

[r19800]

16 years agoadd missing non-inline versions
Michael Beck [Tue, 27 May 2008 14:12:04 +0000 (14:12 +0000)]
add missing non-inline versions

[r19798]

16 years agoBugFix: fixed Phi-list manipulation
Michael Beck [Tue, 27 May 2008 13:45:31 +0000 (13:45 +0000)]
BugFix: fixed Phi-list manipulation

[r19797]

16 years agoredo r19786, peculiarity has been fixed in the cparser FE
Michael Beck [Tue, 27 May 2008 13:42:08 +0000 (13:42 +0000)]
redo r19786, peculiarity has been fixed in the cparser FE

[r19796]

16 years agoneed includes for alloca
Matthias Braun [Tue, 27 May 2008 12:52:41 +0000 (12:52 +0000)]
need includes for alloca

[r19794]

16 years agoremove a too strict check, we can have local function entites with no irg assigned...
Matthias Braun [Tue, 27 May 2008 11:44:59 +0000 (11:44 +0000)]
remove a too strict check, we can have local function entites with no irg assigned (its not useful but perfectly legal in many languages)

[r19786]

16 years agomake verifier a bit less strict about keeps
Matthias Braun [Tue, 27 May 2008 11:27:26 +0000 (11:27 +0000)]
make verifier a bit less strict about keeps

[r19784]

16 years agodo an upconv instead of panic when we do <32bit right shifts
Matthias Braun [Tue, 27 May 2008 11:24:14 +0000 (11:24 +0000)]
do an upconv instead of panic when we do <32bit right shifts

[r19783]

16 years agobuild a keep behind each pop to avoid double register warnings
Matthias Braun [Tue, 27 May 2008 07:27:57 +0000 (07:27 +0000)]
build a keep behind each pop to avoid double register warnings

[r19780]

16 years agoadd some comments, small cosmetic
Michael Beck [Mon, 26 May 2008 14:29:40 +0000 (14:29 +0000)]
add some comments, small cosmetic

[r19777]

16 years agosmall BugFix
Michael Beck [Mon, 26 May 2008 14:09:21 +0000 (14:09 +0000)]
small BugFix

[r19776]

16 years agomust use Lg, not Ne to check for !=
Michael Beck [Mon, 26 May 2008 14:01:02 +0000 (14:01 +0000)]
must use Lg, not Ne to check for !=

[r19775]

16 years agouse block Phi lists and Block marks to get rid of block_info_t
Michael Beck [Mon, 26 May 2008 13:50:30 +0000 (13:50 +0000)]
use block Phi lists and Block marks to get rid of block_info_t

[r19774]

16 years agoadd *_Block_mark() api to mark easily Blocks in the graph
Michael Beck [Mon, 26 May 2008 13:37:27 +0000 (13:37 +0000)]
add *_Block_mark() api to mark easily Blocks in the graph

[r19773]

16 years agoused new add_Block_phi()
Michael Beck [Mon, 26 May 2008 12:59:43 +0000 (12:59 +0000)]
used new add_Block_phi()

[r19772]

16 years agotypo fixed
Michael Beck [Mon, 26 May 2008 12:57:14 +0000 (12:57 +0000)]
typo fixed

[r19771]

16 years agoadd_Block_phi() implemented
Michael Beck [Mon, 26 May 2008 12:56:20 +0000 (12:56 +0000)]
add_Block_phi() implemented

[r19770]

16 years agoC99 features removed
Michael Beck [Mon, 26 May 2008 12:21:21 +0000 (12:21 +0000)]
C99 features removed

[r19769]

16 years agofix a few warnings
Matthias Braun [Sun, 25 May 2008 09:39:18 +0000 (09:39 +0000)]
fix a few warnings

[r19760]

16 years agocommit the beginning of advanced boolopt (had that laying around for months now ...
Matthias Braun [Sun, 25 May 2008 09:30:08 +0000 (09:30 +0000)]
commit the beginning of advanced boolopt (had that laying around for months now - so before it gets lost...)

[r19759]

16 years agoSpecial handling seems not to work, remove critical edges in advance
Michael Beck [Sun, 25 May 2008 03:52:05 +0000 (03:52 +0000)]
Special handling seems not to work, remove critical edges in advance

[r19758]

16 years agoget rid of most Optimisation warning: found add/sub with const
Michael Beck [Sun, 25 May 2008 03:42:19 +0000 (03:42 +0000)]
get rid of most Optimisation warning: found add/sub with const

[r19757]

16 years agoadd Christoph's loop test
Michael Beck [Sun, 25 May 2008 02:26:31 +0000 (02:26 +0000)]
add Christoph's loop test

[r19755]

16 years ago- simplified get_effective_use_block()
Michael Beck [Sun, 25 May 2008 02:23:07 +0000 (02:23 +0000)]
- simplified get_effective_use_block()
- add support for mode_b nodes:
  - propagate true/false
  - create Phi's at dominance frontier for cond_eval()

[r19754]

16 years ago- do not optimize away Confirms with Constants
Michael Beck [Sun, 25 May 2008 02:14:38 +0000 (02:14 +0000)]
- do not optimize away Confirms with Constants

[r19753]

16 years ago- can now handle const-like Confirms
Michael Beck [Sun, 25 May 2008 02:12:18 +0000 (02:12 +0000)]
- can now handle const-like Confirms

[r19752]

16 years agoimproved test: added new Confirm/cond_eval combination
Michael Beck [Sun, 25 May 2008 02:10:49 +0000 (02:10 +0000)]
improved test: added new Confirm/cond_eval combination

[r19751]

16 years agoarch_env_* macros updated
Michael Beck [Sat, 24 May 2008 16:55:57 +0000 (16:55 +0000)]
arch_env_* macros updated

[r19750]

16 years agoallocate all op attributes on block instead of a lot of malloc calls
Michael Beck [Sat, 24 May 2008 16:35:45 +0000 (16:35 +0000)]
allocate all op attributes on block instead of a lot of malloc calls

[r19749]

16 years ago- no need to add two custom pointers: the tag is now simply a 32bit number, typically...
Michael Beck [Sat, 24 May 2008 16:22:08 +0000 (16:22 +0000)]
- no need to add two custom pointers: the tag is now simply a 32bit number, typically a FOURCC code

[r19748]

16 years agoWhen testing whether generating a Psi is allowed, check whether the mode of the compa...
Christoph Mallon [Sat, 24 May 2008 10:11:27 +0000 (10:11 +0000)]
When testing whether generating a Psi is allowed, check whether the mode of the compared values is <= 32 bit in the case when cmov is disallowed, too. (improved Matze's accidental  commit)

[r19747]

16 years agonormalize/fix ProjM numbers, avoid dead code in some instances
Matthias Braun [Sat, 24 May 2008 10:08:26 +0000 (10:08 +0000)]
normalize/fix ProjM numbers, avoid dead code in some instances

[r19746]

16 years agowe can have mode_b inputs to Convs as well (I hope this fix is correct...)
Matthias Braun [Sat, 24 May 2008 10:05:20 +0000 (10:05 +0000)]
we can have mode_b inputs to Convs as well (I hope this fix is correct...)

[r19745]

16 years agosmall improvements: cache different environment members in local variables
Michael Beck [Fri, 23 May 2008 21:28:11 +0000 (21:28 +0000)]
small improvements: cache different environment members in local variables

[r19744]

16 years ago- not really necessary, but makes the array size again as big as it was before iro_La...
Michael Beck [Fri, 23 May 2008 21:09:55 +0000 (21:09 +0000)]
- not really necessary, but makes the array size again as big as it was before iro_Last was reduced

[r19743]

16 years ago- removed C99 features
Michael Beck [Fri, 23 May 2008 21:08:55 +0000 (21:08 +0000)]
- removed C99 features
- set be_ops only once
- do not overwrite already set be_ops

[r19742]

16 years agoBugFix: wrong condition for Abs (this fixes Queens.c)
Michael Beck [Fri, 23 May 2008 21:07:30 +0000 (21:07 +0000)]
BugFix: wrong condition for Abs (this fixes Queens.c)

[r19741]

16 years ago- Aus arch_isa_t wird arch_env_t sonst ändert sich nix...
Matthias Braun [Fri, 23 May 2008 19:04:09 +0000 (19:04 +0000)]
- Aus arch_isa_t wird arch_env_t sonst ändert sich nix...

[r19740]

16 years agowe don't need no stinking selfs
Matthias Braun [Fri, 23 May 2008 17:52:54 +0000 (17:52 +0000)]
we don't need no stinking selfs

[r19739]

16 years ago- arch_get_irn_ops simplified
Matthias Braun [Fri, 23 May 2008 17:37:30 +0000 (17:37 +0000)]
- arch_get_irn_ops simplified
- removed arch_irn_handler stuff

[r19738]

16 years agoRemoved the irn_handler stack.
Michael Beck [Fri, 23 May 2008 14:48:27 +0000 (14:48 +0000)]
Removed the irn_handler stack.

[r19733]

16 years agoRemoved the arch_irn_handler_t. This was just an additional redirection without
Michael Beck [Fri, 23 May 2008 14:25:50 +0000 (14:25 +0000)]
Removed the arch_irn_handler_t. This was just an additional redirection without
greater function...

[r19732]

16 years agocheck for Cmp nodes before doing doz
Michael Beck [Thu, 22 May 2008 03:04:27 +0000 (03:04 +0000)]
check for Cmp nodes before doing doz

[r19721]

16 years ago- normalize Muxes a bit: this hopefully improves the code a bit
Michael Beck [Thu, 22 May 2008 02:44:36 +0000 (02:44 +0000)]
- normalize Muxes a bit: this hopefully improves the code a bit

[r19720]

16 years agouse is_Const()
Michael Beck [Thu, 22 May 2008 02:42:10 +0000 (02:42 +0000)]
use is_Const()

[r19719]

16 years agomissing goto added
Michael Beck [Thu, 22 May 2008 01:37:58 +0000 (01:37 +0000)]
missing goto added

[r19718]

16 years ago- add more Mux optimization cases
Michael Beck [Thu, 22 May 2008 01:12:09 +0000 (01:12 +0000)]
- add more Mux optimization cases
- clarify some comments

[r19717]

16 years agofixed warnings
Michael Beck [Wed, 21 May 2008 23:56:32 +0000 (23:56 +0000)]
fixed warnings

[r19716]

16 years ago- placed phi_handler into the be_main environment, removing unnecessary allocations
Michael Beck [Wed, 21 May 2008 20:50:35 +0000 (20:50 +0000)]
- placed phi_handler into the be_main environment, removing unnecessary allocations

[r19715]

16 years ago- BugFix: replaced wrong cast by right code (no crash because offset is 0)
Michael Beck [Wed, 21 May 2008 20:29:28 +0000 (20:29 +0000)]
- BugFix: replaced wrong cast by right code (no crash because offset is 0)

[r19714]

16 years agotypos fixed
Michael Beck [Wed, 21 May 2008 19:13:40 +0000 (19:13 +0000)]
typos fixed

[r19713]

16 years ago- fixed doxygen comments
Michael Beck [Wed, 21 May 2008 19:12:42 +0000 (19:12 +0000)]
- fixed doxygen comments
- replaced O(n) test by O(1) test
- simplified code

[r19712]

16 years ago- beo_* Opcodes are now defined in irop.h, and no more dynamically allocated
Michael Beck [Wed, 21 May 2008 19:06:34 +0000 (19:06 +0000)]
- beo_* Opcodes are now defined in irop.h, and no more dynamically allocated
- simplified be_node_classify()

[r19711]

16 years ago- add a flag to allow 2 users when matching address mode: needed for Psi nodes
Michael Beck [Wed, 21 May 2008 15:11:46 +0000 (15:11 +0000)]
- add a flag to allow 2 users when matching address mode: needed for Psi nodes
- create code for unsigned Doz (a - b < 0 ? 0 : a - b)

[r19704]

16 years agotypos fixed
Michael Beck [Wed, 21 May 2008 15:10:20 +0000 (15:10 +0000)]
typos fixed

[r19703]

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]