florian
c0f20e0e5f
* do not join register deallocations/allocations as it makes no use and causes later on trouble in
...
the assembler optimizer as register allocations are not correct, resolves #33565
(cherry picked from commit c6659d62f8
)
# Conflicts:
# .gitattributes
2021-11-28 15:22:20 +01:00
florian
a76d096254
* workaround missing optimizer capabilites of the fixes branch to fix avr compilation with -CriotR
2021-11-21 22:57:24 +01:00
florian
3328f991c7
* AVR: fixes pushing and handling of stack passed parameters
...
git-svn-id: trunk@43983 -
(cherry picked from commit 96a4cda03b
)
2021-10-24 12:40:37 +02:00
Yuriy Sydorov
ebc55c0f4e
* If in a move instruction "MOV reg1,reg2" one of the registers must be
...
spilled, but reg1 and reg2 are coalesced, then this is a no-op
instruction and no spilling is needed.
(cherry picked from commit b43ee41090
)
2021-09-09 22:23:28 +02:00
Yuriy Sydorov
0ca0cd9d0d
* Remove register allocations of coalesced registers if the alias
...
register is spilled.
(cherry picked from commit b96057adeb
)
2021-09-07 21:43:16 +02:00
florian
ea32ddd5b2
* avoid overflows of execution weight
...
git-svn-id: trunk@39623 -
2018-08-16 20:45:36 +00:00
florian
37a5716819
* reuse more sparc code for sparc64
...
git-svn-id: trunk@36961 -
2017-08-20 17:20:43 +00:00
florian
7c0f72d9af
* avoid spill coalesce of registers with itself, resolves issue #31926
...
git-svn-id: trunk@36363 -
2017-05-28 08:59:57 +00:00
florian
344970879e
* spill coalesce uses get_alias
...
git-svn-id: trunk@36359 -
2017-05-28 08:59:49 +00:00
florian
db49b2f62b
* coalesce spilled registers if possible to avoid mem->mem moves
...
git-svn-id: trunk@36325 -
2017-05-25 12:44:35 +00:00
florian
4b17ad80d0
* reduce initial size of movelist, 16 is enough for most cases
...
git-svn-id: trunk@36324 -
2017-05-25 12:44:33 +00:00
florian
b1dff29cbf
* removed unused units
...
git-svn-id: trunk@36165 -
2017-05-09 19:53:14 +00:00
yury
60e21e4222
* Reverted r34524 - workaround for compiling with -gc. It is not needed anymore since cycle completes with -gc.
...
git-svn-id: trunk@35537 -
2017-03-07 09:30:16 +00:00
florian
4242949453
* write more information into the interference graph
...
git-svn-id: trunk@34801 -
2016-11-05 23:06:04 +00:00
Károly Balogh
e0e90fffc4
make rgobj.uses_registers also return true, when the rg never allocated an imreg, but there were direct cpu register allocations. this at least fixes some address regvar trashing on 68k in relation to syscalls' explicit paralocs
...
git-svn-id: trunk@34777 -
2016-11-03 01:45:34 +00:00
pierre
c7d79acd61
Allow compilation of compiler with -gc option
...
git-svn-id: trunk@34524 -
2016-09-13 08:47:53 +00:00
florian
2a28f5a85d
* update used_in_proc only in trgobj.translate_registers, before it might cause unnecessary pushes of actually unused registers
...
git-svn-id: trunk@33526 -
2016-04-15 21:30:14 +00:00
sergei
c0eafe38aa
* Make trgobj.uses_registers method return True when registers of appropriate type are specified in list of used registers (after assembler blocks), but not used otherwise. This is a missing piece of r30011, enabling code generator to actually save/restore such registers. Resolves #28421 .
...
git-svn-id: trunk@32610 -
2015-12-07 19:12:20 +00:00
florian
199b1861d6
* fix wrong comparisons in trgobj.conservative to enable better coalescing,
...
before this patch, k was calculated wrong most of the time
git-svn-id: trunk@31439 -
2015-08-28 18:49:04 +00:00
florian
31709b1b43
* check registers of ait_regalloc for a valid color when translating and compiling with -dextdebug
...
git-svn-id: trunk@30438 -
2015-04-05 19:06:06 +00:00
Jonas Maebe
e12dff9a5e
* support top_para in trgllvm.get_spill_temp()
...
git-svn-id: trunk@30426 -
2015-04-04 14:29:06 +00:00
Jonas Maebe
e750678f37
* factored out spilling code that deals with operand types into virtual
...
methods so they can be overridden by platform-specific variants
for platform-specific operand types
git-svn-id: trunk@30425 -
2015-04-04 14:29:03 +00:00
Jonas Maebe
197e5194b9
* don't crash if we have to spill a register of the last instruction in an
...
asmlist
git-svn-id: trunk@30402 -
2015-04-01 15:43:10 +00:00
Jonas Maebe
67b8aceaee
* synchronized with privatetrunk till r30095
...
git-svn-id: branches/hlcgllvm@30101 -
2015-03-05 20:32:15 +00:00
sergei
31fddaafe8
+ New subtype of tai_regalloc, "ra_markused". It marks a physical register as used in procedure, triggering saving/restoring that register if it is non-volatile.
...
git-svn-id: trunk@30010 -
2015-02-25 21:38:23 +00:00
Jonas Maebe
5c75b6dd6b
* synchronised with trunk up till r28402
...
git-svn-id: branches/hlcgllvm@28403 -
2014-08-13 16:04:30 +00:00
sergei
9b9ea15d68
+ m68k: initial implementation of do_spill_replace (supports only MOVE instructions for now). Tested with qemu for Coldfire target.
...
git-svn-id: trunk@28274 -
2014-07-30 01:20:59 +00:00
Jonas Maebe
bacd303208
* synchronized with trunk up to r27758
...
git-svn-id: branches/hlcgllvm@27779 -
2014-05-12 16:12:34 +00:00
Jonas Maebe
246caf3526
* never alias/coalesce cpu registers that are not usable by the register
...
allocator (such as stack/framepointers) with virtual registers, otherwise
they can get changed in case the virtual register gets changed (read-only
use would be ok, but we don't keep track of which virtual registers are
only read
git-svn-id: trunk@27104 -
2014-03-11 23:18:45 +00:00
Jonas Maebe
e9268a0a14
* synchronised with trunk up till r26975
...
git-svn-id: branches/hlcgllvm@26976 -
2014-03-06 21:36:58 +00:00
florian
23c724f885
* prevent a temp. register allocated during spilling being immediately spilled again, resolves #25164
...
git-svn-id: trunk@26930 -
2014-03-02 19:47:05 +00:00
florian
829764e96b
+ replace registers to spill in mov instructions and convert them into ldr/str
...
git-svn-id: trunk@26677 -
2014-02-05 18:19:41 +00:00
Károly Balogh
587acf6452
fix infinite spilling on m68k, patch by Florian, additional IE workaround by me, based on a similar hack in the ARM cg...
...
git-svn-id: trunk@26465 -
2014-01-15 02:09:02 +00:00
Károly Balogh
70f9b098e0
no longer define a segment field for m68k
...
git-svn-id: trunk@26464 -
2014-01-15 02:06:10 +00:00
sergei
d2a9308181
+ SPARC: implemented register spill replacement.
...
git-svn-id: trunk@26364 -
2014-01-03 08:14:43 +00:00
Jonas Maebe
b7803ab974
+ llvm support for the register allocator. While llvm works with virtual
...
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 -
2013-11-11 11:15:47 +00:00
Jonas Maebe
5ef93e85b8
+ added extra "orgsupreg" parameter to do_spill_read/do_spill_written/
...
do_spill_replace routines, will be necessary by llvm register
allocator to determine the tdef corresponding to that register
* replaced uses of taicpu with tai_cpu_abstract_sym in the register
allocator so that it can work both with taicpu and taillvm instructions
git-svn-id: branches/hlcgllvm@26043 -
2013-11-11 11:15:43 +00:00
Jonas Maebe
5599870a4e
* moved the register colouring and spill temp allocation to a virtual method,
...
and made the related data structures protected instead of private, so they
can be overridden
git-svn-id: branches/hlcgllvm@26042 -
2013-11-11 11:15:38 +00:00
svenbarth
32a18199c5
Print aX or aregX for address registers if DEBUG_REGISTERLIFE is defined.
...
rgobj.pas, trgobj.generate_interference_graph:
* pass "regtype" instead of "R_INTREGISTER" to newreg so that "aX" or "aregX" is print for address registers
git-svn-id: trunk@25665 -
2013-10-05 21:48:28 +00:00
florian
dc567acc9a
* accumulate register weight instead of taking only the maximum
...
git-svn-id: trunk@25433 -
2013-09-07 17:44:41 +00:00
florian
c2f7ccb253
* coalesce more aggressive
...
git-svn-id: trunk@25177 -
2013-07-26 19:06:20 +00:00
sergei
8b8553991a
+ MIPS: prevent coalescing written-to registers with $sp,$fp,$zero and $at.
...
+ Implemented subset of "spill replace" functionality, replacing moves from/to spilled registers with loads/stores to spill locations. This helps to reduce amount of instructions.
git-svn-id: trunk@24900 -
2013-06-15 04:04:08 +00:00
florian
23c84fd27c
* more fixes for segment register usage
...
git-svn-id: trunk@24584 -
2013-05-24 19:02:09 +00:00
florian
b85addb451
+ color segment register
...
git-svn-id: trunk@24579 -
2013-05-24 17:57:28 +00:00
svenbarth
d15304c25e
Also check for the type of the register when replacing it. In certain circumstances this can still lead to access to invalid memory resulting either in an access violation or invalid registers.
...
git-svn-id: trunk@22779 -
2012-10-19 19:35:45 +00:00
pierre
322b793506
Try to do something for m68k integer/address registers; not working yet :!(
...
git-svn-id: trunk@22771 -
2012-10-19 15:52:57 +00:00
svenbarth
2ada9a528b
Fix a critical bug in the register allocator (at least for CPUs with seperate address
...
registers like the M68k): check whether the register type of the base/index register
of the instruction's reference is the same as the one we are doing register allocation
for. Otherwise the address registers can become corrupted.
git-svn-id: trunk@22748 -
2012-10-18 20:12:24 +00:00
florian
95830d5a4a
+ DEBUG_REGISTERLIFE define
...
git-svn-id: trunk@22396 -
2012-09-15 17:20:57 +00:00
florian
f75e39e660
+ aliasing of registers, allows to split live ranges
...
git-svn-id: trunk@22395 -
2012-09-15 17:20:53 +00:00
florian
f9dd5bf5e6
+ live_start and live_end_properties
...
git-svn-id: trunk@22109 -
2012-08-17 19:35:51 +00:00