Displaying 20 results from an estimated 700 matches similar to: "[LLVMdev] register scavenger"
2011 Dec 05
2
[LLVMdev] bug in ARMFrameLowering.cpp:processFunctionBeforeCalleeSavedScan
Hello LLVMDev,
I've encountered what looks like a bug in LLVM 2.9, it doesn't appear to be fixed in 3.0 either.
The problem occurs in function ARMFrameLowering.cpp:processFunctionBeforeCalleeSavedScan. There's a circular dependency in setting the variable BigStack and AFI->setHashStackFrame(true). The expression which initializes BigStack calls estimateRSSStackSizeLimit which in
2006 Oct 08
1
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
> That is irrelevant. The PEI code needs to know how much stack space is
> required for each call to allocate and align the stack frame properly. It
> gets this info from the ADJCALLSTACK instructions.
I see. Looking at PEI::calculateCalleeSavedRegisters shows that the
ADJCALLSTACK instructions is used to set up MaxCallFrameSize. Adding
debug prints also show that in the example code
2013 Nov 18
2
[LLVMdev] Unaligned load/store for callee-saved 128-bit registers
On my (out-of-tree) target I have 16 128-bit registers.
Unaligned load/store are illegal. (must 16-bytes aligned)
8 of those registers are defined as callee-saved and 8 caller-saved.
The default stack size is 4 bytes.
The target implements dynamic stack realign to make sure the stack will
always be aligned correctly when necessary.
Yet I am still getting unaligned load/store when running this
2013 Sep 26
0
[LLVMdev] Register scavenger and SP/FP adjustments
The code has changed a lot over the years. Looks like at some point of time the assumption was broken. calculateCallsInformation() may have eliminated the pseudo set up instructions already.
// If call frames are not being included as part of the stack frame, and
2013 Nov 18
0
[LLVMdev] Unaligned load/store for callee-saved 128-bit registers
----- Original Message -----
> From: "Francois Pichet" <pichet2000 at gmail.com>
> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Monday, November 18, 2013 2:26:30 PM
> Subject: [LLVMdev] Unaligned load/store for callee-saved 128-bit registers
>
>
>
> On my (out-of-tree) target I have 16 128-bit registers.
>
2013 Sep 26
1
[LLVMdev] Register scavenger and SP/FP adjustments
Thanks, I'll look into that. Still, the case where the function does
not call anything remains---in such a situation there are no
ADJCALLSTACK pseudos, so regardless of what that function you pointed at
does, there won't be any target-independent information about the SP
adjustment by the time the frame index elimination runs.
Would it make sense to have ADJCALLSTACK pseudos every
2013 Sep 26
0
[LLVMdev] Register scavenger and SP/FP adjustments
CallFrameSetupOpcode is a pseudo opcode like X86::ADJCALLSTACKDOWN64. That means when the code is expected to be called before the pseudo instructions are eliminated. I don't know why it's not the case for you. A quick look at PEI code indicates the pseudo's should not have been removed at the time when replaceFrameIndices are run.
Evan
On Sep 25, 2013, at 8:57 AM, Krzysztof
2013 Sep 25
2
[LLVMdev] Register scavenger and SP/FP adjustments
Hi All,
I'm dealing with a problem where the spill/restore instructions inserted
during scavenging span an adjustment of the SP/FP register. The result
is that despite the base register (SP/FP) being changed between the
spill and the restore, both store and load use the same immediate offset.
I see code in the PEI (replaceFrameIndices) that is supposed to track
the SP/FP adjustment:
2013 Nov 21
2
[LLVMdev] Unaligned load/store for callee-saved 128-bit registers
----- Original Message -----
> From: "Hal Finkel" <hfinkel at anl.gov>
> To: "Francois Pichet" <pichet2000 at gmail.com>
> Cc: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Sent: Monday, November 18, 2013 2:45:53 PM
> Subject: Re: [LLVMdev] Unaligned load/store for callee-saved 128-bit registers
>
> ----- Original
2013 Nov 21
0
[LLVMdev] Unaligned load/store for callee-saved 128-bit registers
BTW I managed to get around this problem by flagging all the 128-bit
registers as caller saved only.
On my system, vector registers are more likely to be used on leaf functions
anyway.
On Thu, Nov 21, 2013 at 3:24 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
> > From: "Hal Finkel" <hfinkel at anl.gov>
> > To: "Francois
2013 Nov 21
2
[LLVMdev] Unaligned load/store for callee-saved 128-bit registers
----- Original Message -----
> From: "Francois Pichet" <pichet2000 at gmail.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "Chad Rosier" <mcrosier at codeaurora.org>, "Jakob Stoklund Olesen" <jolesen at apple.com>, "LLVM Developers Mailing
> List" <llvmdev at cs.uiuc.edu>
> Sent: Thursday, November
2013 Sep 26
2
[LLVMdev] Register scavenger and SP/FP adjustments
Consider this example:
--- ex.ll ---
declare void @bar()
; Function Attrs: nounwind optsize
define void @main() {
entry:
%hin = alloca [256 x i32], align 4
%xin = alloca [256 x i32], align 4
call void @bar()
ret void
}
-------------
Freshly built llc:
llc -O2 -march=x86 < ex.ll -print-before-all
# *** IR Dump Before Prologue/Epilogue Insertion & Frame Finalization ***:
#
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
2006 Oct 06
2
[LLVMdev] should PEI::calculateFrameObjectOffsets align the stack?
In ARM the stack should be 8 bytes aligned during function calls. A
function that has at least one function call then has a stack size of
8 bytes. PEI::calculateFrameObjectOffsets corretly computes this
correctly.
The problem is that the alignment is computed before adding space for
the call frame size. This is done in emitProlog. Currently the ARM
backend has a bug in that it doesn't align
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)
2017 Jan 19
2
Spare Register at one Machine Instruction
There is also the LivePhysReg facility that I would recomment if you just want to query for a free register and do not need the full feature set of the RegisterScavenger.
- Matthias
> On Jan 19, 2017, at 5:50 AM, Nemanja Ivanovic via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>
> I believe what you're after is the register scavenger.
> It's in:
2017 Jan 21
3
Spare Register at one Machine Instruction
I'm not sure exactly what you're after.
I was under the impression that you want to know which register is live at
a specific point (an instruction). If that's the case, how do one of the
two suggested solutions not suffice?
If a register is live-in to a block and not killed before your instruction
or it has a def and no kill within the block, it is live. Otherwise it is
dead and
2011 Dec 05
1
[LLVMdev] bug in ARMFrameLowering.cpp:processFunctionBeforeCalleeSavedScan
Hi Alok,
Echoing Anton's statements, please provide a testcase! :)
Apart from that, looking at your patch and description I actually think that it is estimateRSStackSizeLimit that is wrong.
It is performing a check for a Thumb2 addressing mode whether the target has a FP register. That's the main check - for some reason it is appending another check AFI->hasStackFrame() which seems
2013 Jan 27
1
[LLVMdev] Clarification about callee saved regs and MachineRegisterInfo::isPhyRegUsed
Hi,
I am confused about the call to isPhyRegUsed in
calculateCalleeSavedRegisters:
if (Fn.getRegInfo().isPhysRegUsed(Reg))
{
// If the reg is modified, save it!
CSI.push_back(CalleeSavedInfo(Reg));
}
It seems that isPhyRegUsed
returns true if the register is read or written in the function.
If
this is right, why do we save a register if it is only read in the
function ?? I would have
2011 Aug 24
1
[LLVMdev] Segmented Stacks (re-roll)
Hi!
> According to the patch you send, the pass is not doing anything:
>
> +bool StackSegmenter::runOnMachineFunction(MachineFunction &MF) {
> + return false;
> +}
> +
It is, in the next patch.
diff --git a/lib/CodeGen/StackSegmenter.cpp b/lib/CodeGen/StackSegmenter.cpp
index 5ffb8f2..cc2ca87 100644
--- a/lib/CodeGen/StackSegmenter.cpp
+++ b/lib/CodeGen/StackSegmenter.cpp