Displaying 20 results from an estimated 30 matches for "tgpr".
Did you mean:
gpr
2020 Mar 31
2
[ARM] Register pressure with -mthumb forces register reload before each call
...foo. Thus %0, %1 and %2 get assigned r6, r5 and r4
respectively, and %3 which holds foo's address doesn't have any
register left.
Since it's live-range has least weight, it does not evict any existing interval,
and gets split. Eventually we have the following allocation:
[%0 -> $r6] tGPR
[%1 -> $r5] tGPR
[%2 -> $r4] tGPR
[%6 -> $r3] tGPR
[%11 -> $r3] tGPR
[%16 -> $r3] tGPR
[%17 -> $r3] tGPR
where %6, %11, %16 and %17 all are derived from %3.
And since r3 is a call-clobbered register, the compiler is forced to
reload foo's address
each time before blx.
To fix...
2020 Apr 07
2
[ARM] Register pressure with -mthumb forces register reload before each call
...ssigned r6, r5 and r4
> respectively, and %3 which holds foo's address doesn't have any
> register left.
> Since it's live-range has least weight, it does not evict any existing interval,
> and gets split. Eventually we have the following allocation:
>
> [%0 -> $r6] tGPR
> [%1 -> $r5] tGPR
> [%2 -> $r4] tGPR
> [%6 -> $r3] tGPR
> [%11 -> $r3] tGPR
> [%16 -> $r3] tGPR
> [%17 -> $r3] tGPR
>
> where %6, %11, %16 and %17 all are derived from %3.
> And since r3 is a call-clobbered register, the compiler is forced to
> reloa...
2020 Apr 15
4
[ARM] Register pressure with -mthumb forces register reload before each call
...bl "<90>w\n "
mov r0, r5
mov r1, r4
mov r2, r6
ldr r6, .LCPI0_0
blx r6
mov r0, r5
mov r1, r5
mov r2, r4
blx r6
regalloc dump (attached) shows:
Inline spilling tGPR:%9 [80r,152r:0) 0 at 80r weight:3.209746e-03
>From original %3
also spill snippet %8 [152r,232r:0) 0 at 152r weight:2.104167e-03
tBL 14, $noreg, &bar, implicit-def $lr, implicit $sp, implicit
killed $r0, implicit killed $r1, implicit killed $r2
folded: 144r tBL 14, $no...
2019 Apr 14
2
[A bug?] Failed to use BuildMI to add R7 - R12 registers for tADDi8 and tPUSH of ARM
Hi Craig,
Thanks for the information. Can you point to the source that specifies tGPR to be R0 - R7?
I tried to search in ARMInstrThumb.td but couldn’t find it.
Thanks,
- Jie
On Apr 14, 2019, at 15:28, Craig Topper <craig.topper at gmail.com<mailto:craig.topper at gmail.com>> wrote:
I believe there is probably a separate instruction in LLVM for thumb2 add. Probably st...
2020 Apr 15
2
[ARM] Register pressure with -mthumb forces register reload before each call
...mov r0, r5
> mov r1, r4
> mov r2, r6
> ldr r6, .LCPI0_0
> blx r6
> mov r0, r5
> mov r1, r5
> mov r2, r4
> blx r6
>
> regalloc dump (attached) shows:
> Inline spilling tGPR:%9 [80r,152r:0) 0 at 80r weight:3.209746e-03
> From original %3
> also spill snippet %8 [152r,232r:0) 0 at 152r weight:2.104167e-03
> tBL 14, $noreg, &bar, implicit-def $lr, implicit $sp, implicit
> killed $r0, implicit killed $r1, implicit killed $r2
> folded...
2010 Sep 05
2
[LLVMdev] Possible missed optimization?
...,kill>, %R1<imp-use,kill>
We see, as Borja pointed out, that %R0 from the 108L COPY has been joined with %reg16391 and %reg16390 so it is too late to commute the xor.
Passing -disable-physical-join to prevent the %R0 sabotage, we get:
4L %reg16387<def> = COPY %R3<kill>; tGPR:%reg16387
12L %reg16386<def> = COPY %R2<kill>; tGPR:%reg16386
20L %reg16388<def> = COPY %R1<kill>; tGPR:%reg16388
28L %reg16389<def> = COPY %R0<kill>; tGPR:%reg16389
44L %reg16388<def>, %CPSR<def,dead> = tEOR %reg16388, %reg16387<ki...
2010 Sep 05
0
[LLVMdev] Possible missed optimization?
On Sat, Sep 4, 2010 at 1:31 PM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>
> On Sep 4, 2010, at 11:21 AM, Borja Ferrer wrote:
>
>> I've noticed this pattern happening with other operators aswell, but used xor in this example. As i said before, i tried with different register allocation orders, but it will produce always the same result. GCC is emitting longer
2012 May 14
3
[LLVMdev] getMinimalPhysRegClass
...compiling for -mips23 -nomips16 I don't want the mips16 register class being passed to any functions which take such a register class parameter.
>>
>> As it is right now, it sees mips16 as the minimal size class and passes it when I'm compiling for -mips32 -nomips16
> The ARM tGPR register class is the same. It has no business showing up in non-Thumb code, but it is completely harmless when it does.
>
> My best advice to you is don't try to swim upstream. The Liskov substitution principle for register classes is deeply ingrained in the LLVM register allocators.
>...
2019 Apr 14
2
[A bug?] Failed to use BuildMI to add R7 - R12 registers for tADDi8 and tPUSH of ARM
Sorry for not being specific enough. ARMv7-M includes Thumb and Thumb2.
It has 12 regular registers (R0 - R12), and R8 - R12 are used.
I can generate mov instruction that from/ R8-R12 to/from R0-R6.
From this ARM page http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0068b/ch03s03s01.html
R9 - R12 have their conventional usage, but I don’t if this is the reason we cannot
use them
2012 May 14
0
[LLVMdev] getMinimalPhysRegClass
...-mips23 -nomips16 I don't want the mips16 register class being passed to any functions which take such a register class parameter.
>>>
>>> As it is right now, it sees mips16 as the minimal size class and passes it when I'm compiling for -mips32 -nomips16
>> The ARM tGPR register class is the same. It has no business showing up in non-Thumb code, but it is completely harmless when it does.
>>
>> My best advice to you is don't try to swim upstream. The Liskov substitution principle for register classes is deeply ingrained in the LLVM register alloca...
2010 Sep 04
3
[LLVMdev] Possible missed optimization?
On Sep 4, 2010, at 11:21 AM, Borja Ferrer wrote:
> I've noticed this pattern happening with other operators aswell, but used xor in this example. As i said before, i tried with different register allocation orders, but it will produce always the same result. GCC is emitting longer code, but since LLVM is so nearer to the optimal code sequence i wanted to reach it.
In LLVM, copies are
2013 Sep 26
2
[LLVMdev] Register scavenger and SP/FP adjustments
...cp#1: 2048, align=4
BB#0: derived from LLVM BB %entry
Live Ins: %R4 %LR
tPUSH pred:14, pred:%noreg, %R4<kill>, %LR<kill>, %SP<imp-def>,
%SP<imp-use>; flags: FrameSetup
%vreg0<def> = tLDRpci <cp#0>, pred:14, pred:%noreg; flags:
FrameSetup tGPR:%vreg0
%SP<def,tied1> = tADDhirr %SP<tied0>, %vreg0<kill>, pred:14,
pred:%noreg; tGPR:%vreg0
%vreg1<def> = tLDRpci <cp#1>, pred:14, pred:%noreg; tGPR:%vreg1
%SP<def,tied1> = tADDhirr %SP<tied0>, %vreg1<kill>, pred:14,
pred...
2020 Jun 16
2
[ARM] Thumb code-gen for 8-bit imm arguments results in extra reg copies
...ire either loading from memory,
or need multiple instructions to construct, it is reasonable to pre-compute them
into registers, but for 8-bit immediate values, would it be more
beneficial to load
them directly in argument registers instead ?
Looking at the ISel dump, for the above test-case:
%0:tgpr, dead $cpsr = tMOVi8 10, 14, $noreg
%1:tgpr, dead $cpsr = tMOVi8 20, 14, $noreg
$r0 = COPY %0:tgpr
$r1 = COPY %1:tgpr
IIUC, there are a couple of reasons why this happens:
(a) tMOVi8 pattern isn't marked with isRematerializable, isAsCheapAsMove,
and isMoveImm.
(b) After annotating the pa...
2010 Sep 14
2
[LLVMdev] Thumb categorizing TST wrongly
...ue for regular ARM, false for Thumb:
(gdb) p MI->dump()
TSTri %reg16397, 3, pred:14, pred:%reg0, %CPSR<imp-def>; GPR:%
reg16397
$24 = void
(gdb) p MI->getDesc().isCompare()
$25 = true
(gdb) p MI->dump()
tTST %reg16396, %reg16397, pred:14, pred:%reg0, %CPSR<imp-def>;
tGPR:%reg16396,16397
$22 = void
(gdb) p MI->getDesc().isCompare()
$23 = false
Is this intentional or just an oversight? In latter case how do I fix
it? Tablegen input?
Thanks and cheers,
Gabor
2012 May 14
0
[LLVMdev] getMinimalPhysRegClass
...en I'm compiling for -mips23 -nomips16 I don't want the mips16 register class being passed to any functions which take such a register class parameter.
>
> As it is right now, it sees mips16 as the minimal size class and passes it when I'm compiling for -mips32 -nomips16
The ARM tGPR register class is the same. It has no business showing up in non-Thumb code, but it is completely harmless when it does.
My best advice to you is don't try to swim upstream. The Liskov substitution principle for register classes is deeply ingrained in the LLVM register allocators.
/jakob
2013 Sep 26
0
[LLVMdev] Register scavenger and SP/FP adjustments
...=4
>
> BB#0: derived from LLVM BB %entry
> Live Ins: %R4 %LR
> tPUSH pred:14, pred:%noreg, %R4<kill>, %LR<kill>, %SP<imp-def>, %SP<imp-use>; flags: FrameSetup
> %vreg0<def> = tLDRpci <cp#0>, pred:14, pred:%noreg; flags: FrameSetup tGPR:%vreg0
> %SP<def,tied1> = tADDhirr %SP<tied0>, %vreg0<kill>, pred:14, pred:%noreg; tGPR:%vreg0
> %vreg1<def> = tLDRpci <cp#1>, pred:14, pred:%noreg; tGPR:%vreg1
> %SP<def,tied1> = tADDhirr %SP<tied0>, %vreg1<kill>, pred:1...
2013 Sep 26
1
[LLVMdev] Register scavenger and SP/FP adjustments
...om LLVM BB %entry
>> Live Ins: %R4 %LR
>> tPUSH pred:14, pred:%noreg, %R4<kill>, %LR<kill>, %SP<imp-def>,
>> %SP<imp-use>; flags: FrameSetup
>> %vreg0<def> = tLDRpci <cp#0>, pred:14, pred:%noreg; flags:
>> FrameSetup tGPR:%vreg0
>> %SP<def,tied1> = tADDhirr %SP<tied0>, %vreg0<kill>, pred:14,
>> pred:%noreg; tGPR:%vreg0
>> %vreg1<def> = tLDRpci <cp#1>, pred:14, pred:%noreg; tGPR:%vreg1
>> %SP<def,tied1> = tADDhirr %SP<tied0>, %vreg...
2011 Aug 16
2
[LLVMdev] Tying an instruction to a specific set of registers
Jim,
Thanks for the hints. Does LLVM allow allocation of the same register across register classes?
For example, in the ARM backend, can an instruction write to R0 when it is part of register class tGPR, but then use R0 in the next instruction as a source register from the rGPR class?
If LLVM can do this, then this will work.
Micah
> -----Original Message-----
> From: Jim Grosbach [mailto:grosbach at apple.com]
> Sent: Tuesday, August 16, 2011 9:33 AM
> To: Villmow, Micah
> Cc: l...
2012 May 14
4
[LLVMdev] getMinimalPhysRegClass
On 05/14/2012 02:17 PM, Jakob Stoklund Olesen wrote:
> On May 14, 2012, at 1:02 PM, reed kotler wrote:
>
>> Does anyone understand the purpose of :
>>
>> TargetRegisterInfo::getMinimalPhysRegClass ???
> Barely.
>
>> Why is there the presumption to use the minimal subclass?
> The function can be traced back to a time when men were men and registers belonged to
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