Commit Graph

291 Commits

Author SHA1 Message Date
florian
e443936e12 + in_min/max_dword/longint support for aarch64 2021-12-19 16:16:44 +01:00
florian
77b9d62520 + in_min/max_single/double support for aarch64 2021-12-18 21:23:21 +01:00
Yuriy Sydorov
5b32c81bef * Corrected setting of the flag. 2021-11-02 20:33:34 +02:00
Yuriy Sydorov
e04df465ef * The label which is generated by traisenode is not a jump target. Mark
this label as nf_internal, which means the label does not impact the
  code flow. This leads to a much better register allocation.
2021-11-02 16:46:09 +02:00
pierre
39896a1b11 Destroy tfornode class loopiteration field if assigned
git-svn-id: trunk@49329 -
2021-05-03 16:04:19 +00:00
Jonas Maebe
9977889f4a * fix finally block getting unconditionally removed if try-block is empty
(hasnocode(nil) always returns true). Regression from r48174

git-svn-id: trunk@49305 -
2021-05-01 09:28:58 +00:00
florian
a32a870f33 * another loop counter copying fix
git-svn-id: trunk@49028 -
2021-03-21 21:39:57 +00:00
florian
c4ddb94cb4 * remove nf_write from the counter node when converting for loops into while loops if the counter is only read
git-svn-id: trunk@49020 -
2021-03-20 21:28:58 +00:00
yury
75491ae21c * Removed/ifdefed the assigned and unused variables.
git-svn-id: trunk@48391 -
2021-01-24 13:58:17 +00:00
yury
0a021be803 * Corrected visibility of overridden methods.
git-svn-id: trunk@48385 -
2021-01-24 12:41:12 +00:00
florian
16f201292c + remove try ... finally statements if the finally block is empty
git-svn-id: trunk@48174 -
2021-01-18 21:29:52 +00:00
florian
0fd7a5cb1f * lines with 255 chars a little bit long, reformated them
git-svn-id: trunk@47845 -
2020-12-24 13:13:42 +00:00
florian
6db164c993 * min/max optimization needs to check both operands of the if condition, even if no else-statement is passed, resolves #38249
git-svn-id: trunk@47843 -
2020-12-23 22:41:37 +00:00
florian
6d7d567a25 * min/max optimization on x86 can be applied now without fastmath as NaN is handled properly now
git-svn-id: trunk@47769 -
2020-12-13 09:52:45 +00:00
florian
88a0d4d64b + optimize if x>a then x:=a; into min(a,x);, similiar for max
* test extended

git-svn-id: trunk@47767 -
2020-12-13 09:52:44 +00:00
florian
3707cb4b1e * handle min/max properly if it is applied to NaNs
* test extended

git-svn-id: trunk@47729 -
2020-12-08 20:41:58 +00:00
florian
8d238cfaa1 * limit min/max optimization to fastmath for now, as the NaN handling is not working yet
git-svn-id: trunk@47704 -
2020-12-06 20:22:39 +00:00
florian
d49453edba * quick fix for llvm compilation
git-svn-id: trunk@47702 -
2020-12-06 19:31:03 +00:00
florian
1a9678f4c4 + min/max support for x86
git-svn-id: trunk@47701 -
2020-12-06 18:09:30 +00:00
florian
4f3271500a * (modified) patch by Christo Crause: ESP8266 doesn't support min/max instructions, resolves #38175
git-svn-id: trunk@47699 -
2020-12-06 16:37:54 +00:00
florian
19ce665b3d * compilation fixed
git-svn-id: trunk@47696 -
2020-12-06 14:18:59 +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
florian
878f6d9ce4 * allow generic parameters as iterator variable in for in loops, resolves #38050
git-svn-id: trunk@47425 -
2020-11-15 19:10:34 +00:00
florian
e1536bdf26 * when implicit try...finallys are turned off, do not throw an error if a procedure
is left which would need but does not have an implicit try...finally block, resolves #37823

git-svn-id: trunk@46974 -
2020-09-27 16:53:59 +00:00
florian
0bdc1fdea4 * do not set nonlocal for inter-procedural labels, this is not needed, they use
the jmpbuf to reach the target

