search for: getint32ti

Displaying 20 results from an estimated 208 matches for "getint32ti".

Did you mean: getint32ty
2011 May 18
3
[LLVMdev] access array problem
Hi, I want to access an array in my instrumentation code. For example: GlobalVariable: int *counter; //counter the number of load/store operations in run-time int *counterArray; //record the load/store addresses //increase the counter if a load/store is performed std::vector<Constant *>index(2); index[0] = Constant::getNullvalue(Type:getInt32Ty(Context)); index[1] =
2017 Apr 08
2
How to insert vector type input parameter for function in C/C++ API?
Thank you so much Craig! I tried it. But still complaining. Here is the error message during compilation. HowToUseJIT_SIMD_FuncProto.cpp:94:55: error: expected unqualified-id VectorType::(Type::getInt32Ty(Context),4), THIS IS MY CODE: LLVMContext Context; std::unique_ptr<Module> Owner = make_unique<Module>("test", Context); Module *M = Owner.get(); Function
2011 May 18
2
[LLVMdev] access array problem
于 2011/5/18 14:29, Duncan Sands 写道: > Hi Tan Guangming, > >> I want to access an array in my instrumentation code. For example: >> >> GlobalVariable: >> int *counter; //counter the number of load/store operations in run-time >> int *counterArray; //record the load/store addresses > strictly speaking these are not arrays, they are pointers. Also, you have
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: >
2011 May 18
0
[LLVMdev] access array problem
Hi Tan Guangming, > I want to access an array in my instrumentation code. For example: > > GlobalVariable: > int *counter; //counter the number of load/store operations in run-time > int *counterArray; //record the load/store addresses strictly speaking these are not arrays, they are pointers. Also, you have written them in some kind of C-style idiom. What are the declarations
2011 May 18
0
[LLVMdev] access array problem
Hi Guangming Tan, >>> GlobalVariable: >>> int *counter; //counter the number of load/store operations in run-time >>> int *counterArray; //record the load/store addresses >> strictly speaking these are not arrays, they are pointers. Also, you have >> written them in some kind of C-style idiom. What are the declarations in >> LLVM IR? > const Type
2013 Jan 27
2
[LLVMdev] Passing an array to an external function
Hi all, I am new to LLVM, and I am learning how to use LLVM for profiling. I need to pass an array to an external method, and insert a call instruction to the method in the code. After reading a few source files, I've tried using GetElementPtrInst to pass an array, but it fails at llvm::GetElementPtrInst::hasAllZeroIndices() const + 0 std::vector<Value*> Args(1);
2012 Nov 02
4
[LLVMdev] Instruction does not dominate all uses! <badref> ??
I'm having trouble figuring out what the error "Instruction does not dominate all uses!" means. I'm trying to construct a call to a function with two parameters. The printed IR, with error, looks like this: define i32 @add(i32, i32) { EntryBlock: %2 = add i32 %0, %1 ret i32 %2 } define i32 @eval_expr() { EntryBlock: ret i32 <badref> } Instruction does not dominate
2011 Mar 07
1
[LLVMdev] DW_TAG_lexical_block structure in debug information
Hello, The documentation for debug information (http://llvm.org/docs/SourceLevelDebugging.html) says the structure of block descriptors metadata is: !3 = metadata !{ i32, ;; Tag = 11 + LLVMDebugVersion (DW_TAG_lexical_block) metadata,;; Reference to context descriptor i32, ;; Line number i32 ;; Column number } However, looking at the generated metadata, there are 2 extra
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),
2012 Feb 09
1
[LLVMdev] Difficulty inserting putchar in IR
Hi, I have written a simple code to insert putchar() function into IR. It compiled well but when I tried to run the generated .bc file with lli, its not showing proper output. Function *putchar_func = cast<Function>(M-> getOrInsertFunction("putchar", IntegerType::getInt32Ty(Context), IntegerType::getInt32Ty(Context), NULL)); Value *One =
2018 Aug 07
2
Create an Add Instruction in LLVM IR
I want to create an add instruction that takes two constant operands at the LLVM IR level. I use the IRBuilder class, but nothing happens. Here is part of the runOnFunction() method of my function pass: ... LLVMContext &Context = F.getContext(); IRBuilder<> builder(&Instruction); Value *Lef = ConstantInt::get(Type::getInt32Ty(Context), 4); Value *Rig =
2013 Jul 25
2
[LLVMdev] Error for AllocaInst and Instruction
Hi, For the following code const Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext()); AllocaInst* newInst = new AllocaInst(Int32Type, 0, "flag", Bb); Bb->getInstList().push_back(newInst); It gives me the error " error: no matching constructor for initialization of 'llvm::AllocaInst' AllocaInst* newInst = new
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 {
2015 May 30
2
[LLVMdev] Linking modules across contexts crashes
I get a crash when I try to link multiple modules registered in their individual contexts. Documentation for Linker::LinkModules doesn't mention anything about contexts, and the first link succeeds. But the second link crashes. Is this not the right way to merge such modules? If not, then what is the right way? In any case, documentation for Linker::LinkModules should say if contexts are
2010 Aug 18
2
[LLVMdev] clang: call extern function using JIT
gafferuk <gafferuk at gmail.com> writes: > Can someone pease tell me what I am doing wrong? It is hard to say because you don't say what the problem is, but let's try. > Im trying to register an external function with the JIT, so can call > functions in my music > > application. > > Here my function > > int Execute(llvm::Module *Mod, char * const *envp)
2011 May 18
2
[LLVMdev] access array problem
Thank you, Duncan. I rewrote the code, please help check why it still does not work: //declare global variable const Type *IntTy = Type::getInt32Ty(M.getContext()); const Type *ATyC = ArrayType::get(Type::getInt64Ty(M.getContext()), 1); GlobalVariable *CounterSize = new GlobalVariable(M, ATyC, false, GlobalValue::InternalLinkage,
2013 Nov 26
0
[LLVMdev] Help needed with a pass
I'm a newbie to LLVM and I've really been struggling to write a pass which changes the behavior of the following function: #include<stdlib.h>#include<stdio.h>#include<string.h>void foo(char* bar){const char* path;path=getenv(<SOME_ENV_VAR>); if (path!=NULL){strcpy(bar,path);}else{printf("env_var not set!");}} In the pass, I hope to invoke
2012 Apr 10
2
[LLVMdev] How to get the module handle of a .bc file??
Hi all, I want to run a function pass on a certain .bc file. In the process, the pass will insert a check function into the .bc file. I know the .bc file is regarded as a module in LLVM. So, there are two basic steps needed to be done, 1, Use the "getOrInsertFunction"API to add a declaration of the extern "check function". 2, Use the "insertBefore"API to insert the
2011 Jul 11
2
[LLVMdev] type-system-rewrite branch landing tomorrow
Sorry, these IRBuilder methods are really in IRBuilderBase. Garrison On Jul 11, 2011, at 11:54, Garrison Venn wrote: > Are the get type methods for IRBuilder, such as const IntegerType *getInt32Ty(), going to have > their return type const qualifiers removed? Doing so would match the semi equivalent static > methods of Type, such as static IntegerType *getInt32Ty(LLVMContext &C).