Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] creating a vreg in eliminateFrameIndex()"
2015 Jan 29
0
[LLVMdev] creating a vreg in eliminateFrameIndex()
On 1/29/15 2:00 PM, Steve King wrote:
> Hello LLVM,
> The ARM target sometimes adds an instruction with a virtual register
> in eliminateFrameIndex():
>
> https://github.com/llvm-mirror/llvm/blob/master/lib/Target/ARM/ARMBaseRegisterInfo.cpp
>
> This looks late for a virtual register to appear. Where is this vreg made real?
The register scavenger should take care of such
2015 Jan 30
2
[LLVMdev] creating a vreg in eliminateFrameIndex()
Thanks Jon and Hal for the helpful pointers. By returning true from
requiresRegisterScavenging() and requiresFrameIndexScavenging(), LLVM
handled all the scavenging effort. That is nearly painless for the
target, so why do some targets seem to do scavenging on their own?
When the scavenged register is loaded with a simple immediate, is it
safe to search the BB and replace other uses of the same
2015 Jan 30
0
[LLVMdev] creating a vreg in eliminateFrameIndex()
----- Original Message -----
> From: "Steve King" <steve at metrokings.com>
> To: jonathan at codesourcery.com
> Cc: llvmdev at cs.uiuc.edu
> Sent: Friday, January 30, 2015 10:52:19 AM
> Subject: Re: [LLVMdev] creating a vreg in eliminateFrameIndex()
>
> Thanks Jon and Hal for the helpful pointers. By returning true from
> requiresRegisterScavenging() and
2015 Jan 30
1
[LLVMdev] creating a vreg in eliminateFrameIndex()
On Fri, Jan 30, 2015 at 8:59 AM, Hal Finkel <hfinkel at anl.gov> wrote:
>> When the scavenged register is loaded with a simple immediate, is it
>> safe to search the BB and replace other uses of the same immediate
>> with the reg? In my case this gives a code size reduction. The
>> search would stop on finding another use of the scavenged register.
>
> Are you
2012 Nov 10
5
[LLVMdev] register scavenger
I'm confused as to the logic used in the register scavenger when it
cannot find a free register.
I would think that it would want to free up the emergency spill slot
immediately after it's use, because otherwise there is a chance of
needing to use the emergency slot again and not be able to.
Instead it tries to restore it only right before register it is freeing up.
Maybe I'm
2012 Nov 10
0
[LLVMdev] register scavenger
Hi Reed,
the register scavenger (RS) also keeps track of live registers. This
way it "knows" that the register that was spilled/restored far apart
is available.
Let say you had the following code. You need to find a register to
keep vreg1 and vreg2 in.
R1 = .... // <- RS current liveness state; we have called
RS->forward(It) where It points to here
vreg1 = add SP, 1000
... =
2011 Oct 10
2
[LLVMdev] Expected behavior of eliminateFrameIndex() on dbg_value machine instructions
I'm investigating a bug associated with debug information that manifests
itself in the XCore backend (PR11105). I'd like to understand what the
expected behavior of eliminateFrameIndex() is when it is called on a
dbg_value machine instruction.
Currently the XCore target replaces the frame index with the frame
register and sets the next operand to the byte offset from the frame
2017 Aug 15
2
Problem of getting two unused registers in eliminateFrameIndex()
Hello all,
For my custom processor backend I am trying add some instruction using
BuildMI() inside eliminateFrameIndex().
I tried RegScavenger like this:
unsigned RegUnused0 = RS->FindUnusedReg(&LASER::GNPRegsRegClass);
if (!RegUnused0)
RegUnused0 = RS->scavengeRegister(&LASER::GNPRegsRegClass, II, SPAdj);
assert(RegUnused0 && "Register scavenger failed");
2011 Oct 10
0
[LLVMdev] Expected behavior of eliminateFrameIndex() on dbg_value machine instructions
On Oct 10, 2011, at 10:26 AM, Richard Osborne wrote:
> I'm investigating a bug associated with debug information that manifests
> itself in the XCore backend (PR11105). I'd like to understand what the
> expected behavior of eliminateFrameIndex() is when it is called on a
> dbg_value machine instruction.
That is up to the target.
The TII::emitFrameIndexDebugValue() hook is
2014 Oct 10
2
[LLVMdev] eliminateFrameIndex
Hi!
I started writing a LLVM backend for a custom architecture. I have some register and instruction .td files and some other files/classes like a MCStreamer for assembler output. At the moment I can compile some empty programs so far.
I implemented the method ::eliminateFrameIndex() similar to the Sparc and ARM backend. The method looks like this:
// frame pointer is in reg of class
2012 Nov 11
2
[LLVMdev] register scavenger
You mean when I "explicity" use it by calling methods of register scavenger?
Right now I'm just allocating virtual registers that will be resolved by
the use of register scavenger and I'm also providing an override of the
virtual method saveScavengerRegister. In Mips16, I have an extra mips 32
register (not usually very useful since it can only be used
in a move instruction)
2011 Oct 11
1
[LLVMdev] Expected behavior of eliminateFrameIndex() on dbg_value machine instructions
On 10/10/11 19:19, Jakob Stoklund Olesen wrote:
> On Oct 10, 2011, at 10:26 AM, Richard Osborne wrote:
>> I'm investigating a bug associated with debug information that manifests
>> itself in the XCore backend (PR11105). I'd like to understand what the
>> expected behavior of eliminateFrameIndex() is when it is called on a
>> dbg_value machine instruction.
>
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
2012 Nov 11
0
[LLVMdev] register scavenger
I ran into another issue with register scavenger.
In my case, I don't need a place on the stack for an emergency spill slot.
I have these free mips32 registers, that are not in general very useful
for other things, for the emergency spill slot. I can move to and from
mips16 (subset of mips32) registers and mips32 registers.
I also have a situation where I need two free registers so then
2019 Dec 17
2
Spilling to register for a given register class
Hello, for an architecture that doesn't have a good way to load/store a
given register class to memory, is it instead easy to spill/fill from
another register class instead?
e.g.
- storeRegToStack/loadRegFromStack use a pseudo instruction and add virtual
register operand is not supported (spill optimization doesn't seem to like
this).
- AMDGPU backend seems to do sth. similar?
The only
2019 Dec 18
2
Spilling to register for a given register class
Ok, thanks. Except the question was meant slightly different. Less w.r.t.
organizing the register classes, and more w.r.t. implementation. I've
noticed for instance that when trying to model this straight forwardly by
writing a vreg from spills and reading this from fills (not further
elaborated here), that the spiller can't handle vreg def-use pairs: there
are assertions making sure a
2012 Dec 07
2
[LLVMdev] Increase the number of registers in ARM
I almost change all the instruction formats. It was a huge work. I am going
to compile and run it now.
Best Regards,
A. Yazdanbakhsh
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
PhD. Student
School of Electrical and Computer Engineering
University of Wisconsin-Madison
E-mail: yazdanbakhsh
2004 Jul 01
1
[LLVMdev] MRegisterInfo::eliminateFrameIndex
The docs for the above-mentioned function say:
This method may modify or replace the specified instruction, as long as it
keeps the iterator pointing the the finished product.
What does it mean to "keep an interator". Was "invalidates the iterator"
intended, so something else.
Another question, is how do I really replace the instruction. The operator= is
private
2012 Dec 07
0
[LLVMdev] Increase the number of registers in ARM
> I almost change all the instruction formats. It was a huge work. I am going
> to compile and run it now.
We have done the similar work[1] on this topic by gcc and we have
start migrate our platform to LLVM.
In my experience, you need to take care the follow part:
* ARMBaseRegisterInfo::getRegPressureLimit
* ARMBaseRegisterInfo::getRawAllocationOrder
* CalleeSavedRegs
*
2014 Dec 05
2
[LLVMdev] illegal code generated for special architecture
Hi!
I'm making a strange observation in my backend, that ends in illegal code:
Version 1:
- I lower FrameIndex to TargetFrameIndex (nothing special)
- I generate a special address-register ADD instruction in eliminateFrameIndex() to write FramePointer + offset into a new address-register
- I use explicit load and store and address-registers in my target instruction patterns:
eg (store