Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] GC interface suggestions"
2011 Oct 08
0
[LLVMdev] Initializing GC roots
On Oct 6, 2011, at 17:19, Yiannis Tsiouris wrote:
> Hello all,
> 
> I set: InitRoots = true; in my gc plugin as i want the roots to be
> initialized to the "null" value.
> Is there a way to define which value should be the initial one? For
> example, i would like to initialize my roots to -5 (tagged, null value
> for the GC in my runtime system) instead of 0.
> 
2008 Nov 08
0
[LLVMdev] non-pointer gcroot
On Nov 7, 2008, at 15:29, Scott Graham wrote:
> I'm getting an assert in LowerIntrinsics::InsertRootInitializers  
> because I'm gcroot'ing an alloca to a non-pointer.
>
> I was hoping to modify InsertRootInitializers to memset the  
> structure in the case that it's not a pointer, but I'm not sure how  
> to. Can anyone suggest what should go at "todo;
2008 Nov 07
2
[LLVMdev] non-pointer gcroot
Hi
I'm getting an assert in LowerIntrinsics::InsertRootInitializers
because I'm gcroot'ing an alloca to a non-pointer.
I was hoping to modify InsertRootInitializers to memset the structure
in the case that it's not a pointer, but I'm not sure how to. Can
anyone suggest what should go at "todo; something here"?
  ...
  for (AllocaInst **I = Roots, **E = Roots +
2011 Oct 06
2
[LLVMdev] Initializing GC roots
Hello all,
I set: InitRoots = true; in my gc plugin as i want the roots to be
initialized to the "null" value.
Is there a way to define which value should be the initial one? For
example, i would like to initialize my roots to -5 (tagged, null value
for the GC in my runtime system) instead of 0.
Ofcourse, i could do it in the frontend (storing -5 to all GC roots),
but i was wondering
2008 Apr 04
2
[LLVMdev] InstCombine Question
I am confused by this bit of code in instcombine:
09789   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
09790     const Value *GEPI0 = GEPI->getOperand(0);
09791     // TODO: Consider a target hook for valid address spaces for this 
xform.
09792     if (isa<ConstantPointerNull>(GEPI0) &&
09793        
2009 Jan 09
2
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
Hi all,
Please review this patch. It's fixing PR3232 comment #8. Function bar  
from 2008-03-24-BitFiled-And-Alloca.c compiles to:
         %struct.Key = type { { i32, i32 } }
...
define i32 @bar(i64 %key_token2) nounwind {
entry:
         %key_token2_addr = alloca i64           ; <i64*> [#uses=2]
         %retval = alloca i32            ; <i32*> [#uses=2]
         %iospec =
2008 Apr 04
0
[LLVMdev] InstCombine Question
On Fri, 4 Apr 2008, David Greene wrote:
> I am confused by this bit of code in instcombine:
>
> 09789   if (GetElementPtrInst *GEPI = dyn_cast<GetElementPtrInst>(Op)) {
> 09790     const Value *GEPI0 = GEPI->getOperand(0);
> 09791     // TODO: Consider a target hook for valid address spaces for this
> xform.
> 09792     if (isa<ConstantPointerNull>(GEPI0)
2009 Jan 09
0
[LLVMdev] RFC: Store alignment should be LValue alignment, not source alignment
Hi Evan,
>    LValue LV = EmitLV(lhs);
>    bool isVolatile = TREE_THIS_VOLATILE(lhs);
>    unsigned Alignment = expr_align(exp) / 8
> 
> It's using the alignment of the expression, rather than the memory  
> object of LValue.
can't you just use expr_align(lhs) instead?
> The patch saves the alignment of the memory object in LValue returned  
> by EmitLV().
2014 Dec 09
2
[LLVMdev] Question on equivalence of pointer types
> On Dec 8, 2014, at 5:12 PM, Sanjoy Das <sanjoy at playingwithpointers.com> wrote:
> 
> Partially answering my own question, in general these are not
> equivalent because LLVM allows for pointers in different address
> spaces to have different sizes.  However, are they equivalent if
> pointers in addrspace(1) have the same size as pointers in
> addrspace(0)?
> 
>
2012 Feb 22
0
[LLVMdev] Size of structs & arrays
On Wed, Feb 22, 2012 at 1:56 PM, Fraser Cormack <frasercrmck at gmail.com> wrote:
>
> I'm trying to work out the size of a struct so that I can pass this to the
> 'llvm.memcpy' intrinsic. It's easy to find out how I'm supposed to do this,
> as I keep seeing the following:
>
> %Size = getelementptr %T* null, int 1
> %SizeI = cast %T* %Size to uint
>
2013 Nov 10
1
[LLVMdev] about creating the first value of the storeinst
Dear All
I'm trying to create storeInst using
StoreInst *SI = new StoreInst(val, AI, BB);
AI is an alloca instruction previously created, BB is the basicBlock I want to put instructionsi in. Val is the value to store.
I've created val from a genericValue like this:
Value* val = ConstantInt::get(getGlobalContext(), Result.IntVal);
Result is the genericValue
However I keep getting
2015 Jan 19
2
[LLVMdev] [INCOMPLETE] [GC] Support wrapping vararg functions in statepoint
I actually need this feature quite badly in my untyped language
compiler: since I support first-class functions, I've made the types of
all functions a standard vararg (so I can box them).
The implementation crashes when I try to read out the value of
gc.result. Hints as to what might be wrong?
Signed-off-by: Ramkumar Ramachandra <artagnon at gmail.com>
---
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 +
2012 Jun 17
3
[LLVMdev] BlockAddress instruction is copied instead of cloned during module link?
I have a module having the blockaddress instruction.
When I link it into another module and delete the original, blockaddress 
disappears and is replaced by inttoptr (i32 1 to i8*).
Please compile and run the attached program to see the demo of this 
problem.
Right after linking modules, blockaddress still exists:
@switch.bbs = internal global [3 x i8*] [i8* blockaddress(@my_func, 
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 Jul 21
0
[LLVMdev] Casting between address spaces and address space semantics
Hi Matthijs,
Thanks for giving some code so we can discuss this in more concrete  
detail.  In terms of the information we need, I think you have it  
right.  We just need a description of how the different address spaces  
relate and I don't see much of an issue with how you implemented to  
InstructionCombining.
As you also mentioned, I don't like that we pass a reference to  
2010 May 28
0
[LLVMdev] Retrieving Underlying Type from AllocaInst
You should be able to use the second alternative that Nick proposed:
cast<PointerType*>(pointer_value->getType())->getElementType()
Reid
On Fri, May 28, 2010 at 9:37 AM, Curtis Faith <curtis at curtisfaith.com> wrote:
> Thanks Nick,
> Unfortunately, that is indeed what I asked for but not what I really am
> looking for.
> My naive approach is to store symbol table
2019 Oct 21
2
How to create vector pointer type?
Hello,
Say the original type is Integer i16*,  I want to create a v16i16* type to replace it.
static Type *getVectorPtr(Type *Ty) {
    PointerType *PointerTy = dyn_cast<PointerType>(Ty);
    assert(PointerTy && "PointerType expected");
    unsigned addSpace = PointerTy->getAddressSpace();
2008 Jul 21
2
[LLVMdev] Casting between address spaces and address space semantics
Hi all,
> If I read the standard correctly, the properties of these address spaces can
> be fully captured by defining the relationship between every pair of address
> spaces (disjoint, identical, subset/superset).
> 
> I think it would make sense to make these relationships backend/platform
> specific, but for clang and the optimization passes to properly work with
> address
2010 Jul 21
1
[LLVMdev] How to recognize pointer variable & ordinary variable
Your last statement is correct. But still my stand does not change. I want
to differentiate ordinary local variable & pointer variables.
Let's have a program,
int a,b,c,*ptr;
I want to extract only the local variables. That's what my question was. I
think it is clear now. cast<PointerType>(A->getType()
>
> )->getElementType() is not working. I am also getting error