Sven/Sarah Barth
7f03fb6966
* revert the changes from b0d61558e3
, as 61397d40ae
fixes it more correctly
2024-04-24 23:13:57 +02:00
florian
2f9ed0576e
* optimize x </>= length(...) also if the operands are swapped
2024-04-18 23:07:40 +02:00
florian
e130557d9f
* optimize x < length(arr) and x >= length(arr) as proposed in #40292
2024-04-17 23:29:13 +02:00
florian
f29ff58ab9
+ get_int_value
2024-04-16 23:11:16 +02:00
florian
2e9556f2eb
+ fold also constant pointer operations on nil nodes
2024-04-15 22:52:32 +02:00
florian
5c46b5116d
+ also fold nil nodes when used as pointer constants
2024-04-13 22:52:46 +02:00
Sven/Sarah Barth
b0d61558e3
* fix #40725 : pass along whole array constructor to the Insert() so that it's converted with the correct checks
...
+ added test
2024-04-12 17:34:58 +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
4100f75056
+ optimize s:=s+[e] into include(s,e)
2024-03-23 21:02:15 +01:00
florian
06fc6f1e6b
* use destination location instead of a temp when constructing sets, resolves #40384
2024-03-22 21:50:42 +01:00
J. Gareth "Curious Kit" Moreton
e1297e0859
* Adjustment to "(v>=x) and (v<=y)" so it also optimises its inverse: "(v<x) or (v>y)"
2024-03-20 21:01:35 +00:00
florian
e35403c3b8
* optimize additions of empty sets away if possible, part of #40384
2024-03-10 10:47:24 +01:00
florian
594d4cc4f9
* transform -1-x into not(x)
2024-03-08 22:42:26 +01:00
florian
59c77a48b5
* transform -x-1 into not(x), resolves #40313
2024-03-05 22:11:32 +01:00
florian
4103b3d180
* formatting
2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
ecc16278f0
* Flags specific to TAssignmentNode have been moved to their own field
2024-03-02 21:31:21 +01: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
6e5860cb87
* check for *-1 multiplications after folding, resolves #40448
2023-11-12 22:30:43 +01:00
Michaël Van Canneyt
3eee2d8ff3
* Do not insert a widestring <-> ansistring conversion node when checking for (un)equal empty string.
2023-07-22 08:26:22 +00:00
Sven/Sarah Barth
c994b5efe8
* fix #39447 : when checking whether the parameters are valid for pointer arithmetic check the *correct* parameter for being valid pointer-like type (I'd say that this was a copy&paste mistake...)
...
+ added test
2023-06-30 17:42:39 +02:00
Nikolay Nikolov
8cd6606970
+ support nil comparison of WebAssembly reference types (externref and funcref)
2023-06-11 07:17:04 +03:00
florian
64319dc019
* PopCount takes care only of the bit pattern, so take the uvalue to avoid an internal error, resolves #40190
2023-03-17 22:30:36 +01:00
J. Gareth "Curious Kit" Moreton
c4899b5dc0
* Dead code in TAddNode.Simplify has been stripped
2023-02-28 20:56:38 +00:00
J. Gareth "Curious Kit" Moreton
487ca08cf3
* In TAddNode.Simplify, commutative operations now ensure integer constant operands go on the right for simplicity
2023-02-28 20:56:38 +00:00
J. Gareth "Curious Kit" Moreton
a5702d89e8
* More complex uses of the pruning methods in TAddNode.Simplify
2023-02-21 20:44:02 +00:00
J. Gareth "Curious Kit" Moreton
9d8fd6d55e
* TAddNode.Simplify now uses pruning methods
2023-02-21 20:44:02 +00:00
florian
09b435cdab
* transform a/a only into 1 if fastmath is on
2023-01-29 13:49:33 +01:00
florian
789031a6e6
* compile float*2 as float+float if possible as proposed by Rika, resolves #40116
2023-01-22 20:07:40 +01:00
florian
30e0df384d
* second part of #40041 fixed
...
+ tests
2022-12-22 22:41:39 +01:00
florian
e0fef23d77
* properly transform a+const1-const2 into a+const1+(-const2), resolves #40041
2022-12-21 22:34:46 +01:00
Sven/Sarah Barth
7a34677b2a
* as long as the type passed into a TypeInfo() is not an undefined or error def the resulting value will always be constant at compile time, so it can be compared to another then no matter if typenode or not
...
+ added tests
2022-12-02 17:47:15 +01:00
florian
1700516721
* cleanup
2022-11-26 23:27:02 +01:00
florian
247423400f
* create muln with create instead of create_internal when converting "n - n mod const)" so pass1 works properly, resolves #40004
2022-11-24 22:43:27 +01:00
Pierre Muller
84be45f55d
Fix compilation failure of RTL with -Co option for x86_64-linux target
2022-11-24 17:01:37 +00:00
Pierre Muller
1a19fe1f03
Use correct class typecast for commit ba4cee279b
2022-11-23 08:43:28 +01:00
florian
0ba4cee279
* convert n-n mod const into n div const*const, resolves #39615
2022-11-22 22:41:58 +01:00
florian
f6a8b045c2
* cosmetics
2022-11-21 22:10:29 +01:00
Sven/Sarah Barth
02aac653d2
* optimize shortstring concatenations if they're on the right side of an assignment to directly use the left side instead of a temporary
2022-10-09 13:56:52 +02:00
Sven/Sarah Barth
32261a0f6d
* fix copy/paste typo in comments
2022-10-09 13:56:52 +02:00
florian
ad7cc0e69d
* handle <dyn.array>+[] (and swapped) correctly, resolves #39919
2022-10-05 22:48:21 +02:00
Jonas Maebe
a6c7ed5e61
vector support: use vector result types
...
Set the result of a vector add node to a vector type.
Ensure that that these vector types are still asignment-compatible with
regular array types (may want to change this when we expose vector types),
and don't remove type conversions from vector types to array types (so the
code generator pass can still rely on the resultdef being a vector type)
2022-09-16 11:21:04 +02:00
Jonas Maebe
cb96acefc9
vector support: check supported type during parsing already
...
Avoids internalerrors at the code generation stage when using an unsupported
type
2022-09-16 11:21:04 +02:00
florian
f9a4631adf
* don't switch a+/-/sqr(b) into an fma statement if b is too complex
2022-08-27 21:22:16 +02:00
florian
f6b5c513bb
* patch by Rika: makes #39786 work on more setups, resolves #39786
2022-07-07 23:00:47 +02:00
florian
fcb5531fbc
* convert a+/-const1-/const2 in into a+/-(-const1)+(-const2) to enable further optimizations, resolves #39782
2022-07-01 23:04:50 +02:00
florian
95dfccbb5e
* do not optimize away +0.0 if no fastmath is passed as -0.0+(+0.0)=+0.0
2022-06-25 21:39:57 +02:00
florian
94665a40d7
* optimize a-const1-const2 when const1 and const2 are real constants and fast math is on, part of fixing #39782
2022-06-17 23:39:17 +02:00
Jonas Maebe
573f2c20d7
taddnode.cmp_of_disjunct_ranges: fortify in case of programs with errors
...
Fixes compilation of webtbf/tw3116 with a compiler compiled with -Cr
2022-05-29 13:33:27 +02:00
Sergey Larin
60c967f255
Optimized the comparison of a widestring variable with ''
2022-04-27 21:12:47 +00:00
Sergey Larin
35db2b2da3
Fixed optimization Length(W)=0
-> (Pointer(W)=nil) or (PLongword(Pointer(W)-4)^=0)
for WideString
2022-04-27 21:12:47 +00:00