Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Difficulty inserting putchar in IR"
2011 May 13
3
[LLVMdev] IO intrinsics?
I found these lines in the BrainF example:
//declare i32 @getchar()
getchar_func = cast<Function>(module->
getOrInsertFunction("getchar", IntegerType::getInt32Ty(C), NULL));
//declare i32 @putchar(i32)
putchar_func = cast<Function>(module->
getOrInsertFunction("putchar", IntegerType::getInt32Ty(C),
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
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 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/
2005 May 12
2
[LLVMdev] Scheme + LLVM JIT
> llvm_function_new/llvm_value_set_name/llvm_executionengine_run_function,
> etc.
>
> If kept simple, standardized, and generic, I think it would be very useful
> to people (even if incomplete). This would allow others to build on it,
> and we could 'ship' it as a standard llvm library.
It looks like my interface will look vaguely like this. Functions like
2007 Nov 25
2
[LLVMdev] Fibonacci example in OCaml
Here's my translation of the Fibonacci example into OCaml:
open Printf
open Llvm
let build_fib m =
let fibf =
define_function "fib" (function_type i32_type [| i32_type |]) m in
let bb = builder_at_end (entry_block fibf) in
let one = const_int i32_type 1 and two = const_int i32_type 2 in
let argx = param fibf 0 in
set_value_name "AnArg" argx;
let
2011 Apr 17
2
[LLVMdev] Error compiling ConstantProp.cpp
I am using llvm-2.6 and the ConstProp.cpp file is
http://llvm.org/docs/doxygen/html/ConstantProp_8cpp_source.html
and the exact error message is:
llvm[0]: Compiling ConstantProp.cpp for Release build (PIC)
/home/tarun/Desktop/compiler/LLVM/llvm-2.6/include/llvm/Analysis/ConstantFolding.h:
In member function ‘virtual
bool<unnamed>::ConstantPropagation::runOnFunction(llvm::Function&)’:
2011 Apr 17
4
[LLVMdev] Regarding BasicBlock Cloning
The clone llvm:CloneBasicBlock copies the phi function in the replicated
basic block from the original basic block.
I don't want the copy of phi in relplicated block. For now I am creating .bc
file with -O0 option so that it doesn't generate phi function in first
place. Is this a good approach or there are some other function available
for it.
Tarun
On Sun, Apr 17, 2011 at 5:22 AM, Eli
2012 Feb 25
2
[LLVMdev] Algorithm used for doing alias analysis.
Hi,
I am using alias analysis to determine whether two values are alias or not.
But I am not able to figure out the algorithm that is being used to
determine
May , Must and No Alias.
Thanks and Regards
Tarun Agrawal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120225/e06daae7/attachment.html>
2011 May 04
2
[LLVMdev] Trace Use-Def chain
On 5/3/11 4:08 PM, tarun agrawal wrote:
> HI
>
> I know it is a very simple question not worth asking here but I am
> really struggling pls help me out..
This is a question worth asking; it's just that not everyone can answer
all the time.
:)
If all you want to do is to follow the SSA def-use chain within a single
function, then this is very easy. All you have to do is use
2011 Apr 17
0
[LLVMdev] Error compiling ConstantProp.cpp
On Sat, Apr 16, 2011 at 5:27 PM, tarun agrawal <tarun at cse.iitb.ac.in> wrote:
> I am using llvm-2.6 and the ConstProp.cpp file is
> http://llvm.org/docs/doxygen/html/ConstantProp_8cpp_source.html
>
> and the exact error message is:
>
> llvm[0]: Compiling ConstantProp.cpp for Release build (PIC)
>
2011 May 04
2
[LLVMdev] Trace Use-Def chain
Thanks John,
I know how to iterate through def-use chains and I also have realized the
need for an algorithm to do the work. But the algorithm I am able to figure
out is not linear in time. It wold be a great help if someone suggest me a
way to get all basic-block along all path between two instruction.
On Wed, May 4, 2011 at 7:00 AM, John Criswell <criswell at illinois.edu> wrote:
>
2011 May 03
2
[LLVMdev] Trace Use-Def chain
Hi,
I need to get all the basic blocks that are there, in the path from
definition of an instruction to use of that instruction.
Regards
Tarun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110503/4d3852b7/attachment.html>
2011 Apr 16
3
[LLVMdev] Regarding BasicBlock Cloning
Hi,
I am writing a pass for constant propagation using graph restructuring (
code duplication). I am facing following difficulties..
1) I need to replicate the basic block but without phi function in the
replicated block. How can I do this.
2) I need to insert that basic block after and before some particular basic
block.
Regards
Tarun Agrawal
-------------- next part --------------
An HTML
2011 Apr 17
2
[LLVMdev] Error compiling ConstantProp.cpp
While compiling the ConstantProp.cpp I am getting the following error.
error: too few arguments to function ‘llvm::Constant*
llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::LLVMContext&, const
llvm::TargetData*)
Regards
Tarun
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2012 Feb 08
2
[LLVMdev] Instruction for print
Hi,
I am trying to insert a instruction for printf or cout. My aim is to print
a integer and a string value using that instruction, which are already
there in the code.
but I am not able to understand how to do it. Any help would be great help.
Thanks and Regards,
Tarun Agrawal
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2011 May 03
0
[LLVMdev] Trace Use-Def chain
HI
I know it is a very simple question not worth asking here but I am really
struggling pls help me out..
On Tue, May 3, 2011 at 10:10 PM, tarun agrawal <tarun at cse.iitb.ac.in> wrote:
> Hi,
>
> I need to get all the basic blocks that are there, in the path from
> definition of an instruction to use of that instruction.
>
>
> Regards
> Tarun
>
--------------
2012 Feb 27
0
[LLVMdev] Algorithm used for doing alias analysis.
On Sat, Feb 25, 2012 at 8:44 AM, tarun agrawal <tarun at cse.iitb.ac.in> wrote:
> Hi,
>
> I am using alias analysis to determine whether two values are alias or not.
> But I am not able to figure out the algorithm that is being used to
> determine
> May , Must and No Alias.
Here is the algorithm in high-level:
http://llvm.org/docs/AliasAnalysis.html#exist
>
>
>
2012 Feb 08
1
[LLVMdev] Instruction for print
Just to be clear, I have to add a function name printf in the module with
no body. And I can call the function. This will automatically call the
printf function which is defined in the library.
Tarun Agrawal
On Wed, Feb 8, 2012 at 11:34 PM, John Criswell <criswell at illinois.edu>wrote:
> On 2/8/12 11:55 AM, tarun agrawal wrote:
>
> Hi,
>
> I am trying to insert a