Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] LLVM Type Int32Ty Problems & LLVMContextImpl.h Problems"
2013 Dec 12
0
[LLVMdev] LLVM Type Int32Ty Problems & LLVMContextImpl.h Problems
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Jin Huang
> Subject: [LLVMdev] LLVM Type Int32Ty Problems & LLVMContextImpl.h Problems
> AllocaInst *alloc = new AllocaInst(llvm::Int32Ty, 0, "indexLoc",i);
I think you should be using llvm::Type::getInt32Ty(Context), not llvm::Int32Ty, which is for internal LLVM usage.
2008 Jun 28
2
[LLVMdev] need to store the address of a variable
Hello everybody,
my problem is, that I want to get an array of pointers to all local variables
in a function. This array will be used for transfering these Variables to
another execution engine.
I've code which generates this array, and a pointer to the target field of the
array.
name = variables.fname + "_pointerArray";
Instruction* pointerArray = new
2008 Nov 17
2
[LLVMdev] Assertion `castIsValid(getOpcode(), S, Ty) && "Illegal BitCast"' failed.
ok.. So I am trying out what you have suggested. I have written the below code which basically tries to write the constant 10 to a file. myprint is a function pointer to a function which takes char * parameter and writes it to file.
Value *Ten = ConstantInt::get(Type::Int32Ty, 10);
const Type *VoidPtrTy = PointerType::getUnqual(Type::Int8Ty);
AllocaInst *AI = new AllocaInst(Type::Int32Ty);
Value
2014 Feb 18
3
[LLVMdev] How to codegen an LLVM-IR that has dynamic arrays in it?
Hi Fellows,
Is there a way to allocate dynamic array within an LLVM IR file
from my code generator? Say., how to create an array type with a size
determined through a global variable. Symbolically, something like below:
Value *sz = Mod->getOrInsertGlobal("SIZE", Int32Ty);
Type *ArrayTy = ArrayType::get(FloatTy, sz)
2008 Apr 21
0
[LLVMdev] newbie question for type comparison
Lu Zhao wrote:
> Hi,
>
> I want to extract all instruction of the form "alloca %struct.S", where
> $struct.S is defined as a struct
>
> %struct.S = type { i32, i32 }
>
> I'm using the following loop:
>
> for(inst_iterator i = inst_begin(F), e = inst_end(F); i!= e; i++)
> {
> AllocaInst* ai;
> if( (ai =
2008 Apr 21
3
[LLVMdev] newbie question for type comparison
Hi John,
Thank you a lot. That clarifies some my confusions. What I want to do
is to use both methods, get ALL struct allocation and a SPECIFIC struct
allocation, at different situations. Here, I've got a couple of more
questions.
1. For getting ALL struct allocation, when I use
if( (AI = dyn_cast<AllocaInst>(&*i)))
2008 Nov 17
1
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
Ah! I get it now. Thanks a lot !
I changed it to BitCastInst(AI,VoidPtrTy,"",j);
And now I am getting the following error :(. I have been stuck with this error before also. I know I am missing out something silly. What is the cause of this error and Please let me know how to fix it.
/home/bhavani/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1130: llvm::SDOperand
2008 Nov 17
1
[LLVMdev] Assertion `InReg && "Value not in map!"' failed
Thanks Nick! ok. I ran through the verifier and this is the issue:
verifying... Instruction does not dominate all uses!
%tmp3 = add i32 %b, %a ; <i32> [#uses=2]
store i32 %tmp3, i32* %0, align 4
Broken module found, compilation aborted!
add is existing instruction in function. store is the instruction I have added to the function. How do I fix this now :(?
Thanks,
Bhavani
--- On Mon,
2015 Mar 28
2
[LLVMdev] LLVMContextImpl.h not installed?
Hi all,
I 'd like to fetch a list of structures, and found that it could be done
via
LLVMContextImpl *pImpl = Context.pImpl;
pImpl->AnonStructTypes
This however needs the inclusion of LLVMContextImpl.h, which is not
contained in the includes dir, but in the lib/IR dir (next to the .cpp
files) and is not installed under /usr/local/include...
Whats the reason for this? Isn't it
2009 Sep 18
3
[LLVMdev] compiling java frontend
Thanks, I am now working on compiling up VMKit. When compiling VMKit in my
up-to-date svn checkout I get several error messages on missing members of
the class 'llvm::Type':
PNetLib.cpp: In function ‘void decapsulePrimitive(n3::VMObject*, const
llvm::Type*, std::vector<llvm::GenericValue,
std::allocator<llvm::GenericValue> >&)’:
PNetLib.cpp:694: error: ‘Int1Ty’ is not a
2008 Apr 21
2
[LLVMdev] newbie question for type comparison
Hi,
I want to extract all instruction of the form "alloca %struct.S", where
$struct.S is defined as a struct
%struct.S = type { i32, i32 }
I'm using the following loop:
for(inst_iterator i = inst_begin(F), e = inst_end(F); i!= e; i++)
{
AllocaInst* ai;
if( (ai = dyn_cast<AllocaInst>(&*i))){
if(ai->getOperand(0)->getType()->getTypeID() ==
2008 Apr 21
0
[LLVMdev] newbie question for type comparison
Lu Zhao wrote:
> Hi John,
>
> Thank you a lot. That clarifies some my confusions. What I want to do
> is to use both methods, get ALL struct allocation and a SPECIFIC struct
> allocation, at different situations. Here, I've got a couple of more
> questions.
>
> 1. For getting ALL struct allocation, when I use
>
> if( (AI =
2011 Jul 25
4
[LLVMdev] Lack of use of LLVMContextImpl::NamedStructTypes
Several people on this list have reported issues with the linker regarding a
named StructType instance with the same name in two different modules
being resolved into two StructTypes with different names due to StructType::
setName(…) collision behavior. Looking at BitcodeReader::ParseTypeTableBody(…),
I don't see use of LLVMContextImpl::NamedStructTypes or of Module::getTypeByName(…).
Nor do
2009 Sep 18
0
[LLVMdev] compiling java frontend
Hi Andreas,
Since you're only looking for a Java frontend, I suggest you only build
the Java frontend of vmkit and don't pass any pnet or mono information
to the configure script. I haven't updated the pnet part of the .Net
frontend. On the other hand, the Java frontend is up-to-date.
Nicolas
Andreas Saebjoernsen wrote:
> Thanks, I am now working on compiling up VMKit. When
2011 Jul 25
0
[LLVMdev] Lack of use of LLVMContextImpl::NamedStructTypes
On Mon, Jul 25, 2011 at 10:50 AM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote:
> Several people on this list have reported issues with the linker regarding a
> named StructType instance with the same name in two different modules
> being resolved into two StructTypes with different names due to StructType::
> setName(…) collision behavior. Looking at
2008 Jun 28
0
[LLVMdev] need to store the address of a variable
Paul Arndt wrote:
> Hello everybody,
>
> my problem is, that I want to get an array of pointers to all local variables
> in a function. This array will be used for transfering these Variables to
> another execution engine.
>
> I've code which generates this array, and a pointer to the target field of the
> array.
>
> name = variables.fname +
2011 Jul 26
0
[LLVMdev] Lack of use of LLVMContextImpl::NamedStructTypes
On Jul 25, 2011, at 10:50 AM, Garrison Venn wrote:
> Several people on this list have reported issues with the linker regarding a
> named StructType instance with the same name in two different modules
> being resolved into two StructTypes with different names due to StructType::
> setName(…) collision behavior. Looking at BitcodeReader::ParseTypeTableBody(…),
> I don't see
2008 Apr 11
4
[LLVMdev] LLVMBuilder vs LLVMFoldingBuilder
Hi Dominic,
+//===-- llvm/Support/IRBuilder.h - Builder for LLVM Instrs -----*- C++ -*-===//
is this line the right length? It seems shorter than the similar lines below like
this one:
+//===----------------------------------------------------------------------===//
+ GetElementPtrInst *CreateStructGEP(Value *Ptr, unsigned Idx,
+ const char *Name =
2014 Jun 24
4
[LLVMdev] Making it possible to clear the LLVMContext
Hello,
the need here is to have a single LLVMContext used for multiple
compilations.
You make a good point about that by the way. If there are outstanding users
cleaning the context under their seats might still pose a risk to them, and
in that case deleting + newing a new LLVMContextImpl might actually not be
very different.
Marcello
2014-06-24 17:14 GMT+01:00 David Blaikie <dblaikie at
2014 Jun 24
5
[LLVMdev] Making it possible to clear the LLVMContext
Something like, keeping the compiler alive for a many compilation sessions,
using the same LLVMContext, but without the problem of accumulating data in
the LLVMContext that would slowly fill up the memory.
This as much I can enter into details that I can :/
Probably this is also a quite common use case scenario too.
Marcello
2014-06-24 18:52 GMT+01:00 Eric Christopher <echristo at