git-svn-id: trunk@46907 -
2020-09-20 18:57:00 +00:00
florian
61d44bba17 * allow iso gotos within a procedure
git-svn-id: trunk@46396 -
2020-08-12 19:07:23 +00:00
svenbarth
55c1ecedac * set implicitframe for copied tryfinally nodes as well
git-svn-id: trunk@44956 -
2020-04-21 06:07:03 +00:00
florian
aca9727418 + OptimizeForLoop: convert for-loops into zero-based backward for-loops if possible, for most architectures, this results in simpler code
git-svn-id: trunk@44287 -
2020-03-08 14:30:59 +00:00
florian
1486ab7c70 * do not throw a warning about unreachable code if the responsible node was generated internally
git-svn-id: trunk@44051 -
2020-01-27 22:27:22 +00:00
florian
22197641b8 * last commit fixing calculation of do_loopvar_at_end was not complete,
hopefully finally fixed

git-svn-id: trunk@44041 -
2020-01-26 20:13:17 +00:00
florian
74272975af * do_loopvar_at_end is not possible if the loop counter would overflow with
the last iteration

git-svn-id: trunk@44039 -
2020-01-26 15:35:03 +00:00
florian
069e040e49 * do for-loop unrolling after for-loop simplification, resolves #36589
git-svn-id: trunk@43999 -
2020-01-19 18:21:12 +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
florian
f424ae3929 - cleanup comment
git-svn-id: trunk@43906 -
2020-01-10 21:34:30 +00:00
florian
fd0012deff * when copying goto nodes take care if the label node is part of the copied tree
or not, resolves #35820

git-svn-id: trunk@43793 -
2019-12-25 17:10:14 +00:00
Jonas Maebe
e775ecdc43 * cleaned up safecall support: use a hidden localvarsym instead of result
register hacking
   o this also allowed fixing/adding safecall support for LLVM

git-svn-id: trunk@43578 -
2019-11-24 20:23:22 +00:00
svenbarth
0a915e883e * keep track of static symbols that a global function references, as those must now be exported from a dynamic package as well if the function can potentially be inlined
git-svn-id: trunk@43544 -
2019-11-21 21:44:53 +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
e3e23df7e2 * document how tgotonode/tlabelnode copying works
git-svn-id: trunk@42986 -
2019-09-13 19:06:34 +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
50c82b6468 * synchronised with trunk till r41537
git-svn-id: branches/debug_eh@41538 -
2019-03-01 16:20:22 +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
florian
f66d7d431f * ensure that the label points inside the range where the raise is located for psabieh
git-svn-id: branches/debug_eh@41384 -
2019-02-19 22:19:30 +00:00
Jonas Maebe
b3a8543a56 * synchronised with trunk till r40942
git-svn-id: branches/debug_eh@40943 -
2019-01-20 17:37:07 +00:00
Jonas Maebe
51e68eb302 * fixed several places where the interface crc could change:
o unsetting po_inline while parsing the implementation for various reasons
     (interprocedural goto/label, accessing a local in a parent frame,
      having nested procedures)
   o instead handle this via the pio_inline_not_possible flag
   o noreturn can no longer be specified only in the implementation

git-svn-id: trunk@40789 -
2019-01-06 20:35:56 +00:00
Jonas Maebe
51b58f342f * synchronised with trunk till r40775
git-svn-id: branches/debug_eh@40776 -
2019-01-05 22:12:28 +00:00
Jonas Maebe
91d5457b38 * moved around/replaced the following procedures to stop nflw from depending
on pdecsub (node units should not depend on parser units):
   o maybe_add_public_default_java_constructor()
   o handle_calling_convention()
   o create_finalizer_procdef() (replaced with create_outline_procdef())
   o insert_record_hidden_paras()
   o handle_calling_convention()
   o proc_add_definition()
   o build_parentfpstruct()
   o maybe_guarantee_record_typesym()
   o get_first_proc_str()
  * factored out the creation of a procinfo for a nested procdef based on a
    subnodetree of the current procdef into tprocinfo.create_for_outlining()

git-svn-id: trunk@40773 -
2019-01-05 16:26:33 +00:00
Jonas Maebe
28df55fe08 * moved handle_calling_convention() to pparautl
git-svn-id: trunk@40772 -
2019-01-05 16:26:29 +00:00
Jonas Maebe
c7d701d117 * synchronised with trunk till r40038
git-svn-id: branches/debug_eh@40643 -
2018-12-25 15:38:57 +00:00
Jonas Maebe
f754978540 * handle constructor function results that have been migrated to the
parentfpstruct the same as regular function results (see r32687)

git-svn-id: trunk@40641 -
2018-12-25 15:36:24 +00:00