Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Questions on using Metadata in JIT mode"
2011 Aug 06
0
[LLVMdev] How to differ from read and write operations for general stack objects
The following is the code fragment after "# *** IR Dump Before
Prolog/Epilog Insertion & Frame Finalization ***:".
* MOV32mi <fi#2>, 1, %reg0, 0, %reg0, 0 *
* MOV32mr <fi#2>, 1, %reg0, 0, %reg0, %ECX<kill>*
* %EAX<def> = MOV32rm <fi#2>, 1, %reg0, 0, %reg0*
* MOV32mr %reg0, 1, %reg0, <ga:@one+4>, %reg0, %EAX<kill>*
* %EAX<def> = MOV32rm
2011 Jan 16
1
[LLVMdev] About register allocation
I have tested the register allocation in llvm, using: $llc -debug test.bc
where, test.c is like:
int a, b, c, d, x;
a = 3;
b = 5;
d = 4;
x = 100;
if ( a > b )
......
And I got the machine code before register allocation:
MOV32mi <fi#2>, 1, %reg0, 0, %reg0, 3; mem:ST4[%a]
MOV32mi <fi#3>, 1, %reg0, 0, %reg0,
2013 May 13
1
[LLVMdev] Problem with MachineFunctionPass and JMP
Hi !
I'm trying to modify the code in a machine function pass…
I added a new basicblock and I want to add a jump to an another BB from my new BB.
Here is my code :
bool Obfuscation::runOnMachineFunction(MachineFunction &MF) {
MachineBasicBlock *newEntry = MF.CreateMachineBasicBlock();
MF.insert(MF.begin(), newEntry);
std::vector<MachineBasicBlock*> origBB;
2009 Nov 24
0
[LLVMdev] X86InstrInfo::GetInstSizeInBytes() calculating incorrect size
I'm noticing the X86InstrInfo::GetInstSizeInBytes() function returning
incorrect sizes for some instructions. I looked through the llvm-dev
archives and noticed that a patch was submitted once in April 2009 for
instruction length calculation on amd-64. I'm using Intel Core 2 Duo (64
bit) so maybe there is a similar issue? I don't have another computer I can
test this on to see if
2009 Dec 16
1
[LLVMdev] incorrect x86 instruction size calculation
Hello,
I'm trying to write some backends for LLVM that generate code that complies
with SFI validation rules by re-implementing SFI for the LLVM x86 backend
based on the Google NaCl project.
However, in trying to implement 32-byte code alignment,
X86InstrInfo::GetInstSizeInBytes() is returning incorrect instruction sizes
for certain instructions (that I have seen so far): MOV32mi,
2006 Jun 26
2
[LLVMdev] Mapping bytecode to X86
Dear guys,
I am in need of more of your help. I'm implementing a register
allocator, and I am having problems to make it produce correct code.
Consider this program here:
int main(int argc, char ** argv) {
int i, j, sum;
i = argv[0][0];
j = argv[0][1];
sum = (i + j) * j;
printf("Sum = %d\n", sum);
}
that maps to this llvm bytecode:
entry (0xa785590, LLVM
2013 Mar 18
5
[LLVMdev] Hit a snag while attempting to write a backend - any advice?
Hi,
I've been experimenting with writing a backend for LLVM (3.2) (having
already written a frontend http://savourysnax.github.com/EDL), everything
was going reasonably ok ( calls/returns, epilogue, prologue, etc are all
working), up until I tried to place support for conditional branches.
Given this simple program :
int test(int c,int d)
{
if (c)
{
return
2007 Dec 20
1
[LLVMdev] Code Generation Problem llvm 1.9
I sent a long message yesterday describing a problem I thought had to do with the JIT stubs.
After further investigating, the problem seems to be in the code generation.
The following basic block seems to have an error in it's code generation:
__exp.exit: ; preds = %codeRepl258, %__exp_bb_bb.exit
phi double [ 1.000000e+00, %codeRepl258 ], [ %.reload.reload.i,
2013 Feb 08
0
[LLVMdev] help with X86 DAG->DAG Instruction Selection
Hi Peng,
Can you please open a bugzilla and attache the LL file ? Can you please reproduce it on ToT ?
Thanks,
Nadav
On Feb 7, 2013, at 9:08 PM, Peng Cheng <gm4cheng at gmail.com> wrote:
> I have an llvm ir, which generates the following machine code using llc (llvm 3.0 on win32) after # *** IR Dump After X86 DAG->DAG Instruction Selection ***:
>
> The first three lines
2007 Dec 19
0
[LLVMdev] JIT Stub Problem
I'm having an issue with the Stubs used by the JIT Compiler. I'm not sure if it's a bug or if I'm doing something incorrectly.
I've got a long complicated function with the following basic blocks at the end of it (The complete .ll file is attached):
falseBlock: ; preds = %__exp.exit340
ret int 617
codeRepl: ; preds = %__exp.exit340
2013 Feb 08
2
[LLVMdev] help with X86 DAG->DAG Instruction Selection
I have an llvm ir, which generates the following machine code using llc
(llvm 3.0 on win32) after # *** IR Dump After X86 DAG->DAG Instruction
Selection ***:
The first three lines and the last two lines alone together are used to
compute "sin" for some double number.
- line 1: move the stack pointer down 8
- line 2: copy the updated stack pointer to a base register
- line 3: copy a
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,
2008 Jul 17
0
[PATCH 17/29] ia64/pv_ops/xen: define xen paravirtualized instructions for hand written assembly code
define xen paravirtualized instructions for hand written assembly code.
Signed-off-by: Yaozu (Eddie) Dong <eddie.dong at intel.com>
Signed-off-by: Isaku Yamahata <yamahata at valinux.co.jp>
Cc: Akio Takebe <takebe_akio at jp.fujitsu.com>
---
include/asm-ia64/xen/inst.h | 447 +++++++++++++++++++++++++++++++++++++++++++
1 files changed, 447 insertions(+), 0 deletions(-)
create
2010 Oct 29
1
[LLVMdev] [LLVMDev] Register Allocation and Kill Flags
I am wondering about register allocation when there is a kill flag on the
MachineOperand. Do I need to remove the kill flag?
This code below is just an example from test\CodeGen\X86\xor.ll
# Machine code for function test3:
Frame Objects:
fi#-2: size=4, align=4, fixed, at location [SP+8]
fi#-1: size=4, align=8, fixed, at location [SP+4]
Function Live Outs: %EAX
BB#0: derived from LLVM BB
2010 May 18
2
[LLVMdev] Fast register allocation
As you may have noticed, I have been working on a fast register allocator in the last week. The new allocator is intended to replace the local allocator for debug builds.
Both allocators use a local allocation strategy. Each basic block is scanned from top to bottom, and virtual registers are assigned to physical registers as they appear. There are no live registers between blocks. Everything is
2017 Jun 05
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
Since the getelementptrs were implicitly generated by the CreateStore/Load
I'm not sure how to get access to them.
So I hacked the assignment to be done thrice: once using a manual
decomposition into two GEPs and stores, once using the "big" CreateStore,
once via the setGlobal function, printing addresses and memory contents at
each point to the degree that I have access to them.
2009 Nov 13
3
[LLVMdev] -debug and -print-machineinstrs broken
Are these known to be broken right now? I get failure when using either.
$ llc -march=arm -print-machineinstrs hw.bc
...
BB#0: derived from LLVM BB %entry
Live Ins: %LR %R7
%SP<def> = SUBri %SP<kill>, 8, 14, %reg0, %reg0
STR %LR<kill>, %SP, %reg0, 4, 14, %reg0; mem:ST4[0 llc
0x008b3304 PrintStackTrace(void*) + 45
1 llc 0x008b390c
2011 Jan 29
1
[LLVMdev] The type or size of virtual registers in machineinstr
Hi,
I want to know what is the type or size of a virtual register in a
Machineinstr::MachineOperand (If this MachineOperand is a register). For
example, what is the size of reg16385 in the following MachineInstr. I know
now in the llvm bitcode, the type of a Instruction could be obtained from
the Value::GetType(), but what is the counterpart in MachineInstr (not
derived from class Value)?
2017 Jun 06
2
[newbie] trouble with global variables and CreateLoad/Store in JIT
On Mon, Jun 5, 2017 at 1:34 PM, Nikodemus Siivola <
nikodemus at random-state.net> wrote:
> Uh. Turns out that if I hide the pointer to @foo from LLVM by passing it
> through an opaque identity function ... then everything works fine.
>
> Is this a bug in LLVM or is there some magic involving globals I'm
> misunderstanding?
>
This looks like a bug in the handling of
2013 Oct 22
1
[LLVMdev] System call miscompilation using the fast register allocator
Hi,
Apologies this is a bit lengthy. TLDR: I'm using Dragonegg + LLVM 3.2
and uClibc, and am finding that using the Fast register allocator (i.e.
-optimize-regalloc=0) causes miscompilation of setsockopt calls (5-arg
system calls). The problem doesn't happen with the default register
allocation path selected. It can be worked around by manually
simplifying the system call setup