tasmdata.DefineAsmSymbol() and all routines that call it
o will be used to automatically generate AB_INDIRECT sybols when
necessary
git-svn-id: trunk@34164 -
(e.g. an empty record): return an "undefined" instance of the result
type (since it's empty, its contents are irrelevant). Before, we
returned "void", but that means returning nothing rather than returning
something empty (part of fixing test/tnoext4 for llvm)
git-svn-id: trunk@34119 -
pasbool8type for this results in too much trouble (we mustn't use i1
for parameters, because then LLVM will try to apply the ABI convention
for passing "1 bit" values, or in records because then this may
result in unwanted bitpacking). Downside: the new LLVMBool1 type is
also exposed in the system unit, because we need it to define LLVM
intrinsics...
git-svn-id: trunk@33726 -
o individual elements are not (yet) dead-strippable on LLVM though,
there doesn't seem to be a way to encode the necessary information
in LLVM (so e.g. all resource strings from a unit are currently
always linked in if at least one is referenced)
git-svn-id: trunk@32802 -
o reduces the size of the generated LLVM IR, but mainly important for LLVM
intrinsics such as llvm.memcpy.*(), as llc complains if some of their
parameters are not constants (you could work around it by first running
opt or by using clang with optimizations so that the constants, which
were loaded in registers until now, were propagated to the intrinsics
by the time llc saw them)
git-svn-id: trunk@32776 -
only required when calling a routine that returns a procvardef or
if it's a C-style varargs routine, but it's always allowed and
always doing it simplifies procvar handling
git-svn-id: trunk@32416 -
defined) or a declaration (external symbol), instead of deriving it from
from the bind of the tasmsymbol. The reason is that with module-level
inline assembly, some locally implemented functions (in pure assembler)
won't have an LLVM IR body
git-svn-id: trunk@31629 -
o all external symbol definitions are now inserted in the llvmtype post pass
based on all declarations and types used in llvm instructions
o this means we don't have to use the workaround with the Pascal mangled
names anymore for all external names, as we now insert the external
references only once we know all type information
git-svn-id: trunk@31287 -
because due to aliasing symbols a single symbol may be called using
different procdefs (e.g. FPC_ANSISTR_UNIQUE in the system unit is defined
as an alias for a function and called as a procedure). This means we have
to insert extra type conversions for llvm, which requires both the source
and destination type
git-svn-id: trunk@30776 -
o remove the accompanying tdef operands from tai operands, because such
tai operands should have a tdef already
o check that every queued tai is a tai_simpletypedconst (which have a
type)
o wrap queued bitcast/getelementptr tai instances with a
tai_simpletypedconst
git-svn-id: branches/hlcgllvm@28154 -
backend (required for inserting bitcasts/ptrtoint/... operations inside
typed constant declarations)
o taillvm constructors for creating bitcast-style and getlementptr
operations that accept a tai as their source/base operand
git-svn-id: branches/hlcgllvm@28112 -
typed constant data
o llvm declarations now get an extra "initdata" list that contains the
typed constant data associated with this declaration (if any)
git-svn-id: branches/hlcgllvm@28111 -
o make use of the fact that callparanodes always first load everything
in temporary parameters (allocated via paramanager.createtempparaloc)
-> we pass those temporary paralocs to the llvm call nodes and ignore
the "real" locations with physical registers
o all function results are forced to memory before handing them back
to the generic code generator to avoid having to deal with special
result locations and llvm<->pascal type differences (llvm removes
the extra temp stores/loads while optimising)
o ideally, the llvm code generator should share the common code with
the generic code generator for a_load_ref_cgpara() at some point in
the future
git-svn-id: branches/hlcgllvm@27013 -
generate declarations when external symbols are referred in a taillvm
instruction
* added "declared" field to tasmsymbol for llvm to make avoid declaring a
symbol multiple times (harmless, but unnecessary)
* all kinds of declarations/definitions are now handled using the new
taillvmdecl, the old separate types have been removed
git-svn-id: branches/hlcgllvm@27010 -
destination types are different: the pointer types of the load/store must
be converted in that case, rather than the loaded/to be stored value
(you can't bitcast aggregates in LLVM)
git-svn-id: branches/hlcgllvm@26987 -
registers itself, it requires them to be in SSA form. Therefore we
spill all registers that are written more than once to memory.
+ support in the generic register allocator for generating code that is
SSA-safe
+ spilling helpers for llvm
git-svn-id: branches/hlcgllvm@26044 -