Displaying 20 results from an estimated 130 matches similar to: "BPF tablegen+codegen question"
2014 Oct 27
4
[LLVMdev] Problem in X86 backend
Hi,
I'm having some trouble wirting an instruction in the X86 backend.
I made a new intrinsic and I wrote a custom inserter for my intrinsic in the X86 backend.
Everything works fine, except for one instruction that I can't find how to write.
I want to add this instruction in one of my machine basic block: mov [rdi], 0
How can I achieve that with the LLVM api? I tried several
2013 Aug 02
2
[LLVMdev] Missing optimization - constant parameter
For the little C test program where a constant is stored in memory and
also
used as a parameter:
#include <stdint.h>
uint64_t val, *p;
extern uint64_t xtr( uint64_t);
uint64_t caller() {
uint64_t x;
p = &val;
x = 12345123400L;
*p = x;
return xtr(x);
}
clang (3.2, 3.3 and svn) generates the following X86 code (at -O3):
caller:
movq
2013 Aug 02
0
[LLVMdev] Missing optimization - constant parameter
> I expected that this optimization would be picked
> up in a cse, gvn, machine-cse or even peepholing pass.
>
> Comments?
At the LLVM IR level this is represented as
define i64 @caller() #0 {
entry:
store i64* @val, i64** @p, align 8, !tbaa !0
store i64 12345123400, i64* @val, align 8, !tbaa !3
%call = tail call i64 @xtr(i64 12345123400) #2
ret i64 %call
}
Which is
2013 Aug 02
2
[LLVMdev] Missing optimization - constant parameter
On Aug 2, 2013, at 1:37 PM, Rafael Espíndola <rafael.espindola at gmail.com> wrote:
>> I expected that this optimization would be picked
>> up in a cse, gvn, machine-cse or even peepholing pass.
>>
>> Comments?
>
>
> At the LLVM IR level this is represented as
>
> define i64 @caller() #0 {
> entry:
> store i64* @val, i64** @p, align 8, !tbaa
2010 Sep 01
1
[LLVMdev] equivalent IR, different asm
On Sep 1, 2010, at 11:14 AM, Dale Johannesen wrote:
>
> On Sep 1, 2010, at 6:25 AMPDT, Argyrios Kyrtzidis wrote:
>
>> The attached .ll files seem equivalent, but the resulting asm from
>> 'opt-fail.ll' causes a crash to webkit.
>> I suspect the usage of registers is wrong, can someone take a look ?
>
> Yes, the code here is wrong:
>
>> movl
2013 Mar 21
9
[LLVMdev] Simpler types in TableGen isel patterns
Currently, instruction selection patterns are defined like this:
def : Pat<(and (not GR32:$src1), GR32:$src2),
(ANDN32rr GR32:$src1, GR32:$src2)>;
def : Pat<(and (not GR64:$src1), GR64:$src2),
(ANDN64rr GR64:$src1, GR64:$src2)>;
TableGen infers the types of $src1 and $src2 from the specified register classes, and that is the only purpose of the register
2020 Aug 24
2
Intel AMX programming model discussion.
Hi, Yuanke,
Thanks for writing this up. Let me back up a bit because the scheme I
proposed last week doesn't work without further modification: within a
particular "configuration region" (i.e., the code in between the
LDTILECFG and the TILERELEASE (or next LDTILECFG)), each tile register
can only be used with one shape, and in addition, no register can have
its shape changed
2018 Mar 28
1
Taking over an x86 opcode for my own instruction
tl;dr, I'd like to add my own instruction, but I'm running into problems
due to my lack of x86 encoding/decoding understanding.
Hello all. Currently, I'm working on adding my own x86 instruction. I have
done this once before; the basic process I used was:
1. Find an unused opcode, e.g. 0xF1 in this table:
http://ref.x86asm.net/coder32.html
2. Insert an instruction into
2020 Sep 04
2
Intel AMX programming model discussion.
On 9/4/20 3:37 AM, Luo, Yuanke wrote:
>
> Hi Hal,
>
> Thank you for the ideas that help us to improve the design, and sorry
> for replying late. There is something I am not able to figure out and
> there some special trait for tile RA.
>
You're quite welcome.
> 1.X86RegisterInfo::getRegAllocationHints can tell RA which physical
> register is preferred, but it
2014 Oct 28
2
[LLVMdev] Problem in X86 backend (again)
Hi,
I'm still having problems implementing my custom inserter in the X86 backend.
I found a solution to my last problem (http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/078296.html), by using a virtual register.
The binary works when it's compiled in -O0, but not in -O1,-O2,...
I really can't figure what I'm doing wrong... Any idea?
Here is the code of my custom
2018 Dec 18
2
In ISel, where Constant<0> comes from?
On Tue, 18 Dec 2018 at 07:11, Gleb Popov via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> However, I haven't managed to get a "Constant<>" in the DAG when compiling for X86. I'm interested in how it is lowered. Can you please give me some guidance on this?
How are you looking? When I run "llc -mtriple=x86_64-linux-gnu
-debug-only=isel" on your IR I get
2014 Dec 08
2
[LLVMdev] Virtual register problem in X86 backend
Hi,
I'm having trouble using virtual register in the X86 backend.
I implemented a new intrinsic and I use a custom inserter. The goal of
the intrinsic is to set the content of the stack to zero at the end of
each function.
Here is my code:
MachineBasicBlock *
X86TargetLowering::EmitBURNSTACKWithCustomInserter(
MachineInstr *MI,
MachineBasicBlock
2011 Sep 30
2
[LLVMdev] LLVM backends instruction selection
I am new to the LLVM backends, I am wondering how instruction selection is
done in LLVM backends, I looked at the .td files in Target/X86, they all
seem to be small and do not deal with common X86 instructions, i.e. mov,
push, pop, etc.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2014 Dec 10
2
[LLVMdev] Virtual register problem in X86 backend
Hi,
Thx for your help...
Here is the IR code:
; ModuleID = 'foo_bar.c'
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
@.str = private unnamed_addr constant [6 x i8] c"MAIN\0A\00", align 1
; Function Attrs: nounwind uwtable
define i32 @main(i32 %argc, i8** %argv) #0 {
entry:
%retval = alloca i32,
2020 Sep 04
2
Intel AMX programming model discussion.
Fix typo
From: Luo, Yuanke
Sent: Friday, September 4, 2020 9:47 PM
To: 'Hal Finkel' <hfinkel at anl.gov>; Topper, Craig <craig.topper at intel.com>; Kaylor, Andrew <andrew.kaylor at intel.com>; Philip Reames <listmail at philipreames.com>; llvm-dev at lists.llvm.org; florian_hahn at apple.com; Lu, Hongjiu <hongjiu.lu at intel.com>
Subject: RE: [llvm-dev]
2020 Aug 21
2
Intel AMX programming model discussion.
Hi Hal,
The proposal is attractive to me, but there is something I still can't figure out. Let's take below MIR as an example. We assume we have 256 register classes (vtile1x1, vtile1x2, ..., tile16x16).
1. After instruction selection, the pseudo AMX instruction is generated. The name of pseudo instructions have 'P' prefix. Now all the AMX pseudo instruction take vtile as
2013 Mar 21
0
[LLVMdev] Simpler types in TableGen isel patterns
----- Original Message -----
> From: "Jakob Stoklund Olesen" <stoklund at 2pi.dk>
> To: llvmdev at cs.uiuc.edu, llvmdev at cs.uiuc.edu, llvmdev at cs.uiuc.edu, llvmdev at cs.uiuc.edu
> Sent: Thursday, March 21, 2013 1:26:25 PM
> Subject: [LLVMdev] Simpler types in TableGen isel patterns
>
> Currently, instruction selection patterns are defined like this:
>
2019 Oct 25
3
register spilling and printing live variables
Hello,
I have studied register allocation in theoretical aspects and exploring the
same in the implementation level.
I need a minimal testcase for register spilling to analyze spilling
procedure in llvm. I tried with a testcase taking 20 variables but all the
20 variables are getting stored in the stack using %rbp. Maybe my live
variable analysis is wrong. Please help me with a minimal testcase
2009 Nov 29
7
[LLVMdev] Possible bug in TCO?
Jon Harrop wrote:
> I've come up with the following minimal repro that segfaults on my machine:
Jon, were you able to resolve this?
FWIW, TOT is causing all kinds of weird segfaults related to tail calls
in my Pure interpreter, too (at least on x86-64). In my case these seem
to be limited to the JIT, however (batch-compiled Pure programs via
opt+llc all work fine, even with TCO), so
2018 Nov 14
2
Fw: How to define an instruction
--------- Forwarded Message ---------
From: Tianhao Shen <17862703959 at 163.com>
Date: 11/14/2018 09:31
To: craig.topper at gmail.com <craig.topper at gmail.com>
Subject: Re: [llvm-dev] How to define an instruction
Hi, Craig
Thank you for replying to me.
I guess that you misunderstand my meaning about "can'r run". I just want to run my instruction by LLVM using the