similar to: [LLVMdev] PR4882

Displaying 20 results from an estimated 1200 matches similar to: "[LLVMdev] PR4882"

2009 Sep 07
0
[LLVMdev] PR4882
Hi Jakub, looks good. > + LLVMContext *Context = &SI->getContext(); I guess this could be LLVMContext &Context = SI->getContext(); which means you can use Context rather than *Context below. > - const Type *Ty = Type::getInt64Ty(SI->getContext()); > - MemSetF = Intrinsic::getDeclaration(M, Intrinsic::memset, &Ty, 1); > + const Type *Tys[] =
2009 Sep 07
1
[LLVMdev] PR4882
On Sep 7, 2009, at 5:02 PM, Duncan Sands wrote: > Hi Jakub, looks good. > >> + LLVMContext *Context = &SI->getContext(); > > I guess this could be > LLVMContext &Context = SI->getContext(); > which means you can use Context rather than *Context below. Right, C bad habit ;) Fixed. >> - const Type *Ty = Type::getInt64Ty(SI->getContext());
2012 Jul 04
2
[LLVMdev] Bogus assert in VMCore/Instructions.cpp CallInst::Create?
Evening, I was writing some code that tried to insert calls to the llvm.annotation intrinsic function, which has a signature of (i32, i8*, i8*, i32). The code is below. void addAnnotation( BasicBlock *block, Function *F) { string foo = "foo"; string bar = "barr"; Type *charTy = Type::getInt8Ty(block->getContext()); ArrayType *s1Ty =
2007 Apr 20
2
[LLVMdev] llvm-gcc Bug, Looking for Advice on Fix
Ok, I've tracked down the problem I've had bootstrapping llvm-gcc. The culprit is in TreeToLLVM::EmitMemCpy: void TreeToLLVM::EmitMemCpy(Value *DestPtr, Value *SrcPtr, Value *Size, unsigned Align) { const Type *SBP = PointerType::get(Type::Int8Ty); const Type *IntPtr = TD.getIntPtrType(); Value *Ops[4] = { CastToType(Instruction::BitCast,
2012 Jul 04
0
[LLVMdev] Bogus assert in VMCore/Instructions.cpp CallInst::Create?
Andrew Ruef wrote: > Evening, > > I was writing some code that tried to insert calls to the > llvm.annotation intrinsic function, which has a signature of (i32, > i8*, i8*, i32). The code is below. > > void addAnnotation( BasicBlock *block, Function *F) > { > string foo = "foo"; > string bar = "barr"; > > Type
2015 Apr 18
2
[LLVMdev] how can I create an SSE instrinsics sqrt?
I want to create a vector version sqrt as the following. Value *Approx::CreateFSqrt(IRBuilder<> &builder, Value *v, const char* Name) { Type *tys[] = {v->getType()}; Module* M = currF->getParent(); Value* sqrtv = Intrinsic::getDeclaration(M, Intrinsic::x86_sse2_sqrt_pd); CallInst *CI = builder.CreateCall(sqrtv, v, Name); return CI; } Here is Value *v is <2 x
2008 Feb 19
2
[LLVMdev] Problem with variable argument intrinsics
Hi, I tried creating variable argument intrinsics which are to be placeholders for some instructions which should not be executed by the backend. Kindly help me with the errors in my "migrate_begin" intrinsic creation //Additions made to Intrinsics.td file: def llvm_migrate_begin : LLVMType<iAny>; def int_migrate_begin :
2008 Feb 19
0
[LLVMdev] Problem with variable argument intrinsics
On Feb 19, 2008, at 1:11 AM, aditya vishnubhotla wrote: > Hi, > I tried creating variable argument intrinsics which > are to be placeholders for some instructions which > should not be executed by the backend. > > Kindly help me with the errors in my "migrate_begin" > intrinsic creation > > //Additions made to Intrinsics.td file: > > def
2015 Apr 18
2
[LLVMdev] how can I create an SSE instrinsics sqrt?
Thanks, Shahid. It is fixed now. On Fri, Apr 17, 2015 at 8:50 PM, Shahid, Asghar-ahmad < Asghar-ahmad.Shahid at amd.com> wrote: > Hi zhi, > > > > You have to also pass the value type to getDecalaration() API such as > > > > Value* sqrtv = Intrinsic::getDeclaration(M, Intrinsic::x86_sse2_sqrt_pd, > v->getType()); > > > > Regards, > >
2009 May 15
1
[LLVMdev] Intrinsic
Hi, I'm trying to use exception control by LLVM. In the demo page, I got : declare i8* @llvm.eh.exception() nounwind But, when a try to emit the code by llvm engine, the name is generate with the sufix .132 ( llvm.eh.exception.132 ) and the Function::getIntrinsicID abort the program. It was so : Intrinsic::getDeclaration(llvm_module,Intrinsic::memset,&Tys,1); Now, it's
2008 Feb 20
1
[LLVMdev] Invalid intrinsic name error
Hi, Thank You for the advice and we were able to solve that problem by the following modifications to the Instrinsics.td file. But I now have an "Invalid Intrinsic name" error This error occurs presumably because the created intrinsic is named: llvm.migrate_begin.i32 Intrinsics.gen checks for a string length of 18 (i.e. the length without the .i32). Kindly help me through it.
2012 Jul 02
1
[LLVMdev] Intrinsic::getDeclaration causing dump() segfault
In the following scrap of code (pared down from actually useful code), the func->dump() command segfaults iff the commented-out line is uncommented. This is with llvm 3.0. I'm only dipping my toes into the waters of llvm for the first time, and have no idea what I am doing incorrectly. In actual code, I would be wanting to call the memcpy intrinsic eventually, of course. int main(void)
2009 Mar 09
0
[LLVMdev] Intrinsic & address space
Julien Schmitt wrote: > I would like to use intrinsic with different address space. > I defined an intrinsic (used to represent à specific instruction of my target) with a pointer in its arguments, but when calling this intrinsic, if the pointer is not in the generic address space (ie AddrSpace 0), an error occurs ("bad signature"). > > How can I specify the address space in
2009 Mar 09
2
[LLVMdev] Intrinsic & address space
I would like to use intrinsic with different address space. I defined an intrinsic (used to represent à specific instruction of my target) with a pointer in its arguments, but when calling this intrinsic, if the pointer is not in the generic address space (ie AddrSpace 0), an error occurs ("bad signature"). How can I specify the address space in the intrinsic definition ? Thank you.
2013 May 03
2
[LLVMdev] set of integers to metadata
Hello everyone, I want to pass a set of integers using metadata but I don't know how. I have tried: the integers are in array[] *1. * LLVMContext& C = is->getContext(); Value* values[size]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } *is->setMetadata("path",MDNode::get(C,values));* failes when setMetadata(),
2013 May 03
0
[LLVMdev] set of integers to metadata
I also tried the following, with no compilation errors, but segfault, core dumped: *LLVMContext& C = is->getContext(); Value* values[size]; for(int gy=0;gy<size;gy++){ values[gy]=ConstantInt::getSigned(Type::getInt64Ty(C),array[gy]); } llvm::ArrayRef<Value*> bla = values[size]; is->setMetadata("path",MDNode::get(C,bla));* On Fri, May 3, 2013
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] =
2011 Jul 18
5
[LLVMdev] dragonegg svn still broken
Despite the commit of... ------------------------------------------------------------------------ r135371 | lattner | 2011-07-18 00:25:32 -0400 (Mon, 18 Jul 2011) | 2 lines untested patch to de-constify llvm::Type, patch by David Blaikie! current dragonegg svn at r135391 still fails to compile against FSF gcc 4.5.3 with the failure... In file included from
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
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