Displaying 8 results from an estimated 8 matches for "label_entry".
2011 Aug 19
1
[LLVMdev] LLVM: Very simple question
Hi, guys. I'm a newbie to LLVM and have a very simple question.
Which instructions should I use (in terms of IRBuilder calls) to allocate an
array of bytes in stack (alloca?), then to work with it (from a given
offset) as with integer (bitcast?). I mean something like that:
unsigned char var[8];
unsigned int offset = 3;
int val = *(int*)(&var+offset); /* read */
*(int*)(&var+offset)
2008 May 08
0
[LLVMdev] Vector code
...ntially what I try to generate:
void add(float z[4], float x[4], float y[4])
{
z[0] = x[0] + y[0];
z[1] = x[1] + y[1];
z[2] = x[2] + y[2];
z[3] = x[3] + y[3];
}
And here's part of the output from the online demo:
LoadInst* float_tmp2 = new LoadInst(ptr_x, "tmp2", false, label_entry);
LoadInst* float_tmp5 = new LoadInst(ptr_y, "tmp5", false, label_entry);
BinaryOperator* float_tmp6 = BinaryOperator::create(Instruction::Add,
float_tmp2, float_tmp5, "tmp6", label_entry);
StoreInst* void_20 = new StoreInst(float_tmp6, ptr_z, false, label_entry);
GetElementPtrI...
2008 May 08
2
[LLVMdev] Vector code
...], float x[4], float y[4])
> {
> z[0] = x[0] + y[0];
> z[1] = x[1] + y[1];
> z[2] = x[2] + y[2];
> z[3] = x[3] + y[3];
> }
>
> And here's part of the output from the online demo:
>
> LoadInst* float_tmp2 = new LoadInst(ptr_x, "tmp2", false,
> label_entry);
> LoadInst* float_tmp5 = new LoadInst(ptr_y, "tmp5", false,
> label_entry);
> BinaryOperator* float_tmp6 = BinaryOperator::create(Instruction::Add,
> float_tmp2, float_tmp5, "tmp6", label_entry);
> StoreInst* void_20 = new StoreInst(float_tmp6, ptr_z, false,...
2008 May 08
3
[LLVMdev] Vector code
Hi Nicolas (at least, I suspect your signing of your mail with "Anton" was not
intentional :-p),
> I assume that's the same as the online demo's "Show LLVM C++ API code"
> option (http://llvm.org/demo/)? I've tried that with a structure containing
> four floating-point components but it also appears to add them individually
> using extract/insert. Maybe
2008 May 09
0
[LLVMdev] Vector code
...], float x[4], float y[4])
> {
> z[0] = x[0] + y[0];
> z[1] = x[1] + y[1];
> z[2] = x[2] + y[2];
> z[3] = x[3] + y[3];
> }
>
> And here's part of the output from the online demo:
>
> LoadInst* float_tmp2 = new LoadInst(ptr_x, "tmp2", false,
> label_entry);
> LoadInst* float_tmp5 = new LoadInst(ptr_y, "tmp5", false,
> label_entry);
> BinaryOperator* float_tmp6 = BinaryOperator::create(Instruction::Add,
> float_tmp2, float_tmp5, "tmp6", label_entry);
> StoreInst* void_20 = new StoreInst(float_tmp6, ptr_z, false,...
2008 Jan 14
1
[LLVMdev] Opaque type
...nderstand
how to use.
So, the java code is:
int[] ai;
....
ai = new int[1];
I am using LLVM API in this way:
//I create a pointer of Opaque type, because I don't know yet the array size!
OpaqueType* ot = OpaqueType::get();
AllocaInst* ptr_addrOP = new AllocaInst(ot, "ai_addr", label_entry);
//I create pointer of Array type when it is initialized
ArrayType* art = ArrayType::get(Type::IntTy, 1);
AllocaInst* ptr_addrAr = new AllocaInst(art, "ai_addr", label_entry);
//I try to make concrete the abstract pointer
((PointerType*)ptr_addrOP -> getType()) ->
typeBecameCon...
2011 Apr 19
4
[LLVMdev] llvm-gcc
...the times a wrong bc file
as output, because when i try to execute it with lli it says to me
invalid signature.
2 -
for (Module::iterator a=M.begin(),b=M.end();a!=b;++a) {
for (Function::iterator i = a->begin(), e = a->end(); i != e; ++i){
new StoreInst(const_int32_12, gvar_int32_x, false, label_entry);
// normally label entry would be the end of the basic bloc i
}
}
what would be the value of label entry to make the instruction
inserted at the end of the basic bloc
when i have tried this:
Instruction* label_entry = i->begin();
new StoreInst(const_int32_12, gvar_int32_x, false, label_entry);...
2011 Oct 24
1
[LLVMdev] if llvm can translate and generate the function in parallel with multithread
...to use llvm to translate and generate the native code in
parallel with multi-thread. But some various
bugs will be triggered. We run the following code in multithread environment:
##################
BasicBlock::Create(_CTX(), "dispatch", cpu->cur_func, 0);
BranchInst::Create(bb_start, label_entry);
cpu->exec_engine->getPointerToFunction
##################3
And cpu variable is stored for every thread.
Thanks
MK
--
www.skyeye.org