similar to: Musings on the TableGen -emit-dag-isel backend

Displaying 20 results from an estimated 40000 matches similar to: "Musings on the TableGen -emit-dag-isel backend"

2020 Nov 12
0
Musings on the TableGen -emit-dag-isel backend
This is great! Thanks Paul! I think that the 9x reduction in compile-time is well worth the 4% size increase. TableGen's run-time has been a sore point and a source of complaints for quite some time. -- Krzysztof Parzyszek kparzysz at quicinc.com AI tools development -----Original Message----- From: llvm-dev <llvm-dev-bounces at lists.llvm.org> On Behalf Of Paul C.
2020 Nov 13
0
Musings on the TableGen -emit-dag-isel backend
This is the size of the table, not the size of the overall binary, right? I would imagine that a 4% growth in the size of the table is a substantially smaller growth in the total executable size of, say, clang. If the overall growth is minuscule (say, under 1%), then this seems like the clear path forward. I’m also optimistic that we might be able to find other ways to shrink the tables to make
2020 Nov 12
2
Musings on the TableGen -emit-dag-isel backend
A rather notorious aspect of TableGen is the time required to run the -emit-dag-isel backend on some targets, including AMDGPU and X86. I added a timing feature to TableGen and timed the AMDGPU run. ===-------------------------------------------------------------------------=== TableGen Phase Timing
2020 Nov 13
1
Musings on the TableGen -emit-dag-isel backend
Would it make sense for TableGen to generate the outer OPC_SwitchOpcode offset table? At 11/13/2020 07:53 AM, Nicolai Hähnle wrote: >That said, if we are seriously thinking about the performance of the byte code, perhaps some of these opcodes should be reconsidered at a higher level anyway. > >For example: The overall bytecode always begins with an OPC_SwitchOpcode implemented as a
2020 Nov 13
4
Musings on the TableGen -emit-dag-isel backend
I wouldn't want to be too hasty about simply removing the relaxation algorithm. The size and speed of the compiler affects all users, but the time to compile the compiler "only" affects us compiler developers. And I speak as a developer who is heavily affected by the time to compile the AMDGPU backend. One off-the-cuff idea (I haven't even looked at the code yet): could we pass
2020 Nov 13
0
Musings on the TableGen -emit-dag-isel backend
On 13.11.20 13:22, Paul C. Anagnostopoulos via llvm-dev wrote: > Your suggestion for two passes is indeed my plan if simply using 3-byte sizes is not acceptable. I don't want to duplicate all the logic in a second length-calculating function, so I would just have special logic for the three matching operators with children and use the existing function for the rest, passing a null output
2020 Nov 13
3
Musings on the TableGen -emit-dag-isel backend
Your suggestion for two passes is indeed my plan if simply using 3-byte sizes is not acceptable. I don't want to duplicate all the logic in a second length-calculating function, so I would just have special logic for the three matching operators with children and use the existing function for the rest, passing a null output stream. Or I could conditionalize all the output on another function
2020 Nov 13
0
Musings on the TableGen -emit-dag-isel backend
I took a look at all the OPC_SwitchOpcode operators in the matching tables. Almost every target starts with a large one, which is now cached by the interpreter. Instead, TableGen could build the opcode -> offset table. But there are also many other opcode switches with between 10 and 70 cases. To speed these up, we could embed a sorted opcode -> offset table right in the matcher code. Or,
2020 Nov 19
0
Work on DAG Isel for TableGen and compiler
I would like to know why this patch https://reviews.llvm.org/D90973 had such a drastic size effect on the global isel tablegened matcher table for riscv. It only changed the DAG ISel table by about 15K. But the global isel table shrinks by over 200K. ~Craig On Wed, Nov 18, 2020 at 1:37 PM Paul C. Anagnostopoulos via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Given that I'm
2020 Nov 18
2
Work on DAG Isel for TableGen and compiler
Given that I'm only somewhat up-to-speed on the DAG ISel scheme and not much at all on the Global ISel scheme, I'm tempted to work on the former and then the latter. So I'll look at the CodeGenDAGPatterns messages first. Then I will take a look at Global ISel. Matt: Can you suggest one or two things about Global ISel that could use some work? I won't get to it quickly, but it will
2020 Nov 18
3
Work on DAG Isel for TableGen and compiler
I have been working on improvements to TableGen's DAG Isel matcher backend. This has led me to thinking about ways to speed up the compile-time interpreter of the instruction selection matcher table. Is this worth my time, given Fast Isel and the upcoming Global Isel selector?
2020 Nov 18
0
Work on DAG Isel for TableGen and compiler
Hi Paul, I think this would be time well spent. At least in the WebAssembly backend, the vast majority of our ISel work is still done with DAG ISel. I know this is different from the performance work you have in mind, but one of my biggest pain points working on LLVM so far has been the poor error messages from the DAG ISel pattern type checker. If you could find time to improve those error
2020 Nov 18
0
Work on DAG Isel for TableGen and compiler
Yes, the CodeGenDAGPatterns is exactly right. Try applying the patch below and rebuilding and you'll see what I mean about the error messages ;) That being said, I'm sympathetic to Matt's point about shifting effort to GlobalISel. Maybe it has similar problems you could work on? A nicer development experience would certainly be a good carrot to get me excited to switch over sooner.
2020 Nov 18
2
Work on DAG Isel for TableGen and compiler
Are you talking about the type checking done in CodeGenDAGPatterns.cpp? Is it easy to post an example? At 11/18/2020 01:55 PM, Thomas Lively wrote: >Hi Paul, > >I think this would be time well spent. At least in the WebAssembly backend, the vast majority of our ISel work is still done with DAG ISel. I know this is different from the performance work you have in mind, but one of my
2016 Jul 14
2
[X86] Adding a new instruction JUMPB
Hi llvm-dev, In the review of the LLVM-side changes to support XRay (which is now upstream as http://reviews.llvm.org/rL275367) we hit one particular case where we had to hack around the fact that we have no way to force the emission of a short relative jump. It's even come up that jump relaxation can come in and (at least with clang -O0) relax jumps to use the longer version of the jump
2016 Jul 27
0
[X86] Adding a new instruction JUMPB
Personally, I think we should add this. I've personally been annoyed that it is difficult to convince gas to use the short jump encoding. If you use just the right kinds of labels, it uses the short encoding, but apparently because of -mc-relax-all, that won't actually work with clang either. It's all quite complicated, and we should just expose a simple way for the user to ask for
2014 Mar 08
3
[LLVMdev] Isel DAG documentation?
I'm having a great deal of trouble figuring out how to write instruction patterns which actually match the DAG produced by the compiler. I can't seem to find any documentation on both what the various nodes represent or on what the syntax accepted by TableGen is. The backends I have access to all seem to do this in different (and obscure) ways. And when things go wrong the compiler seems
2013 Mar 21
0
[LLVMdev] Simpler types in TableGen isel patterns
On Mar 21, 2013, at 11:26 AM, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote: > I think in most cases it would be much simpler and safer to specify pattern types directly: > > def : Pat<(and (not i32:$src1), i32:$src2), > (ANDN32rr i32:$src1, i32:$src2)>; > def : Pat<(and (not i64:$src1), i64:$src2), > (ANDN64rr i64:$src1,
2019 Apr 26
3
tablegen dag syntax question
What is the difference between these two fragments (taken from two different tblgen record dumps)? dag OutOperandList = (outs GPR:$rd); dag OutOperandList = (outs R2); The first is from the RISCV backend record dump. There will be a substitution at some point for $rd. In the second, I'm specifying R2, no substitution necessary. If I specify GPR64:R2 or i64:R2 in my Instruction def,
2013 Mar 21
1
[LLVMdev] Simpler types in TableGen isel patterns
This sounds great! I've been bitten in the past by trying to use a single class for multiple types. Would it make sense to extend this to all DAG patterns? If I have an instruction def: def ANDN64 : MyInst<(outs Reg64:$d), (ins Reg64:$a, Reg64:$b), "and.64 $d, $a, $b", [(set Reg64:$d, (and (not (Reg64:$a, Reg64:$b))))]>; would I now be able to write: def ANDN64 :