Call hlcg.getlocal instead of tg.getlocal when used for actual parameters/local
variables. Has an extra tsym parameter, which will enable the LLVM backend to
insert debug information.
Call hlcg.recordnewsymloc when the location of a (local/para) symbol changes,
so debug info tracking can be updated (only done for LLVM currently)
- no spill temp is allocated;
- no load of a stack parameter to a spill temp;
- if a stack parameter is used only once do not preload it to a register. The parameter can be accessed directly in the stack if the target CPU supports this.
git-svn-id: trunk@46776 -
* Added the tprocdef.parentfpsym property. Set parentfpsym.varstate to vs_read instead of using the pio_needs_parentfp flag.
* Replaced tcgcallparanode.push_zero_sized_value_para by tparamanager.has_strict_proc_signature.
git-svn-id: trunk@45454 -
- 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 -
the generation of the procdef's asmsymbols
o also removed unnecessary definition of procdef alias symbols for Darwin
(they are already defined in ncgutil.alloc_proc_symbol)
git-svn-id: trunk@42341 -
private_extern (or plain global in case of PECOFF, as the effect is
the same there): visible across object files, but they become local
when linked into a binary/library. This enables cross-unit inlining
of functions accessig implementation-only symbols.
git-svn-id: trunk@42340 -
as this might result in some nodes not being executed, like temp. create nodes with init. code, see e.g. issue #34653, resolves#34653
git-svn-id: trunk@40934 -
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 -
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 -
from cpubase unit to a method in the tcg class. The reason for doing that is
that this is now a standard part of the 16-bit and 8-bit code generators and
moving to the tcg class allows doing extra checks (not done yet, but for
example, in the future, we can keep track of whether there was an extra
register allocated with getintregister and halt with an internalerror in case
GetNextReg() is called for registers, which weren't allocated as a part of a
sequence, therefore catching a certain class of 8-bit and 16-bit code
generator bugs at compile time, instead of generating wrong code).
- removed GetLastReg() from avr's cpubase unit, because it isn't used for
anything. It might be added to the tcg class, in case it's ever needed, but
for now I've left it out.
* GetOffsetReg() and GetOffsetReg64() were also moved to the tcg unit.
git-svn-id: trunk@37180 -