Displaying 20 results from an estimated 2000 matches similar to: "problem with non-allocatable register classes"
2019 Aug 27
2
TargetRegisterInfo::getCommonSubClass bug, perhaps.
Hi,
ABCRegister.td :
def SGPR32 : RegisterClass<"ABC", [i32], 16, (add
S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11,
S12, S13, S14, S15
)>;
def SFGPR32 : RegisterClass<"ABC", [f32], 16, (add
S0, S1, S2, S3, S4, S5, S6, S7, S8, S9, S10, S11,
S12, S13, S14, S15
)>;
===== Instruction selection ends:
...
t8: i32 = ADDrr t37, t32
2015 Aug 25
2
[LLVMdev] TableGen Register Class not matching for MI in 3.6
I have not tried 3.5, it's a significant amount of work to port from one
version to the next though, I did not personally do the 3.4 to 3.6 porting.
I agree though, it was very strange that it suddenly just changed behavior.
It looks like to me that InstrEmitter.cpp:getVR is the one assigning the
virtual register no?
Though this code in CreateVirtualRegisters:
const TargetRegisterClass *RC
2015 Aug 25
2
[LLVMdev] TableGen Register Class not matching for MI in 3.6
AddRegisterOperand calls getVR and yes, I think an IMPLICIT_DEF is being
generated.
On Tue, Aug 25, 2015 at 2:40 PM, Quentin Colombet <qcolombet at apple.com>
wrote:
>
> On Aug 25, 2015, at 11:05 AM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
> I have not tried 3.5, it's a significant amount of work to port from one
> version to the next though, I did not
2015 Aug 25
2
[LLVMdev] TableGen Register Class not matching for MI in 3.6
1. MOV16Copy_IMM_REG is the instruction matched, sorry. AD is the
multiclass. The IMM in my case is a global. So you can see that
GPRBaseRegs, GPRBaseRegs sets the registerclass for both the src and dst
operands, in this case (MOV16Copy_IMM_REG) it's the dst.
2. Yes I agree, it most likely would.
Honestly, this comes across like a bug, or unintended feature. It's adding
an extra COPY to
2015 Aug 25
2
[LLVMdev] TableGen Register Class not matching for MI in 3.6
Here is the instruction in question:
multiclass AD<string asmstr, SDPatternOperator OpNode, RegisterClass
srcAReg,
RegisterClass dstReg, ValueType srcAType,
ValueType dstType, Operand ImmOd, ImmLeaf imm_type>
{
def REG_REG : SetADInOut<asmstr, srcAReg, dstReg,
[(set dstReg:$dstD, (OpNode srcAReg:$srcA))]>;
def IMM_REG :
2015 Aug 25
4
[LLVMdev] TableGen Register Class not matching for MI in 3.6
Hi Ryan,
> On Aug 24, 2015, at 6:49 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
> Quentin,
>
> I apologize for the spamming here but in getVR (where VReg is assigned an RC), it calls:
>
> const TargetRegisterClass *RC = TLI->getRegClassFor(Op.getSimpleValueType());
> VReg = MRI->createVirtualRegister(RC);
>
> My question is why is it using the
2015 Aug 25
2
[LLVMdev] TableGen Register Class not matching for MI in 3.6
BB#0: derived from LLVM BB %entry
%vreg0<def> = MOV16Copy_IMM_REG <ga:@a+1>[TF=1]; GPRRegs:%vreg0
%vreg1<def> = COPY %vreg0; PTRRegs:%vreg1 GPRRegs:%vreg0
Send_iii %NULLR0, %vreg1<kill>, 1, 1, 1, 1, 0; PTRRegs:%vreg1
RetRA
This is what I get. This is what I'd like to get:
BB#0: derived from LLVM BB %entry
%vreg0<def> = MOV16Copy_IMM_REG
2015 Aug 25
2
[LLVMdev] TableGen Register Class not matching for MI in 3.6
> On Aug 24, 2015, at 4:46 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
> Here is the snippet that matters:
>
> void
> InstrEmitter::AddRegisterOperand(MachineInstrBuilder &MIB,
> SDValue Op,
> unsigned IIOpNum,
> const MCInstrDesc *II,
>
2010 Sep 13
0
[LLVMdev] Multi-class register allocatable only in one class
On Sep 13, 2010, at 6:59 AM, Carlos Sánchez de La Lama wrote:
> Hi people,
>
> the LinearScan register allocator tries to use same register for both
> live intervals, if the new interval is defined by a register copy
> whose destination reg is compatible with the source register. This is
> ok. However, this "check for compatibility" is wrongly done IMHO.
>
2010 Sep 13
1
[LLVMdev] Multi-class register allocatable only in one class
Hi Jakob,
>> Say I have regclass1 with reg A, and regclass2 with regs {A, B}, but
>> regclass2 defines only "B" as allocatable by RA.
>
> The register allocator assumes in many places that a register is
> either allocatable or reserved independently of the register class.
Is there any reason for this? I mean, the methods for allowing one
physical reg be
2015 Aug 25
2
[LLVMdev] TableGen Register Class not matching for MI in 3.6
Quentin,
This is the issue. Somewhere prior to the constrainRegClass, it's
assigning the GPRBase sub class of GPR to the MOV instruction, so it can't
constrain it to Base and hence has to add the COPY. Now I just need to find
out why it is ignoring the TableGen defined GPRBase for the MOV MI in favor
of it's sub class GPR.
Thanks.
On Mon, Aug 24, 2015 at 8:34 PM, Ryan Taylor
2010 Sep 13
2
[LLVMdev] Multi-class register allocatable only in one class
Hi people,
the LinearScan register allocator tries to use same register for both
live intervals, if the new interval is defined by a register copy
whose destination reg is compatible with the source register. This is
ok. However, this "check for compatibility" is wrongly done IMHO.
Say I have regclass1 with reg A, and regclass2 with regs {A, B}, but
regclass2 defines only
2005 Jul 23
0
[LLVMdev] How to partition registers into different RegisterClass?
On Sat, 23 Jul 2005, Tzu-Chien Chiu wrote:
> 2005/7/23, Chris Lattner <sabre at nondot.org>:
>> What does a 'read only' register mean? Is it a constant (e.g. returns
>> 1.0)? Otherwise, how can it be a useful value?
>
> Yes, it's a constant register.
>
> Because the instruction cannot contain an immediate value, a constant
> value may be stored in
2012 Feb 15
0
[LLVMdev] Performance problems with FORTRAN allocatable arrays
Hi Wonsun, can you please provide a testcase.
Best wishes, Duncan.
> I've noticed that LLVM does a bad job of optimizing array indexing
> code for FORTRAN arrays declared using the ALLOCATABLE keyword.
>
> For example if you have something like the following:
>
> DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:,:) :: QAV
> ...
> ALLOCATE( QAV(
2015 Aug 24
2
[LLVMdev] TableGen Register Class not matching for MI in 3.6
> On Aug 24, 2015, at 1:30 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
> I'm trying to do something like this:
>
> // Dst = NewVReg's reg class
> // *II = MCInstrDesc
> // IIOpNum = II Operand Num
>
> if (TRI->getCommonSubClass(DstRC, TRI->getRegClass(II->OpInfo[IIOpNum].RegClass)) == DstRC)
> MRI->setRegClass(VReg, DstRC);
>
2012 Feb 15
2
[LLVMdev] Performance problems with FORTRAN allocatable arrays
I've noticed that LLVM does a bad job of optimizing array indexing
code for FORTRAN arrays declared using the ALLOCATABLE keyword.
For example if you have something like the following:
DOUBLE PRECISION,ALLOCATABLE,DIMENSION(:,:,:,:) :: QAV
...
ALLOCATE( QAV( -2:IMAX+2,-2:JMAX+2,-2:KMAX+2,ND) )
...
DO L = 1, 5
DO K = K1, K2
DO J = J1, J2
DO I = I1, I2
II = I +
2007 Feb 25
1
[LLVMdev] X86RegisterInfo.td
In the X86RegisterInfo.td file, RST is defined like this:
// Floating point stack registers (these are not allocatable by the
// register allocator - the floating point stackifier is responsible
// for transforming FPn allocations to STn registers)
def RST : RegisterClass<"X86", [f64], 32,
[ST0, ST1, ST2, ST3, ST4, ST5, ST6, ST7]> {
let MethodProtos =
2018 Dec 21
2
[RFC] Allocatable Global Register Variables for ARM
Hi all,
This is a RFC on support for Global Register Variables in the Arm backend.
Whilst there has been some prior discussion about whether or not LLVM should (or even needs to) support global register variables,
today there seems to be a good measure of support for this in both Clang+LLVM (although it is currently limited to SP).
When most of this support landed there was some concern
2005 Jul 23
3
[LLVMdev] How to partition registers into different RegisterClass?
2005/7/23, Chris Lattner <sabre at nondot.org>:
>
> What does a 'read only' register mean? Is it a constant (e.g. returns
> 1.0)? Otherwise, how can it be a useful value?
Yes, it's a constant register.
Because the instruction cannot contain an immediate value, a constant
value may be stored in a constant register, and it's defined _before_
the program starts by
2005 Jul 25
2
[LLVMdev] How to partition registers into different RegisterClass?
Thanks, I think it can solve my problem.
But please allow me to explain the hardware in detail. Hope there is
more elegant way to solve it.
The hardware is a "stream processor". That is, It processes samples
one by one. Each sample is associated with several 128-bit
four-element vector registers, namely:
* input registers - the attributes of the sample, the values of the
registers