Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Loop IR insertion"
2005 Jan 27
1
[LLVMdev] Question about inserting IR code
Hi,
From the file HowToUseJIT.cpp, I learned how to insert some calcuation IR code like Add/Sub/Mul etc by using
Instruction *Add = BinaryOperator::createAdd(One, ArgX, "addresult", BB);
By following this way, it works well when I insert some IR code whose operand is integer type like IntTy, however, when I tried to insert similar thing whose operands are float point, I got the
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
Valery,
Attached are three files: "valery.cpp" which contains your original, "reid.cpp"
which contains corrections to most of the FIXME items and "diffs" which shows
the differences between them. The differences should be instructive on what to
do. You were really, really close .. just a few details changing. The code in
"reid.cpp" compiles but I
2004 Aug 10
0
[LLVMdev] API on JIT, code snippets
Reid Spencer,
thank you for your quick responce, finally i got to my PC at home.
You wrote:
> Attached are three files: "valery.cpp" which contains your original,
> "reid.cpp" which contains corrections to most of the FIXME items and
> "diffs" which shows the differences between them. The differences
> should be instructive on what to do. You were
2017 Apr 08
3
How to insert vector type input parameter for function in C/C++ API?
Fantastic! It's working! Thank you so much Craig!!!
On Fri, Apr 7, 2017 at 6:05 PM, Craig Topper <craig.topper at gmail.com> wrote:
> It should be VectorType::get(Type::getInt32Ty(Context),4). You need the
> word "get" after VectorType::
>
> ~Craig
>
> On Fri, Apr 7, 2017 at 6:01 PM, Michael Choi <choimichael103 at gmail.com>
> wrote:
>
2004 Aug 17
4
[LLVMdev] JIT API example (fibonacci)
Hi LLVMers,
the example attached I have used to prove that JIT and some visible
optimizations are really invoked.
Proved OK. I got 30% speed-up in comparison to gcc 3.3.3
on my Athlon XP 1500.
Nice.
P.S. guys, no fears, I don't plan to flood the cvs repository
with my "brilliant" examples ;)
---
Valery A.Khamenya
-------------- next part --------------
An
2004 Aug 17
5
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote:
> That's pretty cute actually. Do you want this "brilliant" :) example in the cvs
> repository? I'd be happy to put it in.
Here's an idea: how about we take the ModuleMaker, Valery's previous
example, and this one and put them all in one "small examples" project?
-Chris
> Valery A.Khamenya wrote:
>
>
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
Reid wrote:
> I have to agree with Misha on this. None of us knows "everything" about
> LLVM and as you can see, Misha responded three hours before I did :).
> Asking questions here is encouraged, so please feel free to post them on
> LLVMdev. We'll always help where we can.
well, OK :)
Please find the attachment with the first approach to
such an example i've
2004 Aug 09
3
[LLVMdev] API on JIT, code snippets
Valery,
I have to agree with Misha on this. None of us knows "everything" about
LLVM and as you can see, Misha responded three hours before I did :).
Asking questions here is encouraged, so please feel free to post them on
LLVMdev. We'll always help where we can.
Thanks,
Reid.
On Mon, 2004-08-09 at 06:37, Misha Brukman wrote:
> On Mon, Aug 09, 2004 at 12:32:33PM +0400, Valery
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
Valery,
That's pretty cute actually. Do you want this "brilliant" :) example in the cvs
repository? I'd be happy to put it in.
Reid.
Valery A.Khamenya wrote:
> Hi LLVMers,
>
> the example attached I have used to prove that JIT and some visible
> optimizations are really invoked.
>
> Proved OK. I got 30% speed-up in comparison to gcc 3.3.3
>
2004 Aug 17
0
[LLVMdev] JIT API example (fibonacci)
On second thought, the makefiles don't (easily) allow this do they? You can
only build one program per directory. Were you suggesting that you wanted me to
move the entire directories under a "small examples" directory?
Reid.
Chris Lattner wrote:
> On Tue, 17 Aug 2004, Reid Spencer wrote:
>
>
>>That's pretty cute actually. Do you want this
2004 Aug 18
1
[LLVMdev] JIT API example (fibonacci)
On Tue, 17 Aug 2004, Reid Spencer wrote:
> On second thought, the makefiles don't (easily) allow this do they? You can
> only build one program per directory. Were you suggesting that you wanted me to
> move the entire directories under a "small examples" directory?
You're right. The simples way to do this would be to have:
projects/
SmallExamples/
2004 Aug 09
1
[LLVMdev] API on JIT, code snippets
Valery,
First response of several.
I don't know why the demo page at UIUC is unavailable but there is an enhanced
copy of it running on the mirror at http://llvm.x10sys.com/demo/ if you ever
need it. Running it produced the following LLVM equivalent for the C code in
your example.
implementation ; Functions:
int %add1(int %x) {
entry:
%tmp.1 = add int %x, 1 ; <int> [#uses=1]
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
On Mon, 9 Aug 2004, Reid Spencer wrote:
> Attached are three files: "valery.cpp" which contains your original, "reid.cpp"
> which contains corrections to most of the FIXME items and "diffs" which shows
> the differences between them. The differences should be instructive on what to
> do. You were really, really close .. just a few details changing. The
2012 Feb 01
1
[LLVMdev] Function Insertion Error
Hi,
I am trying to insert a function into the LLVM IR. But i get a stack dump exception. My code is as follows.
#include "llvm/Pass.h"
#include "llvm/Function.h"
#include "llvm/Module.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/IRBuilder.h"
using namespace llvm;
namespace {
2019 Jul 03
2
optimisation issue in an llvm IR pass
Hello,
I have an optimisation issue in an llvm IR pass - the issue being that
unnecessary instructions are generated in the final assembly (with -O3).
I want to create the following assembly snippet:
mov dl,BYTE PTR [rsi+rdi*1]
add dl,0x1
adc dl,0x0
mov BYTE PTR [rsi+rdi*1],dl
however what is created is (variant #1):
mov dl,BYTE PTR [rsi+rdx*1]
add dl,0x1
cmp
2019 Jul 03
3
optimisation issue in an llvm IR pass
Hi Craig,
On 03.07.19 17:33, Craig Topper wrote:
> Don't the CreateICmp calls return a Value* with an i1 type? But then
> they are added to an i8 type? Not sure that works.
I had that initially:
auto cf = IRB.CreateICmpULT(Incr, ConstantInt::get(Int8Ty, 1));
auto carry = IRB.CreateZExt(cf, Int8Ty);
Incr = IRB.CreateAdd(Incr, carry);
it makes no difference to the generated assembly
2014 Jun 25
2
[LLVMdev] Question Regarding Sign-Overflow
Sorry, the old title didn't make sense.
> Hi,
>
> I have doubts on the following transformation in InstCombineAddSub.cpp. Is
> it always safe to preserve NSW/NUW in this case?
>
> // If this is a 'B = x-(-A)', change to B = x+A. This preserves NSW/NUW. if (Value
2011 Jan 21
2
[LLVMdev] How to change the type of an Instruction?
Hello guys,
I wonder how I can change the type of an integer variable. For instance,
given the instruction "%3 = add i32 %1, %2" I would like to alter the
instruction to "%3 = add i16 %1, %2". Is there any way to do this?
Best wishes,
Douglas
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2011 Jan 24
3
[LLVMdev] How to change the type of an Instruction?
Hi,
Nick, thanks for the reply.
I still have a problem: I only need to "clone" an Instruction, changing its
type. That is, I would like to keep all characteristics of the old
Instruction and create a new one only with a different type. I am trying
create a new Instruction thus:
%3 = add nsw i32 %1, %2 ; <i16> [#uses=2] //Old Instruction
Value* Op0 = I->getOperand(0);
Value*
2013 Jan 01
2
[LLVMdev] clang with -emit-llvm
Hello,
I have just started using llvm. I was trying to debug how *clang* generates
IR for very simple C testcases (few assignments and if-condsitions).
To get a hold on the basic functions, I put some break points on following
functions but debugger *didn't stop*:
llvm::BasicBlock::Create
llvm::BinaryOperator::CreateAdd (design has binary op)
llvm::Value::Value
llvm::BranchInst::Create