Displaying 20 results from an estimated 2000 matches similar to: "Canonical way to handle zero registers?"
2018 Jan 04
2
Canonical way to handle zero registers?
On Tue, Jan 2, 2018 at 8:28 AM, Daniel Sanders <daniel_l_sanders at apple.com>
wrote:
> Hi Sean,
>
> Just to give the GlobalISel perspective on this,
Thanks for chiming in!
> GlobalISel supports the declaration of a zero register in the register
> class like so:
> def GPR32z : RegisterOperand<GPR32> {
> let GIZeroRegister = WZR;
>
2018 Jan 02
0
Canonical way to handle zero registers?
Hi Sean,
Just to give the GlobalISel perspective on this, GlobalISel supports the declaration of a zero register in the register class like so:
def GPR32z : RegisterOperand<GPR32> {
let GIZeroRegister = WZR;
}
With that definition, the tablegen-erated ISel code will try to replace will try to replace 'G_CONSTANT s32 0' with WZR whenever the operand is specified as GPR32z.
>
2018 Jan 04
0
Canonical way to handle zero registers?
> On 3 Jan 2018, at 19:44, Sean Silva <chisophugis at gmail.com> wrote:
>
>
> On Tue, Jan 2, 2018 at 8:28 AM, Daniel Sanders <daniel_l_sanders at apple.com <mailto:daniel_l_sanders at apple.com>> wrote:
> Hi Sean,
>
> Just to give the GlobalISel perspective on this,
>
> Thanks for chiming in!
>
> GlobalISel supports the declaration of a zero
2017 Dec 24
4
Canonical way to handle zero registers?
Thanks, that sounds like it would work. Was this based on what any other
target did? Or do any other targets take this approach?
I just want to make sure that we don't already have a hook suitable for
this. Overriding runOnFunction to run what could be described as just a
"late SelectionDAG pass" sounds pretty intrusive. Do you remember other
approaches that didn't work?
--
2018 Dec 05
2
Strange regalloc behaviour: one more available register causes much worse allocation
Preamble
--------
While working on an IR-level optimisation completely unrelated to register
allocation I happened to trigger some really strange register allocator
behaviour causing a large regression in bzip2 in spec2006. I've been trying
to fix that regression before getting the optimisation patch committed, because
I don't want to regress spec2006, but I'm basically fumbling in
2018 Dec 05
3
Strange regalloc behaviour: one more available register causes much worse allocation
enableAdvancedRASplitCost() does the same thing as ConsiderLocalIntervalCost, but as a
subtarget option instead of a command-line option, and as I’ve said it doesn’t help because
it’s a non-local interval causing the eviction chain (RAGreedy::splitCanCauseEvictionChain
only considers the local interval for a single block, and it’s unclear to me how to make it
handle a non-local interval).
John
2017 Oct 25
3
How vregs are assigned to operands in IR
Hi,
I'm trying to understand how virtual regs are assigned to operands in
IR instructions. I looked into SelectionDAG but could not figure out
where the assignment happens. How and where does this conversion
happen?
Furthermore, I want to build a map between variable and the virtual
register (x corresponds to vreg11 in below code).
I've been stuck here for a while. Any help is greatly
2013 Apr 12
1
[LLVMdev] Problem with Store of i8 in a global address
Hi,
I am creating a new backend for a custom microcontroller.
In order to create the backend I am modifying from Mips backend.
My architecture has a store instruction with direct address mode. It
accepts two arguments: source register and address (immediate). This
instruction is not available in Mips, but it is in Hexagon, so I copied
from Hexagon the following, adapting it to my registers:
-
2012 May 11
2
[LLVMdev] TableGen pattern for negated operand
I've been unable to come up with the TableGen recipe to match a
negated operand. My target asm syntax allows the following transform:
FNEG r8, r5
MUL r6, r8, r9
to
MUL r6, -r5, r9
Is there a Pattern<> syntax that would allow matching *any* opcode (or
even some subset), not just MUL, with a FNEG'd operand? I expect I can
define a PatFrag:
def fneg_su : PatFrag<(ops
2012 May 11
0
[LLVMdev] TableGen pattern for negated operand
Hi Joe,
Le 11/05/2012 02:13, Joe Matarazzo a écrit :
> I've been unable to come up with the TableGen recipe to match a
> negated operand. My target asm syntax allows the following transform:
>
> FNEG r8, r5
> MUL r6, r8, r9
>
> to
>
> MUL r6, -r5, r9
>
> Is there a Pattern<> syntax that would allow matching *any* opcode (or
> even some
2016 Mar 18
2
Immediate operand for load instruction, in back end
Hello,
I'm trying to define in my new back end, in MyBackendInstrInfo.td file, a vector load
instruction that takes an immediate address operand. (I got inspired from Mips' MSA SIMD
extensions.)
Could you please tell me what's the right way to do it?
Here, the load class has $addrsrc which is a relative address with base a certain
register and offset:
class
2016 Dec 11
2
TableGen - Help to implement a form of gather/scatter operations for Mips MSA
Hello.
Will, thanks a lot for pointing me to the MaskedGatherSDNode and mgatherv4i32. I have
to say that the definition of the "multiclass avx512_gather" from
lib/Target/X86/X86InstrAVX512.td is difficult to follow and I prefer not to use it.
I currently have some serious problems with TableGen - it gives an assertion failure:
2019 Aug 23
2
Using [GlobalISel] to provide peephole optimizations
Hi,
GlobalISel is fantastic, but obviously lacks a lot of the transforms that
makes SelectionDAG so good. Whilst it's plenty usable, you'll find yourself
wanting/needing to add a lot of manual little transforms to clean things up.
I know of the RFC for a new Combiner with its own syntax
(https://reviews.llvm.org/D54286 is the latest I can find of it), but after
manually adding my Nth
2013 Oct 08
1
[LLVMdev] Post Increment Indirect Move Instructions
Hi Hal,
On Tuesday 01 October 2013 06:22 PM, Hal Finkel wrote:
> ----- Original Message -----
>> Hi Hal,
>>
>>
>> Our Architecture has indirect move instruction which increments
>> the
>> pointer implicitly and the target only has i8 type values. So the
>> load
>> of i16 will be converted to two i8 target loads wherein after the
2016 Dec 15
2
TableGen - Help to implement a form of gather/scatter operations for Mips MSA
Hello.
I fixed the bug reported in the previous post on this thread
(<<llvm::MemSDNode::MemSDNode(unsigned int, unsigned int, const llvm::DebugLoc&,
llvm::SDVTList, llvm::EVT, llvm::MachineMemOperand*): Assertion `memvt.getStoreSize() <=
MMO->getSize() && "Size mismatch!"' failed.>>)
The problem with this strange error reported comes from
2016 Dec 12
0
TableGen - Help to implement a form of gather/scatter operations for Mips MSA
Hello.
I wanted to inform that I fixed the bug from the previous email.
The main reason for the bug was that I thought that the SDNode masked_gather is
returning only 1 value, but it returns 2 (hence, I guess, the earlier reported, difficult
to follow, error: "Assertion `New->getNumTypes() == 1").
masked_gather returns 2 values because:
// SDTypeProfile -
2015 Feb 19
2
[LLVMdev] ScheduleDAGInstrs computes deps using IR Values that may be invalid
Hi All,
I've encountered an issue where tail merging MIs is causing a problem with
the post-RA MI scheduler dependency analysis and I'm not sure of the best
way to address the problem.
In my case, the branch folding pass (lib/CodeGen/BranchFolding.cpp) is
merging common code from BB#14 and BB#15 into BB#16. It's clear that
there are 4 common instructions (marked with an *) in BB#14
2012 Sep 05
5
[LLVMdev] 64 bit special purpose registers
Micah,
Do you mean we should make GPR64 available to register allocator by calling
addRegisterClass?
addRegisterClass(MVT::i64, &GPR64RegClass)
If we add register class GPR64, type legalization will stop expanding i64
operations because i64 is now a legal type.
Then we will probably have to write lots of code to custom-lower
unsupported 64-bit operations during legalization. Note that
2012 Aug 06
2
[LLVMdev] 64 bit special purpose registers
On Mips 32 there is traditionally a 64 bit HI/LO register for the result
of multiplying two 64 bit numbers.
There are corresponding instructions to load the LO and HI parts into
individual 32 registers.
On Mips with the DSP ASE (an application specific extension), there are
actual 4 such pairs of
registers.
Is there a way to have special purpose 64 bit registers without actually
having to
2017 Nov 11
2
RFC: [GlobalISel] Towards a generic MI combiner framework
On 11/11/2017 12:44 PM, Amara Emerson wrote:
>
>> On Nov 10, 2017, at 10:04 PM, Aditya Nandakumar <proaditya at gmail.com
>> <mailto:proaditya at gmail.com>> wrote:
>>>
>>> The current DAGCombine, being constructed on top of SDAG, has a kind
>>> of built-in CSE and automatic DCE. How will things change, if
>>> they'll change, in