Displaying 20 results from an estimated 900 matches similar to: "PEI::replaceFrameIndices() endless loop"
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:
2007 Sep 06
1
[LLVMdev] Prolog/Epilog Insertion Question
I've been looking through the code for pologue/epilogoue generation and
noticed this oddity:
void PEI::replaceFrameIndices(MachineFunction &Fn) {
[...]
for (MachineBasicBlock::iterator I = BB->begin(); I != BB->end(); ) {
[...]
if (I->getOpcode() == FrameSetupOpcode ||
I->getOpcode() == FrameDestroyOpcode) {
[...]
} else {
2018 Mar 27
1
Live Interval Analysis and pipelining.
Hi,
I'm writing a backend for a proprietary microcontroller.
I'm facing a limitation related to Live Interval Analysis.
Some FPU instructions, most notably the FDIV, requires a few cycles to complete.
There is a pipeline and, during the execution of the FDIV, others instructions could be executed in parallel, provided they don't use the same registers.
This pipeline has been modeled
2018 Mar 30
0
Mapping virtual registers to physical registers
Hi again,
After further investigation, I've found that the private PhysRegUseDefLists array ("head of use/def list for physical register") from MachineRegisterInfo class seems to be empty.
But I didn't found any methods for updating such data structure. How/where this "use/def list" should be managed ?
Is the documentation
2017 Jul 27
2
Are there some strong naming conventions in TableGen?
Hi,
For the development of a new micro-controller backend, I try to lowering the following store SDNode: t5: ch = store<ST2[%ptr2](align=4)> t0, Constant:i16<3>, FrameIndex:i16<1>, undef:i16
I have defined the following instruction and associated DAG pattern.
def MOVSUTO_A_i32o : CLPFPU_A_i32o_Inst<0b1000001101,
2018 Apr 10
1
How to finalize instruction lowering after register allocation.
Hi,
I've some problems/questions while implementing the BUILD_VECTOR primitive for a SIMD microcontroller...
This microcontroller has two FPU units: UnitA and UnitB.
UnitA has a bank of 512 registers named RegisterA_0 .. RegisterA_511.
UnitB has a bank of 512 registers named RegisterB_0 .. RegisterB_511.
The FPU instruction format has a 2 bits operand indicating which units are involved:
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
2017 Jul 24
2
How to lower a 'Store' node using the list<dag> pattern.
Hi,
I'm trying to complete the lowering for a new microcontroller. I'm using LLVM 3.8.
For now this lowering crashes on 'Store' node, which is actually not yet defined.
I've tried to map the ISel 'Store' node to architecture specific instructions.
I've define the following semantic to my architecture specific instructions:
def MOVSUTO_SU_rr :
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
2018 May 04
0
How to constraint instructions reordering from patterns?
Krzysztof,
Thanks for your interest to my questions.
In order to clarify the context, here is the C source file of my test case.
The 3 builtins initialize some stack pointers. They have to be executed before any other instruction.
extern float fdivfaddfmul_a(float a, float b, float c, float d);
volatile static float x1,x2,x3,x4;
void _start(void)
{
float res;
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 ***:
#
2018 Sep 20
2
Errononous scheduling of COPY instruction.
Hi,
I've instruction scheduling problem that I cannot further investigate by myself... Could someone give me some clues?
After Instruction selection, here is part of the generated instruction.
NOP
MOV_AB_ro @s1, %fab_roff0
%6:fpuaoffsetclass = COPY %fab_roff0; FPUaOffsetClass:%6
MOV_A_oo %6, def %5; FPUaOffsetClass:%6,%5
MOVSUTO_A_iSLo 24575, def %7;
2014 Mar 06
4
[LLVMdev] llvm-mc and endianess.
Hi,
As a first step to port the LLVM chain on an in-house big-endian processor, I'm integrating the native assembler as a new '-assemble -arch=' in llvm-mc.
All work quite well, I have a correct output ELF format except that generated code is little-endian.
I've understood that the endianess of the LLVM chain is controlled by the DataLayout class, but it appear to me that llvm-mc
2017 Sep 20
1
Store lowering -> Cannot select FrameIndex.
Hi,
I'm try to lower the store LLVM-IR instruction as per the following LLVM IR program:
*** IR Dump After Module Verifier ***
define void @storeloadi32() {
%ptr = alloca i32
store volatile i32 12, i32* %ptr
ret void
}
The target instruction is associated to the store like this:
def MOVSUTO_A_iSLr : CLPFPU_A_iSLr<0b1000001101,
2018 May 04
0
How to constraint instructions reordering from patterns?
Here is a last example to illustrate my concern.
The problem is about the lowering of node t13.
Initial selection DAG: BB#0 '_start:entry'
SelectionDAG has 44 nodes:
t11: i16 = Constant<0>
t0: ch = EntryToken
t3: ch = llvm.clp.set.rspa t0, TargetConstant:i16<392>, Constant:i32<64>
t5: ch = llvm.clp.set.rspb t3,
2018 Apr 23
2
pre-RA scheduling/live register analysis optimization (handle move) forcing spill of registers
Hi,
I have a question related to pre-RA scheduling and spill of registers.
I'm writing a backend for two operands instructions set, so FPU operations result have implicit destination.
For example, the result of FMUL_A_oo is implicitly the register FA_ROUTMUL.
I have defined FPUaROUTMULRegisterClass containing only FA_ROUTMUL.
During the instruction lowering, in order to avoid frequent spill
2018 Apr 03
1
Mapping virtual registers to physical registers
Hi Krzysztof, Thanks for your response.
I was trying to map function input parameters to machine specific registers.
My solution I found is based to the RegInfo.setSimpleHint() API.
Here is the body of the parameters loop of TargetLowering::LowerFormalArguments
VReg = RegInfo.createVirtualRegister(RC);
RegInfo.setSimpleHint(VReg,CLP::FA_ROFF1+i);
2018 Apr 12
2
How to specify the RegisterClass of an IMPLICIT_DEF?
Hi,
I'm implementing the built_vector as an IMPLICIT_DEF followed by INSERT_SUBREGs. This approach is the one of the SPARC architecture.
def : Pat<(build_vector (f32 fpimm:$a1), (f32 fpimm:$a2)),
(INSERT_SUBREG(INSERT_SUBREG (v2f32 (IMPLICIT_DEF)),
(i32 (COPY_TO_REGCLASS (MOVSUTO_A_iSLo (bitcast_fpimm_to_i32 f32:$a1)), FPUaOffsetClass)), A_UNIT_PART),
2018 Apr 02
0
Mapping virtual registers to physical registers
Hi Dominique,
From your description it is not really clear what you are trying to do
here. It may be the case that the goal you are trying to accomplish can
be better reached using a different approach.
In general, optimizations don't try to assign physical registers, that's
done by the register allocation passes. There are some cases when
target-specific passes use physical