Displaying 20 results from an estimated 88 matches for "getdeclar".
Did you mean:
getdecl
2011 Jul 18
5
[LLVMdev] dragonegg svn still broken
.../dragonegg-3.0/src/Convert.cpp:429:64: error: too many arguments to function call, expected 3, have 4
ArgTypes, 3), Ops);
^
/sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration' declared here
Function *getDeclaration(Module *M, ID id,
^
/sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:1674:58: error: too many arguments to function call, expected 3, have 4
ArgTypes, 3), Ops);...
2011 Jul 18
0
[LLVMdev] dragonegg svn still broken
.../Convert.cpp:429:64:
> error: too many arguments to function call, expected 3, have 4
> ArgTypes, 3), Ops);
> ^
> /sw/opt/llvm-3.0/include/llvm/Intrinsics.h:71:3: note: 'getDeclaration'
> declared here
> Function *getDeclaration(Module *M, ID id,
> ^
> /sw/src/fink.build/dragonegg-gcc45-3.0-1/dragonegg-3.0/src/Convert.cpp:1674:58:
> error: too many arguments to function call, expected 3, have 4
> ArgTypes,...
2007 Apr 20
2
[LLVMdev] llvm-gcc Bug, Looking for Advice on Fix
...t(Type::Int8Ty);
const Type *IntPtr = TD.getIntPtrType();
Value *Ops[4] = {
CastToType(Instruction::BitCast, DestPtr, SBP),
CastToType(Instruction::BitCast, SrcPtr, SBP),
CastToSIntType(Size, IntPtr),
ConstantInt::get(Type::Int32Ty, Align)
};
new CallInst(Intrinsic::getDeclaration(TheModule,
(IntPtr == Type::Int32Ty) ?
Intrinsic::memcpy_i32 :
Intrinsic::memcpy_i64),
Ops, 4, "", CurBB);
}
The problem is that Intrinsic::getDeclar...
2012 Jul 02
1
[LLVMdev] Intrinsic::getDeclaration causing dump() segfault
...ion::ExternalLinkage,
"", module);
BasicBlock *bb = BasicBlock::Create(getGlobalContext(), "entry", func);
builder.SetInsertPoint(bb);
builder.CreateRet(ConstantInt::getTrue(getGlobalContext()));
// Value *memcpy = Intrinsic::getDeclaration(
// module, Intrinsic::memcpy, Type::getInt64Ty(getGlobalContext()));
func->dump();
delete module;
return 0;
}
--
Michael Welsh Duggan
(md5i at md5i.com)
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 double>
However, it outputs Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type! any idea?
-------------- next part ---...
2011 Nov 10
1
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
...es not compile though, I get this error:
First, please CC the llvmdev list. That way, others having the same
question can see the conversation, and others on the list can help
correct any errors I make.
:)
>
> cdfg_pass.cpp:511:11: error: ‘class llvm::Function’ has no member
> named ‘getDeclaration’
Sorry. I believe the method name is Function::isDeclaration().
BTW, you should double-check my answers (and other people's answers)
against the LLVM doxygen documentation. This is because:
1) I often don't take the time to consult the documentation to ensure I
have every detail...
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,
>
> Shahid
>
>
>
> *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] *On
> Behalf Of *zhi chen
> *Sent:* Saturday, April 18, 2015 5:52 AM
> *To:* LLVM Dev...
2009 Sep 07
2
[LLVMdev] PR4882
Hello,
This patch fixes bug 4882.
Regards
-Jakub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr4882.patch
Type: application/octet-stream
Size: 6856 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090907/266f900c/attachment.obj>
2009 Sep 07
0
[LLVMdev] PR4882
...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[] = {Type::getInt64Ty(*Context)};
> + MemSetF = Intrinsic::getDeclaration(M, Intrinsic::memset,
> + Tys, 1);
Why did you introduce Tys and not stick with Ty?
Ciao,
Duncan.
2009 Sep 07
1
[LLVMdev] PR4882
...ntext();
>
> 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());
>> - MemSetF = Intrinsic::getDeclaration(M, Intrinsic::memset,
>> &Ty, 1);
>> + const Type *Tys[] = {Type::getInt64Ty(*Context)};
>> + MemSetF = Intrinsic::getDeclaration(M, Intrinsic::memset,
>> + Tys, 1);
>
> Why did you introduce Tys and not sti...
2008 Feb 20
1
[LLVMdev] Invalid intrinsic name error
...(),sizeof(Type*));
/*extTys vector contains function type of the
function "f" */
int i=0;
for(vector<const Type*>::iterator
it=extTys.begin(),e=extTys.end();it!=e;it++)
{Tys[i++]=*it;}
extTys.clear();
Module *M = bbp->getParent()->getParent();
Function *f =
Intrinsic::getDeclaration(M,Intrinsic::migrate_begin,Tys,i);
/* migrate_begin intrinsic creation */
CallInst* CI = new CallInst(f,"migrate_begin");
//Error:
NAME:llvm.migrate_begin.i32
opt: Function.cpp:293: unsigned int
llvm::Function::getIntrinsicID(bool)
const: Assertion `noAssert && "...
2011 Nov 10
3
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
LLVMers,
I am doing a CallGraphPass but would like to get the LoopInfo of the
functions inside this pass, is this possible? Currently I have a function
inside the CallGraph struct:
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<LoopInfo>();
AU.addPreserved<LoopInfo>();
}
And later inside the pass I am calling:
LoopInfo &LI =
2011 Nov 10
4
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
...se CC the llvmdev list. That way, others having the same
>> question can see the conversation, and others on the list can help correct
>> any errors I make.
>> :)
>>
>>
>>
>> cdfg_pass.cpp:511:11: error: ‘class llvm::Function’ has no member named
>> ‘getDeclaration’
>>
>>
>> Sorry. I believe the method name is Function::isDeclaration().
>>
>> BTW, you should double-check my answers (and other people's answers)
>> against the LLVM doxygen documentation. This is because:
>>
>> 1) I often don't take...
2016 Jun 13
2
LLVM IR intrinsics placeholder for strings [was Re: Back end with special loop instructions (using LLVM IR intrinsics)]
...it is? (so, basically having
placeholders of strings in LLVM that remain untouched until the end, including code
generation time.)
More exactly, I would like to give something LIKE this in a middle-tier pass (I
haven't tried this code in LLVM):
Value *instrinsicFunc = Intrinsic::getDeclaration(M,
Intrinsic::my_intrinsic);
myIRBuilder.CreateCall(repeatFunc,
"string_that_llc_codegen_should_output_as_assembly");
So my intrinsic would be accepting a general string which will be used at codegen to
be output....
2011 Nov 10
0
[LLVMdev] Problem getting LoopInfo inside non-LoopPass
...rror:
>
>
> First, please CC the llvmdev list. That way, others having the same
> question can see the conversation, and others on the list can help correct
> any errors I make.
> :)
>
>
>
> cdfg_pass.cpp:511:11: error: ‘class llvm::Function’ has no member named
> ‘getDeclaration’
>
>
> Sorry. I believe the method name is Function::isDeclaration().
>
> BTW, you should double-check my answers (and other people's answers)
> against the LLVM doxygen documentation. This is because:
>
> 1) I often don't take the time to consult the document...
2012 Jul 04
2
[LLVMdev] Bogus assert in VMCore/Instructions.cpp CallInst::Create?
...k(ConstantInt::get( block->getContext(),
APInt(64, StringRef("0"), 10)));
g1->setInitializer(ar1);
g2->setInitializer(ar2);
Type *tys = { Type::getInt32Ty(block->getContext()) };
Function *annot = Intrinsic::getDeclaration( F->getParent(),
Intrinsic::annotation,
tys);
Value *v1 =ConstantExpr::getGetElementPtr(g1, s1_id);
Value *v2 =ConstantExpr::getGetElementPtr(g2, s2_id);
Value *c1 = Con...
2011 Jul 26
4
[LLVMdev] How to get the return address on the stack on LLVM
...e of the function.
In the prologue of the function, before I insert into the canary on
the stack, I can get the return address by:
ConstantInt* ci =
llvm::ConstantInt::get(Type::getInt32Ty(RI->getContext()), 0);
Value* Args1[] = {ci};
CallInst* callInst = CallInst::Create(Intrinsic::getDeclaration(M,
Intrinsic::returnaddress),
&Args1[0], array_endof(Args1), "Call Return Address", InsPt);
CallInst will get the return address and it works.
While, in the epilogue of the function, due to the canary has been
inserted. I write the similar code:
ConstantInt...
2009 Jun 24
3
[LLVMdev] Replacing instruction in LLVM IR by an intrinsics
...each instruction of a function
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I)
{
Instruction* i = &(*I);
//if this is a load
if (isa<LoadInst>(i))
{
//now i need to create an instruction that represents a call to a intrinsic
Function* FIntr = Intrinsic::getDeclaration(&M, Intrinsic::regread_i32);
// here it fails: void llvm::CallInst::init(llvm::Value*):
//Assertion `FTy->getNumParams() == 0 && "Calling a function with bad signature"' failed.
Instruction* Instr = CallInst::Create(FIntr);
//do some stuff with the ope...
2008 Feb 19
2
[LLVMdev] Problem with variable argument intrinsics
...ctor contains data types(pointers) of formal
parameters of the
function "f" */
int i=0;
for(vector<const Type*>::iterator
it=extTys.begin(),e=extTys.end();it!=e;it++)
{Tys[i++]=*it;}
extTys.clear();
Module *M = bbp->getParent()->getParent();
Function *f =
Intrinsic::getDeclaration(M,Intrinsic::migrate_begin,Tys,i);
/*
migrate_begin intrinsic creation */
CallInst* CI = new CallInst(f,"migrate_begin",bbp);
/*bbp is pointer to basic block where
intrinsic is to be inserted*/
//Errors:
Overloaded intrinsic has incorrect suffix: '.i32.i32'.
It shoul...
2011 Jul 12
1
[LLVMdev] Overloading intrinsic with pointer to pointer
Hi,
I've noticed that if I try to overload an intrinsic with a pointer to
pointer my call to Intrinsic::getDeclaration, for example with an i8**
type. Ultimately, this is because Intrinsic::getName
(lib/VMCore/Function.cpp#338) only removes one level of indirection
from the passed pointer type, so calls getEVTString on a pointer type
resulting an in Invalid EVT assertion (lib/VMCore/ValueTypes.cpp#97).
Is the...