florian
6ed0a74f54
* compilation fixed
2025-09-15 22:51:24 +02:00
florian
a5b79cc7d7
* handle more inline operations in node_complexity
2025-09-15 22:30:18 +02:00
florian
e0daa4fe84
* fixed a few issues with last merge
2025-09-14 21:21:28 +02:00
Rika Ichinose
d12e8ddd50
Support “in” in node_complexity.
2025-09-14 20:39:48 +02:00
florian
7b2b51e6f3
* fix and simplify twhilerepeatnode.internalsimplify
2025-08-18 22:56:19 +02:00
florian
6b0942166c
* fix type casts
2025-08-18 09:25:38 +02:00
florian
9bff60e270
+ implement while i>0 do ... dec(i); to if i>0 then repeat ... dec(i) until i=0; as proposed by Rika in mr1122
2025-08-17 23:12:27 +02:00
florian
d87ba06608
* improve complexity calculation for tempref nodes
2025-02-15 21:41:57 +01:00
florian
ec76f13bd7
* node_not_zero can be apply to int->int conversion only if no data is cut off
2025-02-09 15:22:44 +01:00
florian
09be204011
+ extend node_not_zero to take range types into account
...
+ aarch64: if no FPC_DIVBYZERO call is needed, div nodes do not generate calls
2025-02-09 10:26:10 +01:00
florian
bcaa58db01
* extend node_not_zero and make more use of it
2025-02-09 09:42:52 +01:00
florian
9cb6497fae
+ function node_not_zero and make use of it
2025-02-08 20:07:20 +01:00
J. Gareth "Curious Kit" Moreton
e2dd3a09dc
* Fixed bug in "node_complexity" where a TLabelNode was put through an invalid typecast.
2024-12-09 19:06:13 +00:00
Rika Ichinose
11d16be702
Add a bound parameter to node_count(_weighted).
2024-11-30 20:04:34 +00:00
Rika Ichinose
2d1ab3410d
Merge foreachnodes into one version that uses a context object.
2024-11-30 20:04:34 +00:00
florian
b8a4a72760
* properly process all child nodes of call nodes in foreachnode, resolves #40957
2024-10-19 23:41:46 +02:00
J. Gareth "Curious Kit" Moreton
a91c1ab627
* Added new node utility function to search for nodes of a specific type in a node tree
2024-10-18 18:26:48 +00:00
florian
dd26c1502c
* estimate complexity of ordconst node better on RiscV
2024-08-26 21:42:51 +01:00
florian
f29ff58ab9
+ get_int_value
2024-04-16 23:11:16 +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
J. Gareth "Curious Kit" Moreton
b804fc5164
* Flags specific to TAddNode have been moved to their own field
2024-03-02 21:31:21 +01:00
florian
3db1415a44
* generate correct dfa for subroutines declared as safecall
2022-11-05 16:56:24 +01:00
florian
5670a7543c
* properly reset nf_write/nf_modify flags for min/max inline nodes, needed by dead store optimization, resolves #39958
...
* factored out nutils.node_reset_pass1_write
2022-10-16 22:51:50 +02:00
florian
e024fdc5d7
* cleanup
2022-09-11 22:43:07 +02:00
florian
f2a5bf17fc
* improves node complexity calculations
2022-08-26 21:53:58 +02:00
Sven/Sarah Barth
2cc621618a
* Delphi-mode calling without parenthesis
2022-05-26 21:43:00 +02:00
florian
e0a1bc6675
+ optimize (a and b) or (c and not(b)) into c xor ((c xor a) and b)
...
+ test
git-svn-id: trunk@48841 -
2021-02-28 18:20:46 +00:00
Jonas Maebe
8ba4c4bcf0
* factored out the creation of loadnodes for special variables/parameters
...
git-svn-id: trunk@47857 -
2020-12-27 13:18:56 +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
57dc416d96
+ replace appropriate if statements by min/max intrinsics
...
+ support min/max intrinsic on xtensa
git-svn-id: trunk@47693 -
2020-12-05 22:00:59 +00:00
pierre
bf5b85e5e5
Also look for function name of 'result' is not found in load_result_node
...
git-svn-id: trunk@47208 -
2020-10-26 14:45:34 +00:00
florian
6fc930a0fc
* better complexity calculation of tvecnodes
...
git-svn-id: trunk@47151 -
2020-10-21 20:46:28 +00:00
Jonas Maebe
a88288bab3
- reverted r46457, accidentally committed (breaks -Oooptcse)
...
git-svn-id: trunk@46459 -
2020-08-16 12:46:21 +00:00
Jonas Maebe
f26735fc77
* execute the tempinitcode whent the tempcreate node gets processed rather
...
than when the first temprefnode to it gets processed. Solves the issue
the foreachnodestatic processes the tempinitcode when seeing the
tempcreatenode and ignores it when seeing temprefnodes, even though
it may actually be executed/generated for the temprefnode. It's
impossible to easily process it for the "correct" temprefnode
(since there may be multiple temprefnodes for the same tempcreatenode)
o fixes tarray12 for Darwin/i386 and Linux/i386
git-svn-id: trunk@46457 -
2020-08-16 12:29:31 +00:00
florian
ff34fb1645
* better complexity handling of mul, slash, div, mod
...
git-svn-id: trunk@46365 -
2020-08-11 18:17:56 +00:00
florian
5da913de0e
* float operations can have an exception as a side effect, resolves #37398
...
git-svn-id: trunk@45824 -
2020-07-21 20:09:39 +00:00
florian
8738b4b47f
+ might_have_sideeffects checks also if the tempinitcode of a tempref node might have side effects
...
git-svn-id: trunk@45656 -
2020-06-17 20:33:04 +00:00
florian
b3817f6d92
* slash and divn might have an exception as side effect
...
git-svn-id: trunk@45652 -
2020-06-14 14:56:48 +00:00
florian
b80d051249
* make fparainit and fparacopyback public
...
+ process fparainit and fparacopyback in foreachnode
+ print fparainit and fparacopyback
+ do not break if tcallparanode.copy_value_by_ref_para is called multiple times
git-svn-id: trunk@45236 -
2020-05-03 20:37:07 +00:00
florian
e3870079b2
* remove tempref mess for simple inlined functions
...
git-svn-id: trunk@45217 -
2020-05-02 09:01:35 +00:00
florian
0f06a7205b
* do not create full copies of objects when object checking is on, resolves #36863
...
git-svn-id: trunk@44598 -
2020-04-05 16:26:10 +00:00
florian
424c8a0ac0
* simple record accesses have not side effects
...
git-svn-id: trunk@44269 -
2020-03-06 16:16:36 +00:00
florian
9819df6fe1
* calculate complexity of an rtti node correctly
...
git-svn-id: trunk@44261 -
2020-03-03 21:29:52 +00:00
florian
5a87855b06
+ might_have_sideeffects takes care of vo_volatile now (it is not exposed yet)
...
git-svn-id: trunk@44085 -
2020-02-01 20:30:15 +00:00
florian
d479069f8c
* might_have_sideeffects takes care of absolute
...
git-svn-id: trunk@44083 -
2020-02-01 18:00:38 +00:00
Jonas Maebe
e1d9be897a
* fixed (harmless) wrong typecast
...
git-svn-id: trunk@43834 -
2020-01-01 19:19:15 +00:00
florian
f6c16323fa
* unified loadnf_load_self_pointer into loadnf_load_addr
...
+ var parameters are now allowed when doing tail recursion optimziation, resolves #32811
git-svn-id: trunk@43824 -
2019-12-30 22:43:10 +00:00
pierre
7eb0be6127
Fix invalid typecast revealed by -CriotR by changing order of terms in boolean expression
...
git-svn-id: trunk@43515 -
2019-11-19 22:47:39 +00:00
florian
851accbb4b
* cse adjusted
...
git-svn-id: trunk@43496 -
2019-11-16 14:07:59 +00:00
Jonas Maebe
d23c7980aa
* properly perform (or not) range/overflow checking when performing constant
...
propagation into inlined routines, regardless of the range/overflow
checking state at the caller site
git-svn-id: trunk@43436 -
2019-11-10 12:00:05 +00:00