Commit Graph

764 Commits

Author SHA1 Message Date
Florian Klämpfl
a47f153dae * avoid to create a stack frame on aarch64 if possible 2021-11-02 22:23:24 +01:00
Yuriy Sydorov
b78761efd3 * Removed obsolete OLDREGVARS ifdefs. 2021-11-02 17:08:08 +02:00
florian
d0fdda6da7 + TDFABuilder.redodfainfo 2021-10-22 22:39:39 +02:00
Nikolay Nikolov
c96e203780 * moved the 'end_block' WebAssembly instruction before the 'exit' label right
before the procedure finalization code. This fixes compilation errors in
  procedures with implicit finalization code (e.g. for ansistring local vars,
  etc).
2021-10-20 14:35:52 +03:00
florian
1e072aef31 + for loop optimizations can be controller by a switch (-Oo(no)forloop) 2021-09-12 10:54:46 +02:00
florian
468975aa30 + move often used floating point constants into registers 2021-09-05 18:19:58 +02:00
florian
d2921dfb55 * move more node tree optimizations to tcgprocinfo.OptimizeNodeTree 2021-09-05 18:00:11 +02:00
nickysn
940738a3a1 * synchronized with trunk
git-svn-id: branches/wasm@48846 -
2021-03-01 13:21:24 +00:00
florian
fe57cd3536 * fix LLVM after r48828
* global gotos really use the return type of fpc_setjmp to test where we come from

git-svn-id: trunk@48835 -
2021-02-27 22:07:58 +00:00
florian
4c2e0b9ff0 * for setjmp based exception handling, get the type of the exception reason from the setjmp result
git-svn-id: trunk@48828 -
2021-02-27 16:47:36 +00:00
nickysn
64bb0359d2 * synchronized with trunk
git-svn-id: branches/wasm@48412 -
2021-01-24 23:38:35 +00:00
yury
64c586b86d * Removed/ifdefed lots of unused variables.
git-svn-id: trunk@48384 -
2021-01-24 12:24:01 +00:00
nickysn
96de6c4b96 * synchronize with trunk
git-svn-id: branches/wasm@47877 -
2020-12-28 18:45:24 +00:00
marco
185f20b9ec * fix comment typo mentioned by Bart
git-svn-id: trunk@47866 -
2020-12-28 10:46:35 +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
nickysn
47ff701db7 * synchronized with trunk
git-svn-id: branches/wasm@47778 -
2020-12-14 23:07:56 +00:00
florian
00af340feb * cleanup
git-svn-id: trunk@47774 -
2020-12-14 21:55:41 +00:00
nickysn
91e9558f5b * synchronized with trunk
git-svn-id: branches/wasm@47766 -
2020-12-12 23:20:33 +00:00
yury
8b7c5666a2 * Renamed fc_block_with_exit to fc_no_direct_exit to expand its usage.
* Set fc_no_direct_exit in case when a routine has an additional implicit exit code, such as calling FreeInstance in the destructor.

git-svn-id: trunk@47749 -
2020-12-10 17:38:37 +00:00
nickysn
dc5b78d5f0 * synchronized with trunk
git-svn-id: branches/wasm@47716 -
2020-12-08 06:57:57 +00:00
pierre
a7232669ff * Adapted from patch node-dump-pass-1.patch submitted by J. Gareth Moreton from bug report 38156.
This patch extends the DEBUG_NODE_XML debug feature by also outputting, 
     to the *-node-dump.xml files, the node tree as it appears after the first pass, 
     since it often contains many more internal nodes like temporary allocations that may need
     to be evaluated for debugging and development purposes, or node-level optimisation opportunities.

git-svn-id: trunk@47709 -
2020-12-07 07:28:04 +00:00
florian
9c6bdcfbb7 * fix in r47632 should be enabled for all targets as it is a stack tainting
parameter

git-svn-id: trunk@47680 -
2020-12-03 21:22:07 +00:00
nickysn
4676146e3d * synchronized with trunk
git-svn-id: branches/wasm@47662 -
2020-12-02 03:53:02 +00:00
pierre
af17e9460b Apply patch proposed by J. Gareth Moreton in:
bug report #0036882: [Feature] Class and record definition XML dump extension

  These patches extend the node dump feature (enabled with DEBUG_NODE_XML)
  so it also dumps class and record definitions to the XML file. They are contained within <definition> tags.
  Currently only fields and constants are dumped to the XML file. Methods, constant and variable definitions may be added later.

