Jonas Maebe
b7b495a679
LLVM: assign procdef.procstarttai, like in the regular code generator
2022-05-13 22:49:02 +02:00
Jonas Maebe
80282d6eff
* llvm: only set custom parameter alignments for byval parameters, the rest
...
is handled automatically by llvm (and since llvm 11.0 you get an error if
you specify an alignment for them anyway)
git-svn-id: trunk@48100 -
2021-01-06 22:35:40 +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
4caa471a24
* implemented a_load_undefined_cgpara for LLVM, fixes LLVM code generator
...
after the changes to optimize unused parentfp parameters
git-svn-id: trunk@45456 -
2020-05-21 10:56:39 +00:00
Jonas Maebe
4ba19f5418
* add support for creating non-address-only procvars to
...
cprocvar.getreusableprocaddr()
git-svn-id: trunk@44516 -
2020-04-02 21:21:36 +00:00
Jonas Maebe
9462d6b1ea
* handle non-smallset sets in registers in LLVM like arrays and records
...
git-svn-id: trunk@43884 -
2020-01-07 20:22:13 +00:00
Jonas Maebe
f659e91a95
* fixed LLVM compilation after r43860
...
git-svn-id: trunk@43862 -
2020-01-05 13:15:10 +00:00
Jonas Maebe
044d946782
* fixed missing sign extension when adding a signed integer variable with
...
size < sizeof(pointer) to a pointer for LLVM (fixes tfmtbcd)
git-svn-id: trunk@43833 -
2020-01-01 19:19:12 +00:00
Jonas Maebe
ec0d98156c
* use maytrap instead of strict FP exception behaviour in LLVM, so constant
...
propagation is still allowed
git-svn-id: trunk@43832 -
2020-01-01 19:19:08 +00:00
Jonas Maebe
9b53ed53e3
* the llvm.experimental.constrained.fpext intrinsic doesn't have a rounding
...
mode parameter
git-svn-id: trunk@43828 -
2019-12-31 18:05:50 +00:00
Jonas Maebe
a6a17efa42
* use LLVM constrained fpext/fptrunc intrinsics when fastmath is not enabled
...
for accurate exception behaviour
git-svn-id: trunk@43820 -
2019-12-30 15:05:13 +00:00
Jonas Maebe
9bd33f7a45
+ support for LLVM metadata constant string parameters
...
o they are implemented as a new metadata register class, whereby the
subregister indicates the metadata type (currently always a string)
and the superregister is an index in the metadata array (which
contains the strings). LLVM metadata can only be passed as parameters
to intrinsics in bitcode, so moves of metadata into other registers
triggers internal errors and when moving them into parameters, we
replace the parameter's register with the metadata register (and look
up the corresponding string when writing out the bitcode)
git-svn-id: trunk@43816 -
2019-12-30 15:04:57 +00: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
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
Jonas Maebe
faf75095cd
* synchronised with trunk till r42189
...
git-svn-id: branches/debug_eh@42190 -
2019-06-07 18:24:38 +00:00
Jonas Maebe
1dee4c41dd
- removed "cmp 0/1, pasbool1" optimization for llvm because this discards
...
the upper 7 bits of the boolean, while other platforms take it into
account (even though they're technically always required to be 0, and
the value is undefined if they're not)
git-svn-id: trunk@42189 -
2019-06-07 18:17:55 +00:00
Jonas Maebe
1b6425176b
* synchronised with trunk till r42049
...
git-svn-id: branches/debug_eh@42050 -
2019-05-12 18:44:05 +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
Jonas Maebe
024b38e1ff
* fixed setting calling convention for calls (the callpd passed to the
...
taillvm constructors is not necessarily a proc(var)def)
git-svn-id: branches/debug_eh@41979 -
2019-05-02 19:45:30 +00:00
Jonas Maebe
fcde89cb26
* support forcing to write the parameter alignment for parameters for LLVM,
...
even when it's the same as the stack alignment (it can also refer to the
alignment of the data pointed to by pointer parameters)
git-svn-id: branches/debug_eh@41729 -
2019-03-17 15:28:27 +00:00
Jonas Maebe
3b254affb7
* support for the individual alignment flags for the memcpy intrinsic of
...
LLVM 7.0
git-svn-id: branches/debug_eh@41728 -
2019-03-17 15:28:23 +00:00
Jonas Maebe
a0831b058a
* fixed LLVM para loading for byval paralocs that are preceded by other
...
paralocs
git-svn-id: branches/debug_eh@41217 -
2019-02-03 21:10:18 +00:00
Jonas Maebe
af098474f4
* keep track of the alignment requirements of parameters with LLVM, and emit
...
them when they are different from the default
git-svn-id: branches/debug_eh@41216 -
2019-02-03 21:10:14 +00:00
Jonas Maebe
a0d796e98d
* synchronised with trunk till r41159
...
git-svn-id: branches/debug_eh@41160 -
2019-02-01 17:01:54 +00:00
Jonas Maebe
e52cf555ab
* fix loading of constants in registers in the LLVM CG if the constant
...
does not fit in ptrsinttype
git-svn-id: trunk@41138 -
2019-01-29 21:39:26 +00:00
Jonas Maebe
14cc517f40
* synchronised with trunk till r40724
...
git-svn-id: branches/debug_eh@40737 -
2019-01-01 17:15:29 +00:00
Jonas Maebe
a72a12eef6
* don't emit 0-sized parameters for LLVM: clang doesn't either, and some
...
LLVM backends (like the AArch64 one) trigger internal errors when
encountering them
git-svn-id: trunk@40736 -
2019-01-01 16:55:41 +00:00
Jonas Maebe
473fef315d
* synchronised with trunk till r40732
...
git-svn-id: branches/debug_eh@40733 -
2019-01-01 16:24:18 +00:00
Jonas Maebe
4d03f3a65e
* fixed LLVM memory leaks
...
git-svn-id: trunk@40732 -
2019-01-01 16:22:31 +00:00
Jonas Maebe
1a0ffbc82b
* fixed llvm compiler compilation with -O3/-Oodfa
...
git-svn-id: branches/debug_eh@40590 -
2018-12-18 21:13:56 +00:00
Jonas Maebe
b41cd1eb6a
* synchronised with trunk till r40575
...
git-svn-id: branches/debug_eh@40576 -
2018-12-16 20:45:55 +00:00
Jonas Maebe
e69b4d2d9a
* replaced some stray cpointerdef.create() calls with cpointerdef.getreusable()
...
git-svn-id: trunk@40572 -
2018-12-16 20:44:31 +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
8a4947dba2
* don't do anything in thlcgllvm.allocallcpuregisters() like in
...
deallocallcpuregisters()
git-svn-id: trunk@40499 -
2018-12-08 15:31:41 +00:00
Jonas Maebe
fceb34dbd5
* converted tllvmpara contents from tlocation to toper, so we can also
...
store tai in them
+ support for direct symbol parameters to llvm routines (without first
loading them into register)
o needed to pass such symbols to llvm intrinsics
git-svn-id: branches/debug_eh@40414 -
2018-11-29 21:31:27 +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
ccb7231744
* generate invoke instead of call when calling a function in a block that
...
catches exceptions
git-svn-id: branches/debug_eh@40405 -
2018-11-29 21:30:59 +00:00
Jonas Maebe
50ab607676
+ customint torddef type to create arbitraty bit-width integers
...
o use this to handle non-power-of-two-sized parameters for llvm
o no general support in the parser/code generator, so don't expose
git-svn-id: trunk@40398 -
2018-11-29 20:57:08 +00:00
Jonas Maebe
413a3599c1
* thlcgobj.g_unreachable() dummy implementation + llvm override
...
git-svn-id: trunk@40382 -
2018-11-28 19:23:22 +00:00
Jonas Maebe
20fea3607c
* pass volatility information to llvm.memcpy
...
git-svn-id: trunk@40376 -
2018-11-26 22:30:05 +00:00
Jonas Maebe
0b246f3dbd
* converted Boolean8 to an internal type, and mapped Boolean to the
...
new internal pasbool1(type) (part of mantis #34411 )
o apply the _Bool x86-64 parameter passing rules only to pasbool1
git-svn-id: trunk@39949 -
2018-10-16 21:14:18 +00:00
Jonas Maebe
d69ad8fa41
* removed temppos field again from parameter locations: they're not allocated
...
by the temp manager of the current procedure
git-svn-id: trunk@38858 -
2018-04-27 19:18:55 +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
04ac44cd37
- removed dependency of hlcgllvm on llvmpara, so that cpupara no longer
...
indirectly depends on llvmpara and hence is initialised after instead
of before it (since llvmpara should override cpupara in its init code)
git-svn-id: trunk@36264 -
2017-05-19 21:52:37 +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
7ebbb744e9
* also specify sret attribute at the caller side
...
git-svn-id: trunk@34302 -
2016-08-13 14:47:42 +00:00
Jonas Maebe
819f0c39fa
* specify the "byval" attribute also at the caller side
...
git-svn-id: trunk@34301 -
2016-08-13 14:47:39 +00:00
Jonas Maebe
f417ed6576
* internalerror in case a reference's alignment is not set in
...
thlcgllvm.make_simple_ref_ptr()
git-svn-id: trunk@34299 -
2016-08-13 14:47:34 +00:00
Jonas Maebe
2f0c3ce8cc
* fixed updating the reference alignment in thlcgllvm.g_set_addr_nonbitpacked_field_ref()
...
git-svn-id: trunk@34298 -
2016-08-13 14:47:31 +00:00
Jonas Maebe
a83f3c1a45
* fix maximum common alignment calculation in g_concatcopy() (if the second
...
parameter of newalignment() is larger than the first, the result is always
1)
git-svn-id: trunk@34295 -
2016-08-13 14:47:23 +00:00