Commit Graph

34 Commits

Author SHA1 Message Date
Rika Ichinose
92771760b7 Get rid of some global variables. 2022-01-16 17:17:23 +01:00
florian
3cf00af48d * compilation with -Oodfa fixed 2022-01-04 16:12:17 +01:00
florian
2b7c28e41a * (modified) patch by Rika: optutils.SetNodeSucessors improvement, resolves #39509 2022-01-04 16:04:38 +01:00
florian
a988c0fab1 * explicitly reset successor if noreturn is set
git-svn-id: trunk@49487 -
2021-06-06 20:33:09 +00:00
florian
edfbf2ce30 * correctly handle inlined exits in dfa, resolves #38259
git-svn-id: trunk@47894 -
2020-12-29 22:35:33 +00:00
florian
aabd7c7217 * more fixes for loop strength reduction
git-svn-id: trunk@43912 -
2020-01-11 20:37:05 +00:00
florian
30e186be78 * renamed sum -> defsum to avoid confusion with usesum
git-svn-id: trunk@43905 -
2020-01-10 21:34:30 +00:00
florian
b5659df425 + CalcUseSum: calculates a sum of all use sets of the current node and its children
git-svn-id: trunk@43904 -
2020-01-10 21:34:29 +00:00
Jonas Maebe
ba1b4b1c92 + support for verifying whether a case statements handles all possibilities
(based on patch by Martok)
   o enabled by default in ISO and Extended Pascal: compile-time error if not
     the case in ISO mode, warning and run-time error in Extended Pascal mode
   o warning enabled by default in all other modes for boolean, enumeration and
     subrange integer types with ranges different from the default ones
     (i.e., different from 0..255, -128..127, 0..65536, etc)
   o warnings for all ordinal types can be enabled in all modes with
     -CC

git-svn-id: trunk@42047 -
2019-05-12 14:29:11 +00:00
Jonas Maebe
281b3ad276 * fix case completeness and unreachable code warnings in compiler that would
be introduced by the next commit

git-svn-id: trunk@42046 -
2019-05-12 14:29:03 +00:00
Jonas Maebe
170ec00348 - removed withnode (was no longer used since a very long time)
git-svn-id: trunk@40777 -
2019-01-05 22:28:37 +00:00
pierre
8cd55d4603 Use longint type instead of AWord for Initial parameter in CalcExecutionWeigths (to avoid range error for avr compiler)
git-svn-id: trunk@40104 -
2018-10-31 10:21:51 +00:00
yury
bf4eda478d * SetExecutionWeight(): Set execution weight also for nodes with special handling. Minor code cleanup/improvements.
* Restore previous execution weight before exiting secondpass().
* It all improves register allocation for variables inside loops in some cases.

git-svn-id: trunk@40059 -
2018-10-27 18:13:33 +00:00
florian
75251913b1 * properly pass execution weight in SetExecutionWeight
git-svn-id: trunk@39622 -
2018-08-16 20:45:36 +00:00
florian
5dda0f5c74 * patch by Pierre to fix warnings which prevent cross building
git-svn-id: trunk@38719 -
2018-04-09 19:01:02 +00:00
florian
f08d3fdf8f * moved execution weight calculation into a separate pass, so the info is available already available before the code generation pass if needed
git-svn-id: trunk@38717 -
2018-04-08 20:51:27 +00:00
florian
730a3c2666 + PrintNodeDFA writes also the defsum
git-svn-id: trunk@33243 -
2016-03-13 18:19:52 +00:00
florian
b1ee6f282c * set successor node for load nodes as well, they can be generated when inlining
git-svn-id: trunk@26296 -
2013-12-28 20:19:38 +00:00
florian
99eadb91b3 * run CheckAndWarn to get proper locations for warnings about uninitialized variables
* several fixes to liveness analysis
* get rid of old version defines
+ tests

git-svn-id: trunk@26159 -
2013-12-01 17:01:51 +00:00
florian
89f34965e9 * fix dfa of for nodes, loopiteration node introduced to get proper life information for the loop
git-svn-id: trunk@25974 -
2013-11-06 21:10:55 +00:00
florian
1f05011113 * set successor of blocknodes properly
git-svn-id: trunk@25970 -
2013-11-06 21:10:45 +00:00
florian
b3c2a8ddb1 * set always resultnode as last node
git-svn-id: trunk@25969 -
2013-11-06 21:10:43 +00:00
florian
0af7a6f92c + has_life_info
* successor info for for nodes fixed

git-svn-id: trunk@24899 -
2013-06-14 20:52:40 +00:00
florian
709ba5e053 + introduce cnf_call_never_returns to signal the dfa if a call node never returns
* get rid of  tcgraisenode.pass_generate_code, it is replaced by compiler proc. call nodes generated in pass_1

git-svn-id: branches/i8086@24288 -
2013-04-21 16:53:25 +00:00
florian
db196d76c2 + strength reduction for array accesses inside for loops
* export get_mul_size so we can use it for strength reduction
* ensure loop counter is marked as being written
* typos fixed

git-svn-id: trunk@11825 -
2008-09-26 18:23:31 +00:00
florian
61dbf89bdb * set successor properly for for-nodes
+ CalcDefSum

git-svn-id: trunk@11804 -
2008-09-18 18:33:43 +00:00
florian
63b35fdb2e + give more sophisticated warnings about uninitalized variables when life info is available
git-svn-id: trunk@7562 -
2007-06-03 17:35:48 +00:00
florian
2761b9e096 * life info generation works for the whole compiler if exception catching blocks are ignored
git-svn-id: trunk@7561 -
2007-06-03 16:37:59 +00:00
florian
496d73dc9d + dfa for more node types
git-svn-id: trunk@7560 -
2007-06-03 10:33:50 +00:00
florian
d469e3a7ef + do life dfa for exit
git-svn-id: trunk@7299 -
2007-05-07 20:30:19 +00:00
florian
62d54389c8 + life dfa for if, label and goto
git-svn-id: trunk@7297 -
2007-05-07 19:14:21 +00:00
florian
45cda67f3f + first basically working (not all node types yet) dfa implementation determining life information
git-svn-id: trunk@7294 -
2007-05-06 21:33:39 +00:00
florian
867e00dee3 * backup commit of more dfa stuff
git-svn-id: trunk@7287 -
2007-05-06 10:59:09 +00:00
florian
87bdf13f9f + first draft for dfa
git-svn-id: trunk@7282 -
2007-05-05 20:50:09 +00:00