Commit Graph

20 Commits

Author SHA1 Message Date
Jonas Maebe
cf6a97c8ed LLVM: fix fileinfo of temp allocations 2022-05-13 22:49:02 +02:00
Jonas Maebe
1e3f72403e * renamed getintparaloc to getcgtempparaloc
o it can be used for more than integer parameters

git-svn-id: trunk@43781 -
2019-12-24 22:12:25 +00:00
Jonas Maebe
440026bb25 * synchronised with trunk till r40503
git-svn-id: branches/debug_eh@40504 -
2018-12-08 15:33:36 +00:00
Jonas Maebe
51502874af * emit temp lifetime information for llvm
o also allow freeing temps in the middle of a routine for llvm (we won't
     reuse them, but it results in better lifetime information)

git-svn-id: trunk@40502 -
2018-12-08 15:31:51 +00:00
Jonas Maebe
4cd6f59bc3 * changed create_hlcodegen into a procvar, so that we don't have to insert
hlcgllvm in the uses clause of every unit that calls create_hlcodegen
   o prevents dependency cycles that can cause llvm codegen units to init
     before the cpu variants, which is bad since the llvm versions have to
     override the cpu variants in their init code (+ added checks in the
     init code that they are in fact initialised later)

git-svn-id: branches/debug_eh@40410 -
2018-11-29 21:31:15 +00:00
Jonas Maebe
3da67019e5 * fixed llvm compiler compilation after r38814 (crashes in "make cycle", but
that was already the case before)

git-svn-id: trunk@38815 -
2018-04-22 20:40:19 +00:00
Jonas Maebe
4686f61002 * keep track of the temp position separately from the offset in references,
so that they can still be freed after the reference has been changed
    (e.g. in case of array indexing or record field accesses) (mantis #33628)

git-svn-id: trunk@38814 -
2018-04-22 17:03:16 +00:00
Jonas Maebe
006c7e1ccf * apply localalignmin/max to local variables for LLVM (fixes webtbs/tw15582)
git-svn-id: trunk@35020 -
2016-11-29 21:54:30 +00:00
Jonas Maebe
a25ebbba3e + added volatility information to all memory references
o separate information for reading and writing, because e.g. in a
     try-block, only the writes to local variables and parameters are
     volatile (they have to be committed immediately in case the next
     instruction causes an exception)
   o for now, only references to absolute memory addresses are marked
     as volatile
   o the volatily information is (should be) properly maintained throughout
     all code generators for all archictures with this patch
   o no optimizers or other compiler infrastructure uses the volatility
     information yet
   o this functionality is not (yet) exposed at the language level, it
     is only for internal code generator use right now

git-svn-id: trunk@34996 -
2016-11-27 18:17:37 +00:00
Jonas Maebe
5de3785c0e * fixed allocation of temps for empty arrays on llvm
git-svn-id: trunk@32299 -
2015-11-12 22:00:28 +00:00
Jonas Maebe
839482751d * when generating code for a pure assembler routine with LLVM, instantiate
a code and temp generator for the architectural target instead of for LLVM
  * write the code for pure assembler routines using a GNU-style external
    assembler writer for the target, with a decorator to wrap it in
    LLVM module-level assembly statements

git-svn-id: trunk@31633 -
2015-09-12 23:32:31 +00:00
Jonas Maebe
765044aede * fixed a number of (mostly false) warnings regarding uninitialised
variables with -Oodfa

git-svn-id: branches/hlcgllvm@30244 -
2015-03-15 21:10:50 +00:00
Jonas Maebe
0fbaa9e924 * record the alignment of temps, and set it when creating a reference based
on a temp instead of assuming it's always aligned to a multiple of
    the stackpointer size

git-svn-id: branches/hlcgllvm@28490 -
2014-08-19 20:22:48 +00:00
Jonas Maebe
9880b53242 * changed all alignment parameters in the temp manager to shortint
git-svn-id: branches/hlcgllvm@28489 -
2014-08-19 20:22:45 +00:00
Jonas Maebe
dd733bd5b5 * changed all size parameters in the temp manager from longint to asizeint
git-svn-id: branches/hlcgllvm@28488 -
2014-08-19 20:22:42 +00:00
Jonas Maebe
344acef9b5 * separate tracking the def of a temp and whether or not it needs to be
finalised (for llvm, we always keep track of the def)

git-svn-id: branches/hlcgllvm@28485 -
2014-08-19 20:22:34 +00:00
Jonas Maebe
3b7f43ad77 * renamed (hl)gettemptyped() to (hl)gettempmanaged() to better indicate the
meaning

git-svn-id: branches/hlcgllvm@28484 -
2014-08-19 20:22:32 +00:00
Jonas Maebe
e18e98b540 * changed the type of the forcesize parameter of gethltemp() and friends
from aint to asizeint (fixes range check warning/error when compiling
    the AVR backend)

git-svn-id: branches/hlcgllvm@28147 -
2014-07-03 22:28:43 +00:00
Jonas Maebe
839ad45b9e * ensure that the lineinfo of temps corresponds to the lineinfo of the
procedure entry code

git-svn-id: branches/hlcgllvm@26980 -
2014-03-06 21:40:15 +00:00
Jonas Maebe
1df3039424 + LLVM temp allocator based on new R_TEMPREGISTER register class. For every
temp we allocate, we set the base register to a newly allocated
    R_TEMPREGISTER. This allows for uniquely identifying a temp even if its
    offset is modified.

git-svn-id: branches/hlcgllvm@26033 -
2013-11-11 11:14:59 +00:00