Displaying 20 results from an estimated 800 matches similar to: "[LLVMdev] reference to non-static member function must be called"
2014 Jan 09
2
[LLVMdev] reference to non-static member function must be called
I'm using LLVM 3.3 Release. From the Class Reference Page. CallInst has a
member function :
static CallInst * Create (Value *Func, ArrayRef< Value * > Args, const
Twine &NameStr="", Instruction *InsertBefore=0)
This is what I want to use! the default name is "" and I also use that .
Thanks!
-----
Kind Regards!
-JinHuang
--
View this message in context:
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
2013 Jul 31
1
[LLVMdev] Instruction insertion By Module Pass
Thank you for your help
I tried
Instruction* p=&( Bb->front());
Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
AllocaInst* newInst = new AllocaInst(Int32Type,"flag", p);
that works well
but I need to store the value of the variable too.
What's the method that could be used to store specific value??
On 30 July 2013 16:01, John Criswell
2013 Jul 30
2
[LLVMdev] Instruction insertion By Module Pass
Hi,
I need to insert new instruction into every basic block like x=1
or while loop
I tried this code, but it doesn't work
Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
AllocaInst* newInst = new AllocaInst(Int32Type,"flag", Bb);
Bb->getInstList().push_back(newInst);
the error:
void llvm::SymbolTableListTraits<llvm::Instruction,
2013 Jul 30
0
[LLVMdev] Instruction insertion By Module Pass
On 7/30/13 7:44 AM, Rasha Omar wrote:
> Hi,
> I need to insert new instruction into every basic block like x=1
> or while loop
> I tried this code, but it doesn't work
>
> Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
> AllocaInst* newInst = new AllocaInst(Int32Type,"flag", Bb);
> Bb->getInstList().push_back(newInst);
The problem is
2011 Oct 06
0
[LLVMdev] How to create arguments CallInst
On 10/6/11 12:40 PM, Rafael Baldiati Parizi wrote:
> virtual std::vector<Value *> getESetArgumentosFunc(Function *F){
> std::vector<Value *> varg_list;
> varg_list.clear();
> for(Function::arg_iterator arg_iti = F->getArgumentList().begin(),
> arg_ite = F->getArgumentList().end(); arg_iti != arg_ite; ++arg_iti){
> Value *para =
>
2011 Oct 06
2
[LLVMdev] How to create arguments CallInst
virtual std::vector<Value *> getESetArgumentosFunc(Function *F){
std::vector<Value *> varg_list;
varg_list.clear();
for(Function::arg_iterator arg_iti = F->getArgumentList().begin(), arg_ite =
F->getArgumentList().end(); arg_iti != arg_ite; ++arg_iti){
Value *para = ConstantInt::get(IntegerType::get(getGlobalContext(),32), 0);
*Value *val2 = cast<*
2014 Sep 04
2
[LLVMdev] How to deal with wider Integer type?
Hi,
I am currently working on an opencl project based on LLVM, the target
device is 32bit.
I met a problem that some llvm passes like GVN SROA will generate some IR
operating
on wide integer types like i128 or i512. But the device does not support
such kind of data type.
Is there any idea on how to lower this kind of IR to only operate on i32 or
vector of i32? Or is there any existing code handle
2014 Sep 04
2
[LLVMdev] How to deal with wider Integer type?
Some code in GVN.cpp:
static Value *CoerceAvailableValueToLoadType(Value *StoredVal,
Type *LoadedTy,
Instruction *InsertPt,
const DataLayout &DL) {
....
// Convert vectors and fp to integer, which can be manipulated.
if (!StoredValTy->isIntegerTy()) {
2015 Jan 22
2
[LLVMdev] access IntegerType::getSignBit from Type *
Hi,
I have a Type * which may come from an IntegerType as shown below:
Type.getIntegerBitWidth() tells me numBits.
But how to extract the IntegerType.getSignBit?
If pType isIntegerType, I need to know if it is signed or unsigned...
How to achieve this?
Thx
Alex
llvm::Type * getRandomValid_IntegerType(llvm::LLVMContext &C)
{
using namespace llvm;
//--- determine num of bits
2013 Jan 02
0
[LLVMdev] [DragonEgg] [Polly] Should we expect DragonEgg to produce identical LLVM IR for identical GIMPLE?
Hi Duncan & Tobi,
Thanks a lot for your interest, and for pointing out differences in GIMPLE
I missed.
Attached is simplified test case. Is it good?
Tobi, regarding runtime alias analysis: in KernelGen we already do it along
with runtime values substitution. For example:
<------------------ __kernelgen_main_loop_17: compile started
--------------------->
Integer args substituted:
2013 Apr 16
1
[LLVMdev] creating and inserting a function with variable arguments
The code that I have written to get the function type is:
const std::vector<Type *> ParamTys;
ParamTys.push_back(IntegerType::getInt32Ty(Context));
ParamTys.push_back(IntegerType::getInt32Ty(Context));
ParamTys.push_back(IntegerType::getInt32Ty(Context));
ParamTys.push_back(PointerType::get(Type::getVoidTy(Context), 0));
ParamTys.push_back(PointerType::get(Type::getVoidTy(Context), 0));
2014 Jan 09
2
[LLVMdev] InstVisitor usage problem
Hi.All
I had a problem in using llvm::InstVisitor class, my pass is like that:
using namespace llvm;
namespace
{
class InstVisit : public ModulePass,
public InstVisitor<InstVisit>
{
public :
static char ID;
InstVisit():ModulePass(ID){}
virtual bool runOnModule(Module &M)
{
visit(M);
return false;
}
void visitStoreInst(StoreInst &SI)
{
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),
2010 Apr 28
1
[LLVMdev] LLVM Tutorial 1: Something got wrong?
it seems the code snippit below cann't be compiled throuth.
the compiler complains:
error: no matching function for call to ‘llvm::IntegerType::get(int)’
/usr/local/include/llvm/DerivedTypes.h:108:
note: candidates are: static const llvm::IntegerType*
llvm::IntegerType::get(llvm::LLVMContext&, unsigned int)
Module* makeLLVMModule() {
// Module Construction
Module* mod = new
2010 Nov 23
1
[LLVMdev] how to get a void type value in llvm
Hi, sivart
Thanks for pointing it out. I used it, and it works. Thank you again.
BTW, for any later reference, the function prototype declaration with
no arguments is not what I wrote:
fcall2 = M.getOrInsertFunction("foo",
IntegerType::get(M.getContext(), 32),
Type::getVoidTy(M.getContext()));
INSTEAD, I changed to :
fcall2 = M.getOrInsertFunction("foo",
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).
2017 Nov 23
1
JIT and atexit crash
Hi,
Not sure whether this matches your use case, but the Orc-based JIT used
in LLI appears to be using `llvm::orc::LocalCXXRuntimeOverrides`
(http://llvm.org/doxygen/classllvm_1_1orc_1_1LocalCXXRuntimeOverrides.html)
to override `__cxa_atexit`:
https://github.com/llvm-mirror/llvm/blob/release_50/tools/lli/OrcLazyJIT.h#L74
2015 Jan 15
2
[LLVMdev] AllocaInst for FunctionType?
Hi,
I'm trying to get my head around c++ - IR - c++ API and getting used
tramform manual information to code.
The manual states alloca is defined for <type>. FunstionType is a type, so
alloca for functionType should be possible? Not?
If we have a valid Module *m
we can get an allocate instruction allocating space for a non-argumented
function as follows:
AllocaInst* pa2 = new
2015 Nov 24
2
How to create a sprintf call in IR
Hi,
I created a global char array, char buffer[1024]. I want to call a function
to append the string information to the buffer repeatedly. For example, I
need to implement the following code, where length, a, b, c, are global
variables.
int length = 0;
length += sprintf(buffer+length, "str%d", a);
length += sprintf(buffer+length, "str%c", b);
length += sprintf(buffer+length,