Commit Graph

54 Commits

Author SHA1 Message Date
Jonas Maebe
af2c7bf00f * don't perform CSE on typeconversion nodes inserted for absolute
references, or anything below them (mantis #27210)

git-svn-id: trunk@31193 -
2015-07-04 22:28:31 +00:00
Jonas Maebe
f402b0d7df * changed getpointerdef() into a tpointerdef.getreusable() class method
o allows removing the ugly x86 hacks

git-svn-id: trunk@31144 -
2015-06-22 08:17:49 +00:00
florian
bd6c6d83f8 + do cse on length as well
git-svn-id: trunk@30734 -
2015-04-26 20:11:45 +00:00
Jonas Maebe
86bde57b0f * do not switch around node subtrees if they have different resultdefs, e.g.
because a subtree has been optimized for a 32x32->64 multiplication (so
   some subtrees have a 32 bit resultdef and others a 64 bit resultdef)

git-svn-id: trunk@30033 -
2015-02-28 22:31:00 +00:00
florian
99e1bb32a2 + apply cse to more inline nodes
git-svn-id: trunk@27675 -
2014-04-27 14:28:17 +00:00
florian
7107e9d5ea * do cse on all const. intregable expressions
git-svn-id: trunk@27245 -
2014-03-23 20:11:15 +00:00
florian
25fc10b556 * do not store references to dyn. arrays
git-svn-id: trunk@26741 -
2014-02-09 08:41:51 +00:00
florian
3e4198ea45 * take care of dyn. arrays in cse
git-svn-id: trunk@26740 -
2014-02-08 21:47:46 +00:00
florian
1366498255 + nf_addr_taken: it marks nodes which address is taken
+ check if tnodeflags is 4 bytes or less
* do not do cse on expressions which address is taken

git-svn-id: trunk@26713 -
2014-02-07 20:40:42 +00:00
florian
c5523fc780 * do not search a node tree which has been found being subject to cse further on
git-svn-id: trunk@26691 -
2014-02-06 19:27:11 +00:00
florian
8fba876904 * apply cse to static symbols on x86-64 as well, if their address can be stored
git-svn-id: trunk@26634 -
2014-01-30 20:24:36 +00:00
florian
809549a31f * addr nodes can be also considered in cse
git-svn-id: trunk@26625 -
2014-01-30 17:19:06 +00:00
florian
3a11dd1055 * create the addr node for cse with create_internal to avoid errors when taking the address of a temp.
git-svn-id: trunk@26624 -
2014-01-30 17:19:04 +00:00
florian
1b355ce1e4 * apply cse to all non-regable variables if possible
git-svn-id: trunk@26579 -
2014-01-25 08:50:13 +00:00
florian
4d5119bf1c * fixes several issues which cause warnings by the dfa code when using it to detect uninitialized variables
git-svn-id: trunk@26161 -
2013-12-01 17:02:08 +00:00
florian
b4481544ef * work with actualtargetnode when checking load nodes for cse
git-svn-id: trunk@25434 -
2013-09-07 17:44:44 +00:00
florian
be2ab84474 * make actualtargetnode a normal procedure using pointers to node so it can be used also when replacing nodes
+ replacenode to replace nodes inline

git-svn-id: trunk@25013 -
2013-06-29 22:20:30 +00:00
florian
2c7b34cda1 * don't apply cse on static variables being regable
git-svn-id: trunk@23785 -
2013-03-10 20:29:52 +00:00
paul
5d74e0578a compiler: remove unused variables and unneeded assignments
git-svn-id: trunk@23467 -
2013-01-21 01:24:36 +00:00
florian
4aca018f62 * setelement nodes itself should not be considered, since setelement
nodes generate no code except loading data into registers, this does
  not hurt, resolves #23342

git-svn-id: trunk@23039 -
2012-11-20 21:15:38 +00:00
Jonas Maebe
ae56841ee6 * do not apply node CSE to nested loads on high level cpu targets, because
their nested tree already contains the load (subscriptn) for the variable
    itself and there is no clean/easy way to avoid that in a completely
    portable way in ncgnstld + test

git-svn-id: trunk@22519 -
2012-10-02 18:12:24 +00:00
florian
ca5fabda6d * cleanup some unused units from uses clauses
git-svn-id: trunk@22433 -
2012-09-21 18:53:46 +00:00
florian
a1da9b7710 * better cse handling of short boolean evaluated boolean expressions
git-svn-id: trunk@22369 -
2012-09-10 18:42:50 +00:00
Jonas Maebe
a080669771 * disabled arrayconstructorn,arrayconstructorrangen as cseinvariants
(fixes lazarus compilation)

git-svn-id: trunk@22251 -
2012-08-26 17:59:21 +00:00
florian
1c2ed53735 * updated comments to reflect latest changes to cse
git-svn-id: trunk@22054 -
2012-08-09 20:18:04 +00:00
florian
4d86d25c6c * -O4 switch for optimizations which are correct but which might have unexpected effects
like field reordering (possible problems cracker classes) or using ebp as normal register (broken
      stack traces from dump_stack)
    + niln is also valid in a cse domain
    * parameters passed by reference shall have a complexity >1
    * load nodes from outer scopes shall have a complexity >1
    * better cse debugging
    + more node types added to cse
    * consider parameters passed by reference in cse
    * take care of cse in parameters in simple cases

git-svn-id: trunk@22050 -
2012-08-09 18:58:54 +00:00
florian
03071709a9 * the transformation (a or/and b) or/and c into a or/and (b or/and c) can be applied for booleans as well
git-svn-id: trunk@22041 -
2012-08-08 21:21:45 +00:00
florian
b330bba0bc + introduce -Oofastmath
* limit the application of the tree transformation introduced in r21986 to safe cases and -Oofastmath

git-svn-id: trunk@22040 -
2012-08-08 19:35:45 +00:00
florian
b20c4cfe87 * replace is_written by using actualtargetnode
git-svn-id: trunk@22022 -
2012-08-06 20:26:23 +00:00
florian
405a80066e + cse across assignment operator fixed and enabled
git-svn-id: trunk@22017 -
2012-08-05 20:37:18 +00:00
florian
562a45f2e1 * try to transform the tree to be able to do better cse
git-svn-id: trunk@21986 -
2012-07-29 21:29:07 +00:00
florian
a27cc3e5f2 + be able to handle CSE's of records/arrays/objects
* consider static array/records/object variables during CSE determination on non x86 CPUs

git-svn-id: trunk@21985 -
2012-07-29 17:17:12 +00:00
pierre
ffbf1a7331 * Avoid pointer typecast warning
git-svn-id: trunk@17865 -
2011-06-29 09:54:46 +00:00
florian
1fef7e4b6c + introduces vo_volatile for variables, the node cse optimizer takes care of it
git-svn-id: trunk@16851 -
2011-01-30 16:32:50 +00:00
florian
7199ac4ad7 + apply cse on load parent frame pointer nodes
git-svn-id: trunk@16055 -
2010-09-27 20:54:34 +00:00
pierre
74a4b4cafc * Suppress warnings
git-svn-id: trunk@15896 -
2010-08-24 15:30:36 +00:00
pierre
874e69bcf8 * revert wrong commits
git-svn-id: trunk@15762 -
2010-08-10 11:33:38 +00:00
pierre
d27278faac * Add external linker possibility for windows x86_64 compiler
git-svn-id: trunk@15761 -
2010-08-10 11:28:31 +00:00
florian
84590d67b0 * don't try to create cse on void resultdefs, resolves #16488
git-svn-id: trunk@15363 -
2010-06-03 16:10:02 +00:00
florian
29961c1b8c * don't do cse on simple local/para variables
git-svn-id: trunk@14765 -
2010-01-21 19:30:25 +00:00
florian
89bf2d0257 * cleaned up cse code
git-svn-id: trunk@14692 -
2010-01-17 10:10:41 +00:00
florian
49f9695cf5 * handle short boolean evaluation correctly when doing node cse
git-svn-id: trunk@14691 -
2010-01-17 10:08:37 +00:00
florian
39ec69f690 * contiued to fix node cse, the insertation location for the temp. assignment is still not always correct though
git-svn-id: trunk@14604 -
2010-01-10 22:19:27 +00:00
florian
6b63837ae7 * rewrote node cse, needs still testing and bug fixing
git-svn-id: trunk@14597 -
2010-01-10 13:38:58 +00:00
florian
701d911f58 * continued on node cse
git-svn-id: trunk@14496 -
2009-12-29 19:45:33 +00:00
florian
1632a10305 * search also nested common subexpressions on node level
* don't write stats for a release compiler

git-svn-id: trunk@14494 -
2009-12-29 12:55:17 +00:00
florian
8db40851c0 * fixed some crashes
git-svn-id: trunk@8588 -
2007-09-20 22:28:54 +00:00
florian
ca8d020231 * some node optimizer stuff cleaned up
git-svn-id: trunk@7104 -
2007-04-15 14:41:00 +00:00
Jonas Maebe
0f546da041 * docompare -> isequal
git-svn-id: trunk@6831 -
2007-03-13 21:56:41 +00:00
florian
9f3d43ec09 + more cse invariant nodes added
git-svn-id: trunk@6805 -
2007-03-12 19:47:04 +00:00