J. Gareth "Curious Kit" Moreton
9077954762
* "no_exit_statement_in_block" replaced with "not has_child_of_type(..., [exitn])"
2024-10-18 18:26:48 +00:00
J. Gareth "Curious Kit" Moreton
59ff8a0f65
* Node-stripping optimisation in "TBlockNode.simplify" now uses "has_child_of_type" to determine stop point
2024-10-18 18:26:48 +00:00
J. Gareth "Curious Kit" Moreton
ac0e641ce7
* Stripped down and refactored TAsmNode XML node dumps
...
for better platform-specific implementations.
2024-05-30 20:04:11 +00:00
florian
1e3865a187
* patch by rasberryrabbit to resolve #40761
2024-05-09 20:41:58 +02:00
J. Gareth "Curious Kit" Moreton
e7145f5f7c
* Blocks of statements are now pruned (within reason) if a raise, exit, break, continue or goto node is found
2024-05-05 20:46:30 +00:00
Michaël Van Canneyt
1e9e533e6c
* Replace object with record where possible
2024-05-04 16:44:32 +02:00
J. Gareth "Curious Kit" Moreton
edc1c79cbb
* Bug fix where copied block nodes didn't inherit the original's flags
2024-05-03 21:13:43 +00:00
J. Gareth "Curious Kit" Moreton
ac3425a14d
* Only perform the block flattening if "forinline" is true or under -O2 and above
2024-04-29 18:17:55 +00:00
J. Gareth "Curious Kit" Moreton
63e8633262
* New block node optimisation that attempts to
...
flatten nested blocks (makes labels and later
optimisation more efficient).
2024-04-29 18:17:55 +00:00
J. Gareth "Curious Kit" Moreton
5a9d4d44fa
* Calling "internalstatements" now sets the "bnf_strippable" flag on the result
2024-04-29 18:17:55 +00:00
J. Gareth "Curious Kit" Moreton
060a7185ab
* Framework for more complex block node simplification
2024-04-29 18:17:55 +00:00
J. Gareth "Curious Kit" Moreton
5605566e42
* Added field to identify blocknodes that wrap entire subroutines
2024-04-29 18:17:55 +00: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
4103b3d180
* formatting
2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
0e5da37533
* Flags specific to TAsmNode have been moved to their own field
2024-03-02 21:31:21 +01:00
J. Gareth "Curious Kit" Moreton
7854152304
* Adjustment to TBLockNode.pass_1 to actually strip nothing nodes
2023-03-03 21:07:31 +00:00
Sven/Sarah Barth
e050a019a2
* fix #29859 : ensure that it's correctly passed down into generate_specialization whether a unit name was provided for the specialization and if so search the generic only in that unit
...
+ added tests
2022-10-28 17:40:53 +02:00
Jonas Maebe
3e98429418
Revert " * patch by J. Gareth Moreton: Nothing (NOP) node optimisation, resolves #38194 "
...
This reverts commit c2ff85ac5b
.
That change duplicates the logic of tstatementnode.simplify in
tblocknode.simpify in a very complex way, and in case of issue #39336 results
in adding a non-tstatementnode in a tblocknode, which is illegal. If
tstatementnode.simplify cannot catch all cases, then that one should
preferably be improved instead (and if not possible, we can look into
catching those edge cases in tblocknode.simplify rather than duplicating
everything).
Resolves issue #39336
2021-09-25 21:02:29 +02:00
florian
c2ff85ac5b
* patch by J. Gareth Moreton: Nothing (NOP) node optimisation, resolves #38194
...
git-svn-id: trunk@49054 -
2021-03-25 21:51:52 +00:00
yury
64c586b86d
* Removed/ifdefed lots of unused variables.
...
git-svn-id: trunk@48384 -
2021-01-24 12:24:01 +00:00
florian
85afaf5289
* patch by J. Gareth Moreton: Unitialized result variable fix on non-x86 debug builds, resolves #38371
...
git-svn-id: trunk@48221 -
2021-01-19 21:04:41 +00:00
florian
089e13396a
* ensure that changed compiler options do not cause values
...
ending up in registers which cannot be hold in registers
git-svn-id: trunk@47415 -
2020-11-14 18:40:58 +00:00
florian
637976e83f
* patch by Marģers to unify internal error numbers, resolves #37888
...
git-svn-id: trunk@47103 -
2020-10-13 19:59:01 +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
2500f8432f
* ti_const must be part of tempinfostoreflags as well
...
+ more detailed output in ttempcreatenode.printnodedata
git-svn-id: trunk@46274 -
2020-08-05 21:15:31 +00:00
florian
62c417c8bf
* temporarily fix #37034 by disabling the problematic optimization until the real cause is fixed
...
git-svn-id: trunk@45655 -
2020-06-15 19:57:39 +00:00
florian
84a1f614d9
* fix several double ;
...
git-svn-id: trunk@45488 -
2020-05-24 17:52:09 +00:00
florian
de805fddcd
* properly force the result type after r45217
...
git-svn-id: trunk@45220 -
2020-05-02 12:33:46 +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
9dd25d836d
* include ti_nofini in tempinfostoreflags
...
git-svn-id: trunk@44096 -
2020-02-02 14:30:46 +00:00
Jonas Maebe
ac1e0f96bd
* replaced tentryfile.get/putsmall/normalset() with a common tget/putset
...
that expects an open array of byte, and use it for all sets
o since all sets need to be typecasted to an array type of the appropriate
size, we'll get a compilation error in case this needs to be done and
that also tells us at the same time that the ppu version will need to
be increased
* enabled {$packset 1} for the compiler, as this is now safe with the above
changes
git-svn-id: trunk@43407 -
2019-11-06 21:50:19 +00:00
Jonas Maebe
0f57327bff
* maybereplacewithtemp/maybereplacewithtempref: also create a temp in case
...
of possible side effects
git-svn-id: trunk@42338 -
2019-07-07 21:33:36 +00:00
Jonas Maebe
0a91fcb44f
* LLVM-specific support for bsr*/bsf*
...
git-svn-id: trunk@42309 -
2019-06-29 16:27:18 +00:00
pierre
243c967967
Commit of new debug feature implemented by J. Gareth Moreton
...
Allows compilation of compiler using -dDEBUG_NODE_XML
which will generate a NAME-node-dump.xml file for each
unit, program or library compiled,
containing a XML description of the nodes handled during
compilation of the unit, program or library.
git-svn-id: trunk@42271 -
2019-06-22 14:08:47 +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
yury
e5c2d13671
* Do not set pi_needs_got in current_procinfo.flags at the node level, since the GOT usage can only be estimated there. Instead set the pi_needs_got flag at places where the GOT register is accessed during the code generation. This eliminates generation of the unneeded initialization of the GOT register and fixes linker errors when the _GLOBAL_OFFSET_TABLE_ symbol is referenced but no actual GOT references are present.
...
git-svn-id: trunk@41460 -
2019-02-25 13:35:40 +00:00
Jonas Maebe
ea69a5b372
* finalizetemps nodes should never be considered equal and have side effects
...
git-svn-id: trunk@40348 -
2018-11-18 11:07:28 +00:00
Jonas Maebe
3b9f5a5e96
* moved finalization of code generator temps to a node, so it can be getcopy'd
...
(needed for LLVM, where we need two copies of the finally code: one in case
an exception occurs, and one in case none is raised)
o also first finalize parameters and only then code generator temps, since
in theory the former could create more of the latter
git-svn-id: trunk@40345 -
2018-11-17 22:38:36 +00:00
svenbarth
116230f759
* forgot to commit extension to tspecializenode
...
git-svn-id: trunk@39788 -
2018-09-21 15:17:52 +00:00
florian
800ce23499
* fixed some issues to get correct values of section_count, works better than before but it is still not perfect for unknown reasons
...
git-svn-id: trunk@39750 -
2018-09-12 20:33:18 +00:00
svenbarth
0ba14c7ad8
* fix memory leak when freeing a temp delete node: also call the inherited destructor so that e.g. tnode.optinfo is freed.
...
git-svn-id: trunk@39558 -
2018-08-03 20:24:05 +00:00
florian
1497b64804
* the temp. locations created by cse were not properly cleanup up, this patch fixes this
...
git-svn-id: trunk@38624 -
2018-03-25 15:55:34 +00:00
florian
b1dff29cbf
* removed unused units
...
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
florian
ec45a92fb5
* more nodedata printing fixes, similiar to r35477
...
git-svn-id: trunk@35480 -
2017-02-25 15:41:39 +00:00
Jonas Maebe
b5fb9beec9
* fixed printing of nodedata to the screen
...
git-svn-id: trunk@35477 -
2017-02-24 19:57:36 +00:00
svenbarth
c6bfb0064f
* keep track of the sections that are created in the asmlists
...
git-svn-id: trunk@35408 -
2017-02-10 14:38:53 +00:00
florian
82e6e1eb34
+ tempinfo flag ti_no_final_regsync which prevents that the final reg. sync. is emitted
...
git-svn-id: trunk@34787 -
2016-11-05 23:05:41 +00:00
florian
502e48541c
* properly copy flags of tempinfo
...
+ write flags of tempinfo in ttemprefnode.printnodedata
git-svn-id: trunk@34738 -
2016-10-16 19:53:14 +00:00
Jonas Maebe
179c1ab328
* changed ttemp*node.tempinfo^.flags to a private field, and added setters
...
and getters for the ttemp*node classes instead
o this will allow descendants to prevent certain flags from being added
or removed. E.g. for LLVM, certain temps must never be put in registers
because it cannot typecast a value in a register from a non-record/array
type to an array type without forcing it to memory (so if that is done
on an lvalue, the result will be written to the memory temp instead of
to the register)
git-svn-id: trunk@34358 -
2016-08-21 14:23:09 +00:00