Commit Graph

65 Commits

Author SHA1 Message Date
florian
81d24975f0 * properly take care of tempinitcode when calculating def./use. sums of tempcreate nodes 2024-11-25 20:33:54 +01:00
florian
511beac49c * get rid of the hack that tlabelnode inherits from tunarynode and stores a statement in left, resolves #40964 2024-10-26 16:11:24 +02:00
J. Gareth "Curious Kit" Moreton
2b7df4237b * nf_pass1_done, nf_error, nf_processing and nf_do_not_execute
have been moved to a new "transientflags" node field that
    isn't stored in PPU files
2024-03-24 18:14:49 +00:00
florian
bcf320a76e * patch by Rika: Don’t pretend optinfo^.index can be aword(−1), resolves #40405 2024-03-03 22:49:28 +01:00
florian
a27cb35fa8 * propagate life info properly 2022-11-15 22:06:56 +01:00
florian
3b43bd027c * calculate life info for if nodes correctly if the then branch is empty, resolves #39992 2022-11-13 22:28:08 +01:00
florian
1b08b89b7b * check if a target really supports safecall before calling load_safecallresult_node 2022-11-06 16:38:01 +01:00
florian
3db1415a44 * generate correct dfa for subroutines declared as safecall 2022-11-05 16:56:24 +01:00
florian
3fa77a4f62 * fix life information propagation for while loops, resolves #39971
* warnings/errors fixed which are caused by the new life information propagation
  + test
2022-10-24 22:13:43 +02:00
florian
2b48afe151 * check if optinfo is assigned before using it, resolves #39913 2022-10-21 21:14:39 +02:00
florian
98ec81896e * do not throw messages on potentially uninitialized internal symbols, resolves #39744 2022-06-15 23:30:33 +02:00
Rika Ichinose
0634d5349d * add const 2022-01-16 17:24:48 +01:00
Rika Ichinose
92771760b7 Get rid of some global variables. 2022-01-16 17:17:23 +01:00
florian
d0fdda6da7 + TDFABuilder.redodfainfo 2021-10-22 22:39:39 +02:00
florian
b4a6c22234 * do not check inlined exit nodes for unset results, resolves #38259
git-svn-id: trunk@47926 -
2020-12-31 15:52:02 +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
Jonas Maebe
5d51a788f7 - revert r47208
* properly fix the internalerror it hid: only replace the local symbols
    migrated to the parentfpstruct right before generating debug information,
    so that internally generated self/result loads during optimisation passes
    don't get confused by the replacement absolutevarsyms (those are normally
    never encountered during optimisation, as regular absolutevarsyms are
    replaced during parsing)

git-svn-id: trunk@47855 -
2020-12-27 13:18:50 +00:00
florian
3c18dee694 * take care of for loop counter read after loop
git-svn-id: trunk@44042 -
2020-01-26 20:13:18 +00:00
florian
2f2b378c03 * moved conversion of for into while loops in a separate pass, so node optimizations on the node tree can be
carried out without losing information from for loops

git-svn-id: trunk@43910 -
2020-01-11 16:08:45 +00:00
Jonas Maebe
7e51c5e856 * DFA now takes case-completeness into account (mantis #35598)
git-svn-id: trunk@42091 -
2019-05-18 12:01:41 +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
florian
34d11046e0 * wrapcomplexinlinepara takes care of function results which need different temp. handling, resolves #34438
* tw34438 failed with -O3, fixes also dfa for inline functions returning results as "complex" parameter

git-svn-id: trunk@40202 -
2018-11-03 17:31:10 +00:00
florian
b1dff29cbf * removed unused units
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
florian
45807056c5 * factored out SymbolCandidateForWarningOrHint
* do not issue a hint if a normal parameter is passed to another procedure by var
+ test

git-svn-id: trunk@33248 -
2016-03-13 19:14:26 +00:00
yury
b26fa07f1a * Fixed notes "var is assigned but not used".
git-svn-id: trunk@31734 -
2015-09-17 13:03:04 +00:00
florian
c0e66deaf2 * handle raise nodes in dfa on jvm, resolves #27416
git-svn-id: trunk@29641 -
2015-02-07 18:11:02 +00:00
florian
4289dd667d * managed types cause a different warning/hint when they are
used uninitialized, so users can turn off these messages if they want, resolves #24601 and #26403

git-svn-id: trunk@29295 -
2014-12-14 20:48:54 +00:00
florian
c44b5d1043 * take care of tempinitcode when creating def information for tempcreatenodes
git-svn-id: trunk@26581 -
2014-01-25 09:40:51 +00:00
florian
5aae381d10 * as nodes can appear directly in statements for checking of type conversions
git-svn-id: trunk@26195 -
2013-12-08 09:05:28 +00:00
florian
6924cc0458 * optimize CheckAndWarn
git-svn-id: trunk@26164 -
2013-12-01 17:02:17 +00:00
florian
35206c3d93 * make ResetProcessing more efficient
git-svn-id: trunk@26163 -
2013-12-01 17:02:15 +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
92508a9801 * take of life of tlabelnode.left, the test does not test this however because I'am not aware of any example to force a left node for a label
git-svn-id: trunk@26082 -
2013-11-13 19:26:37 +00:00
florian
424d5cafb2 * cleanup
* handling of result node simplified

git-svn-id: trunk@25978 -
2013-11-06 21:11:06 +00:00
florian
722c59bcb1 * use the correct node in CalcLife
git-svn-id: trunk@25976 -
2013-11-06 21:11:01 +00:00
florian
2fc4a7fdd7 * better DFA debugging information
git-svn-id: trunk@25975 -
2013-11-06 21:10:58 +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
63757c84ad * fix life information of block nodes
git-svn-id: trunk@25973 -
2013-11-06 21:10:52 +00:00
florian
1e4737c46d * fix life information of for nodes
git-svn-id: trunk@25972 -
2013-11-06 21:10:50 +00:00
florian
31f3bb900c * fix UpdateLifeInfo if n<>node
git-svn-id: trunk@25971 -
2013-11-06 21:10:48 +00:00
florian
b3c2a8ddb1 * set always resultnode as last node
git-svn-id: trunk@25969 -
2013-11-06 21:10:43 +00:00
florian
0a762e416f * always create a resultnode, also for procedures
git-svn-id: trunk@25968 -
2013-11-06 21:10:40 +00:00
florian
1fb3c2e0c2 * the successor of the last node is the resultnode if one exists
* create def/use info for temp. nodes

git-svn-id: trunk@25967 -
2013-11-06 21:10:38 +00:00
florian
20942d8b45 * fix life information generation of for nodes
git-svn-id: trunk@25966 -
2013-11-06 21:10:34 +00:00
florian
fa8abf7fcb * handle constructors correctly during dfa: the result note must point to self
* handle inline nodes correctly during dfa: they can create/destroy defs

git-svn-id: trunk@25965 -
2013-11-06 21:10:32 +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
5defdf86ba * handle for-loops correctly if the limits contain the counter variable
git-svn-id: trunk@19918 -
2011-12-30 10:54:08 +00:00
florian
9955e6b2bf * dfa fixes by Sergei Gorelkin, resolve #15402
git-svn-id: trunk@14455 -
2009-12-20 21:02:11 +00:00
florian
a537134603 * set result of ResetDFA, resolves #12757
git-svn-id: trunk@12359 -
2008-12-12 21:47:21 +00:00
florian
0b5951fa14 + first full implementation of induction variable strength reduction
git-svn-id: trunk@11805 -
2008-09-18 18:49:09 +00:00