search for: llvmrefinetyp

Displaying 8 results from an estimated 8 matches for "llvmrefinetyp".

Did you mean: llvmrefinetype
2010 Jan 06
2
[LLVMdev] Correct way to resolve recursive type information?
...the second type resolution pass, create an LLVM structured type for every structured type in the program. The element types for any referenced types will be those types' opaque types - in a third pass, for every structured type in the program, resolve its opaque type to its structured type with LLVMRefineType Will I have a problem with TypeRefs becoming invalid underneath me as I repeatedly call LLVMRefineType in the third pass? If so how can I construct a web of mutually recursive types - is there some kind of atomic LLVMRefineType alternative that can refine the whole lot in one go? I'd be grat...
2008 Sep 08
3
[LLVMdev] Problems when refining type
...eally understand how it ought to work, so maybe I'm way off base. ------------- #include "Core.h" int main() { LLVMTypeRef a = LLVMPointerType(LLVMOpaqueType(), 0); LLVMTypeHandleRef ha = LLVMCreateTypeHandle(a); LLVMTypeRef atypes[1] = { LLVMResolveTypeHandle(ha) }; LLVMRefineType(LLVMResolveTypeHandle(ha), LLVMStructType(atypes, 1, 0)); LLVMTypeRef b = LLVMPointerType(LLVMOpaqueType(), 0); // assert here .... } ------------- The assertion text is: Assertion failed: isa<X>(Val) && "cast<Ty>() argument of incompatible type!", file...
2010 Jan 06
0
[LLVMdev] Fwd: Correct way to resolve recursive type information?
...ate an LLVM structured type for >> every structured type in the program. The element types for any referenced >> types will be those types' opaque types >> - in a third pass, for every structured type in the program, resolve its >> opaque type to its structured type with LLVMRefineType >> >> Will I have a problem with TypeRefs becoming invalid underneath me as I >> repeatedly call LLVMRefineType in the third pass? If so how can I construct >> a web of mutually recursive types - is there some kind of atomic >> LLVMRefineType alternative that can refi...
2008 May 18
1
[LLVMdev] Duplicate wrapper function in LLVM-C.
...be two wrapper functions for DerivedType::refineAbstractTypeTo() in llvm-c (Core.h, Core.cpp): void LLVMRefineAbstractType(LLVMTypeRef AbstractType, LLVMTypeRef ConcreteType){ DerivedType *Ty = unwrap<DerivedType>(AbstractType); Ty->refineAbstractTypeTo(unwrap(ConcreteType)); } void LLVMRefineType(LLVMTypeRef AbstractTy, LLVMTypeRef ConcreteTy) { unwrap<DerivedType>(AbstractTy)->refineAbstractTypeTo(unwrap(ConcreteTy)); } The attached patch removes the first one. Regards, -Mahadevan. -------------- next part -------------- A non-text attachment was scrubbed... Name: rm_dup_wrap...
2008 Sep 08
0
[LLVMdev] Problems when refining type
On Mon, Sep 8, 2008 at 2:45 PM, Scott Graham <scott.llvm at h4ck3r.net> wrote: > LLVMTypeRef a = LLVMPointerType(LLVMOpaqueType(), 0); > LLVMTypeHandleRef ha = LLVMCreateTypeHandle(a); > LLVMTypeRef atypes[1] = { LLVMResolveTypeHandle(ha) }; > LLVMRefineType(LLVMResolveTypeHandle(ha), LLVMStructType(atypes, 1, 0)); > > Can anyone explain what I'm doing wrong here? It looks like a bug; the type map is somehow holding onto a stale pointer to an opaque type. That said, refining a pointer type is a very unusual operation; I'd suggest stick...
2008 Mar 04
1
[LLVMdev] [PATCH] Prefer to use *.opt ocaml executables as they are more efficient.
I noticed that the ocaml compilation isn't using the .opt executables if they're available. We might gain a slight optimization in ocaml compile time by optionally using them with this patch. --- autoconf/configure.ac | 18 +++++ configure | 195 ++++++++++++++++++++++++++++++++++++++++++------ 2 files changed, 188 insertions(+), 25 deletions(-) -------------- next part
2008 Mar 04
0
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
...ruct LLVMOpaqueType *LLVMTypeRef; > > /** > - * When building recursive types using [refine_type], [lltype] > values may become > - * invalid; use [lltypehandle] to resolve this problem. See the > - * llvm::AbstractTypeHolder] class. > + * When building recursive types using [LLVMRefineType], > [LLVMTypeRef] values may become > + * invalid; use [LLVMTypeHandleRef] to resolve this problem. See the > + * [llvm::AbstractTypeHolder] class. > */ > typedef struct LLVMOpaqueTypeHandle *LLVMTypeHandleRef; > > @@ -70,12 +70,12 @@ typedef struct LLVMOpaqueBasicBlock &...
2008 Mar 04
1
[LLVMdev] [PATCH] Cleanup the c and ocaml binding documentation.
--- bindings/ocaml/llvm/llvm.ml | 2 +- bindings/ocaml/llvm/llvm.mli | 2 +- bindings/ocaml/llvm/llvm_ocaml.c | 2 +- include/llvm-c/Core.h | 32 +++++++++++++++++++------------- 4 files changed, 22 insertions(+), 16 deletions(-) -------------- next part -------------- A non-text attachment was scrubbed... Name: 316a84e85ed2363551149e65a227c8e7c8192624.diff Type: