search for: classllvm_1_1irbuild

Displaying 13 results from an estimated 13 matches for "classllvm_1_1irbuild".

Did you mean: classllvm_1_1irbuilder
2011 Dec 09
0
[LLVMdev] LLVM instrumentation overhead
...rogrammer's Guide and the doxygen docs on llvm::Module and llvm::Function if there's something you don't understand. The only other question is how to insert instructions. For that, you can take one of two approaches. First, you can use the IRBuilder class (http://llvm.org/doxygen/classllvm_1_1IRBuilder.html). Second, you can simply use the appropriate constructor/new methods of the Instruction classes to create and insert the instructions that you want. I believe IRBuilder is now the preferred way to do things as its API changes less often. For the instrumentation that you want to do, th...
2011 Dec 07
2
[LLVMdev] LLVM instrumentation overhead
Hi, I need to write a transform pass which instruments the target program to output the name of each function executed, and the rdtsc counter along with it. Can anyone give me an idea of how to go about it?(I've worked around with LLVM pass framework and opt to do static analysis, but would like to do a lightweight instrumentation). Also can anyone give an approximate idea of the
2010 Jul 17
1
[LLVMdev] Tool for run-time code generation?
...dule, you can run the inliner before the other optimizers. Alternately, if your chunks of C are very small you should may find it easy to just produce LLVM IR in memory using the LLVM API directly. See the LLVM language at llvm.org/docs/LangRef.html and the IRBuilder at http://llvm.org/doxygen/classllvm_1_1IRBuilder.html . Either of these techniques avoids the need to use clang at run-time, or spend time generating large strings just to re-parse them. Since the optimizers are all in LLVM proper, you should get the exact same assembly out. Nick > So, the approach is definitely workable, but I must wa...
2011 Dec 09
1
[LLVMdev] LLVM instrumentation overhead
...doxygen docs on > llvm::Module and llvm::Function if there's something you don't > understand. > > The only other question is how to insert instructions. For that, you > can take one of two approaches. First, you can use the IRBuilder > class (http://llvm.org/doxygen/classllvm_1_1IRBuilder.html). Second, > you can simply use the appropriate constructor/new methods of the > Instruction classes to create and insert the instructions that you > want. I believe IRBuilder is now the preferred way to do things as > its API changes less often. > > For the instrument...
2016 Jun 13
2
LLVM IR intrinsics placeholder for strings [was Re: Back end with special loop instructions (using LLVM IR intrinsics)]
...times' > call void @llvm.connex.repeat.x.times()>> > */ > Value *repeatFunc = Intrinsic::getDeclaration(M, > Intrinsic::connex_repeat_x_times); > > // See http://llvm.org/docs/doxygen/html/classllvm_1_1IRBuilder.html > aB.CreateCall(repeatFunc); //, ECValue); > > > Then, in the back end, in InstrInfo.td I write: > let hasSideEffects = 1, isCodeGenOnly = 1 in { > //let Pattern = [(int_connex_repeat_x_times)] in > def REPEAT_X_TIMES : ImmediateInstructi...
2011 Nov 14
1
[LLVMdev] Links for basic operations
Hi everyone. Can someone please post link to the documentation that contains details about performing basic operations like adding a new function, identifying operands of an instruction,deleting an instruction etc. Thank You:)
2013 Dec 03
1
[LLVMdev] Help with creating and replacing instructions in LLVM
Hi, I have the following instruction in my IR- %call2 = call i8* @strcpy(i8* %1, i8* %2) #2 I intend to change call to strcpy with strncpy. I have included the following code in runOnFunction, so that when it is strcpy's turn to be invoked, strncpy is invoked instead. Assuming I* is the strcpy instruction, CallInst* x=new
2017 Apr 08
2
Getting a pointer to a i8 from a global variable that holds a constant string
Hello, I'm trying to get the pointer to the first element of a string (so that I can pass it to a function). The string itself is a constant kept in a global variable. My end goal is to generate the IR for something like "puts("Hello World")"; I'm stuck on the parameter part of the call instruction. So far I have something like this: const std::string& str =
2015 Jul 09
2
[LLVMdev] llvm jit acting at runtime, like libgccjit ?
<div>Thanks James,</div><div>ลก</div><div>Kaleidoscope seems to differ in the sense that I cannot really understand how to create, say, a loop. It all looks like very complicated (<a
2016 May 30
1
Back end with special loop instructions
Hi Alex, You might find it useful to look at how lib/Target/PowerPC/PPCCTRLoops.cpp works. -Hal ----- Original Message ----- > From: "Alex Susu via llvm-dev" <llvm-dev at lists.llvm.org> > To: "llvm-dev" <llvm-dev at lists.llvm.org> > Sent: Monday, May 30, 2016 5:09:37 PM > Subject: [llvm-dev] Back end with special loop instructions > > Hello.
2010 Jul 16
0
[LLVMdev] Tool for run-time code generation?
I happen to be using LLVM for just this reason. I process large volumes of data records with schemas that are only known at runtime and/or can change dynamically as various transforms are applied to such records at various stages. To this end, I auto-generate C99 syntax at run time, parse it using clang, do some AST transformations, compile using LLVM JIT, and then execute within the same (C++)
2016 May 30
2
Back end with special loop instructions
Hello. I'm writing a back end for my research SIMD processor that has an assembly language that is blocked structured, with one-level loops. An example program with my assembly language: REPEAT_X_TIMES(Param2) R0 = LS[offset_A]; END_REPEAT; The LLVM code somewhat equivalent to the above ASM program is: vector.body: %index = phi i64 [
2010 Jul 16
6
[LLVMdev] Tool for run-time code generation?
Using C++ code, I would like to generate code at run-time (the same way .NET code can use dynamic methods or compiled expressions) in order to obtain very high performance code (to read binary data records whose formats are only known at run-time.) I need to target x86 (Win32) and ARM (WinCE). Can LLVM be used for this purpose, or would something else work better? Are there any open-source