Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Inserting stack spilling code that modifies globally visible state"
2013 Jan 18
0
[LLVMdev] llvm backend porting question ,
I start my porting for picoblaze,the soft cpu for fpga ,which is
designed by XILINX from MSP430 porting .
After some day's work , somethinig looks good , for it can generate
for some simple C program:
eg :
int f1(int a)
{
return a+1;
}
but it failed with this :
char f()
{
char a;
a++; a++; a++; a++; a++; a++; a++; a++; a++; a++; a++;
a++; a++; a++; a++;
2018 Jan 30
0
Disable spilling sub-registers in LLVM
To make my point clear, I believe an implementation of
storeRegToStackSlot()/loadRegFromStackSlot() is not sufficient (as it
received the physical register already). Does this make sense?
On 2018-01-30 13:33, ahmede wrote:
> Right Matthias, I am aware that an implementation for
> storeRegToStackSlot()/loadRegFromStackSlot() is necessary. But these
> functions receive the physical
2018 Jan 30
3
Disable spilling sub-registers in LLVM
Right Matthias, I am aware that an implementation for
storeRegToStackSlot()/loadRegFromStackSlot() is necessary. But these
functions receive the physical register that need to be spilled, they
might receive the sub-register. In this case, using the super-register
naively is unsafe (e.g., one might overwrite parts of it). Thus, I think
the register allocator/spillar need to be aware of the
2018 Jan 30
0
Disable spilling sub-registers in LLVM
I still think my answer applies that you have to modify storeRegToStackSlot()/loadRegFromStackSlot(). They decide how registers are spilled and reloaded. Nobody is stopping you from using super registers spills/reloads to implement spilling/reloading smaller registers there.
- Matthias
> On Jan 30, 2018, at 10:21 AM, ahmede <ahmede at ece.ubc.ca> wrote:
>
> Hi Quentin,
>
>
2018 Jan 30
3
Disable spilling sub-registers in LLVM
Hi Quentin,
Let me clarify if I understood this correctly.
If the accesses (writes and reads) to sub-registers are expressed always
as sub-registers of the super-register register class (e.g.,
SuperReg.sub1;), then the spilling decision is for the super register.
But, if the accesses are in terms of the register class of the
sub-registers directly (SubReg;), then the spilling decision will
2018 Jan 30
0
Disable spilling sub-registers in LLVM
> On Jan 29, 2018, at 1:20 PM, ahmede via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> Hi,
>
>
> I wonder if there is a way in LLVM to disable spilling a register-class while still enabling the super-registers of this register-class to be spilled.
What would you have the register allocator do when it runs out of register and you have spilling disabled? Abort the
2018 Jan 29
2
Disable spilling sub-registers in LLVM
Hi,
I wonder if there is a way in LLVM to disable spilling a register-class
while still enabling the super-registers of this register-class to be
spilled.
If not, how can we implement spilling for sub-registers when stack
load/stores can only operate on the super registers? Is there a way even
if it is suboptimal?
Thanks,
Ahmed
2018 Jan 30
2
Disable spilling sub-registers in LLVM
Hi Matthias,
No. I want the register allocator to spill the super-register (the large
one e.g., 64-bit) and not just the sub-register (e.g., the 32-bit that
is a piece of of the 64-bit register) because the stack loads/store
width is 64-bit in this example.
RegClass1 (sub-registers): sub_registers (32-bit) -->
can be natively used in arithmetic operations but no stack
2018 Jan 30
0
Disable spilling sub-registers in LLVM
Hi Ahmed,
If you access your values with sub-registers indices, IIRC the inline spiller will spill the super register.
If you access your values directly (via sub-regclass), then the spiller uses this class.
Basically what I am saying is the spiller spills the value that contains the accesses.
E.g.,
= v; will spill v
= v.sub1; will spill v too, but v is a super register in that case.
Cheers,
2010 Jul 20
2
[LLVMdev] Spilling multi-word virtual registers
Does anybody have any tips for generating spills/reloads for large
non-vector registers?
I'm working on a back end for a DSP architecture that has accumulator
registers that are too large to be spilled or reloaded with a single
instruction. All of their bits can be accessed in word-size chunks via
three sub-registers (low, high, and ext). So loading or storing one
requires three instructions:
2010 Jul 20
0
[LLVMdev] Spilling multi-word virtual registers
On Jul 20, 2010, at 10:57 AM, Ken Dyck wrote:
> Does anybody have any tips for generating spills/reloads for large
> non-vector registers?
>
> I'm working on a back end for a DSP architecture that has accumulator
> registers that are too large to be spilled or reloaded with a single
> instruction. All of their bits can be accessed in word-size chunks via
> three
2012 Oct 15
2
[LLVMdev] Alternate instruction encoding for subtargets
Hello,
I have a compiler in LLVM 2.9 for the KCPM3 processor. I'd like to
create a subtarget for the new cpu version called KCPSM6. Besides a
couple of new instructions which are not important at the moment, the
KCPSM6 cpu has different instruction opcodes. Semantically the
instructions are the same, hence I'd like to keep all the lowering and
pattern matching stuff unmodified
For
2020 Sep 09
2
spill to register not stack?
Hi Brian,
+1 on what Nemanja said: specifying large register classes is the key.
More details here:
http://lists.llvm.org/pipermail/llvm-dev/2019-December/137700.html <http://lists.llvm.org/pipermail/llvm-dev/2019-December/137700.html>
Cheers,
-Quentin
> On Sep 9, 2020, at 11:13 AM, Nemanja Ivanovic via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> On PowerPC, we
2011 Dec 09
0
[LLVMdev] Spilling predicate registers
> I am not sure extending the scavenger is the right way to go about this.
>
> There are two different situations where we might need extra registers to
> spill something:
>
> 1. When spilling a weird register class like predicate registers, we
> already known during register allocation that we will need a scratch GPR
> to assist with the spill.
>
> 2. When spilling
2009 Feb 22
4
[LLVMdev] Creating an LLVM backend for a very small stack machine
Hi folks,
I am interesting in creating an LLVM backend for a very small stack machine.
Before I start in on the actual implementation, I'd like to make sure that
I'm on the right track. Any comments, suggestions, warnings, tips, etc
would be greatly appreciated.
Background
----------
There are a number of small as other embedded microprocessors that are often
used in FPGAs such as
2006 May 23
4
[LLVMdev] Spilling register and frame indices
Hi,
right now, LLVM does register spilling by:
1. Creating stack object
2. Passing index of that stack object to MRegisterInfo::storeRegToStackSlot
3. At later stage, frame indices are replaced by calling to
MRegisterInfo::eliminateFrameIndex.
This works for me, but there's slight problem. The target does not have
"register + contant" addressing mode, so accessing frame index
2011 Dec 09
2
[LLVMdev] Spilling predicate registers
s/llvm-commits/llvmdev/
On Dec 9, 2011, at 12:58 PM, Arnold Schwaighofer wrote:
>
>> As Jakob pointed out to me, the core problem is that the current
>> register scavenger implementation will only give you one register; for
>> the PowerPC case, and it looks like for your case as well, we might
>> really need two registers. In the short term, a reasonable solution
2006 May 23
0
[LLVMdev] Spilling register and frame indices
On Tue, 23 May 2006, Vladimir Prus wrote:
> right now, LLVM does register spilling by:
>
> 1. Creating stack object
> 2. Passing index of that stack object to MRegisterInfo::storeRegToStackSlot
> 3. At later stage, frame indices are replaced by calling to
> MRegisterInfo::eliminateFrameIndex.
>
> This works for me, but there's slight problem. The target does not have
2020 Sep 09
2
spill to register not stack?
Given an architecture with two classes of registers: A is general purpose and
has an "adequate" number of registers, and C which is special purpose and has
very few (e.g. one) register. There are cheap instructions that directly copy
from C to A and vice versa.
If we need another C register and they are all live, we need to spill one.
Currently as far as I can tell, the only way to
2015 Mar 18
2
[LLVMdev] missing register spills?
Hi folks,
I'm running into this weird issue where the register spills appear to be missing for an "if" block for some reason. For example, the original if/else blocks:
---
if reg0
// storeRegToStackSlot for reg1
// do something
- missing a load for reg1?
else
// storeRegToStackSlot for reg1
// do something
// loadRegFromStackSlot for reg1
end
----
I tried looking in the LLVM