git-svn-id: trunk@47658 -
2020-12-01 11:45:14 +00:00
nickysn
aeafe42144 * synchronized with trunk
git-svn-id: branches/wasm@47653 -
2020-12-01 03:27:01 +00:00
florian
c47d6d7af0 * check if an invisible parameter for the result occupies parameter space
git-svn-id: trunk@47632 -
2020-11-29 13:38:33 +00:00
florian
fbb2e63fea + #QLvember work: stack frame optimization for m68k
git-svn-id: trunk@47629 -
2020-11-29 10:16:00 +00:00
nickysn
48b81da877 * synchronized with trunk
git-svn-id: branches/wasm@47249 -
2020-10-29 10:49:36 +00:00
florian
3baddff71e + inline subroutines with formal parameters as well
git-svn-id: trunk@47214 -
2020-10-26 22:18:03 +00:00
nickysn
8f059a6b8a * synchronized with trunk
git-svn-id: branches/wasm@47106 -
2020-10-14 02:41:25 +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
nickysn
d7559d7a38 * synchronized with trunk
git-svn-id: branches/wasm@46798 -
2020-09-07 21:56:01 +00:00
florian
93eef547ae * improve call0 calling conventions
git-svn-id: trunk@46797 -
2020-09-07 20:28:38 +00:00
nickysn
325c91d152 * synchronized with trunk
git-svn-id: branches/wasm@46710 -
2020-08-26 21:20:01 +00:00
florian
250c0750a2 * Xtensa: several issues with parameter passing of the windowed api fixed
git-svn-id: trunk@46708 -
2020-08-26 21:03:42 +00:00
nickysn
988a833836 * synchronized with trunk
git-svn-id: branches/wasm@46665 -
2020-08-23 15:31:53 +00:00
svenbarth
c2c7ac634a * fix for Mantis #37616: apply patch by Kai Burghardt to complain about the correct type used by setjmp/longjmp
git-svn-id: trunk@46542 -
2020-08-22 13:33:53 +00:00
yury
aefc1be555 * Reverted accidentally committed files.
git-svn-id: trunk@46416 -
2020-08-13 18:48:19 +00:00
yury
7b65f85a0b * Accidental commit.
git-svn-id: trunk@46415 -
2020-08-13 18:46:57 +00:00
nickysn
62cb7c2d12 * synchronized with trunk
git-svn-id: branches/wasm@46214 -
2020-08-03 21:15:39 +00:00
nickysn
6e7bb5927e [PATCH 04/83] update for Wasm target. adapting Karoly's changes from webassembly branch
From 8acd7baf8d14236dc12781dd15bac188581ccecf Mon Sep 17 00:00:00 2001
From: Dmitry Boyarintsev <skalogryz.lists@gmail.com>
Date: Thu, 29 Aug 2019 15:09:58 -0400

git-svn-id: branches/wasm@45881 -
2020-07-29 16:28:18 +00:00
yury
e63c03125a * Reworked tprocdef.is_implemented to fix a bug with the parentfp optimization. The bug was detected when using the llvm backend.
+ Added a test.

git-svn-id: trunk@45675 -
2020-06-21 19:52:14 +00:00
svenbarth
c45c543faa * fix typo (no code changes)
git-svn-id: trunk@45644 -
2020-06-13 18:42:21 +00:00
yury
2808873d1b * Reworked the optimization of unused $parentfp for nested routines.
- Do not remove the $parentfp parameter as was done in the previous optimization approach. Instead when $parentfp is unused to the following:
      - On the caller side: Omit passing the value for $parentfp for targets where tcgcallparanode.push_zero_sized_value_para=false (classic CPU targets). 
          Pass 0/nil as $parentfp for targets where tcgcallparanode.push_zero_sized_value_para=true;
      - On the callee side: Prevent allocation of registers/resources for $parentfp.
  - When possible keep $parentfp in a register.
  - Set the pio_nested_access flag in tprocinfo.set_needs_parentfp() to properly handle deep nesting levels;

git-svn-id: trunk@45436 -
2020-05-19 13:17:47 +00:00
florian
af0ba7be83 * when auto-inlining is used, do not require that inlining is explicitly turned on
git-svn-id: trunk@45405 -
2020-05-17 18:14:48 +00:00
florian
2a2ec77b10 * improved heuristics for auto-inlining
git-svn-id: trunk@45328 -
2020-05-10 19:41:13 +00:00
yury
254d0c0e2c * Do not perform optimization of nested procedures for:
- targets which use a special struct to access parent's variables;
  - pure assembler procedures (for compatibility with old code).

git-svn-id: trunk@45322 -
2020-05-09 20:45:00 +00:00
yury
40504a6f9d * If a nested procedure does not access its parent's frame pointer, optimize it by removing the hidden $parentfp parameter.
* Improved the tisogoto1.pp test.

git-svn-id: trunk@45292 -
2020-05-06 14:43:49 +00:00
svenbarth
2b59000d56 + implement compiler support for SEH on Win64
Note: due to the way we access variables in a nested function (which in this case includes exception filters) we can not extract the finally handlers and call them (like we do on i386 and x86_64, but instead we duplicate the finally code)

git-svn-id: trunk@44941 -
2020-04-21 06:06:05 +00:00
svenbarth
fed17122f8 * as a variant for SEH exception filters we allow them to be *duplicated* instead of being extracted; this can be done unconditionally as for extracted ones their code is set to Nil after they're done and thus won't be picked up by generate_code_exceptionfilters
git-svn-id: trunk@44934 -
2020-04-21 06:05:35 +00:00