Displaying 18 results from an estimated 18 matches for "llvmbasicblockref".
2010 May 27
2
[LLVMdev] Manipulating basic blocks with the C bindings
...I'd like to add the following functions. Hopefully my intent is clear.
I'm very open to name suggestions, as these are a mouthful:
void LLVMAppendExistingBasicBlockInContext(LLVMContextRef C,
LLVMValueRef Fn, LLVMBasicBlock BB);
void LLVMInsertExistingBasicBlockInContext(LLVMContextRef C,
LLVMBasicBlockRef InsertBeforeBB, LLVMBasicBlock BB);
void LLVMAppendExistingBasicBlock(LLVMValueRef Fn, LLVMBasicBlock BB);
void LLVMInsertExistingBasicBlock(LLVMBasicBlockRef InsertBeforeBB,
LLVMBasicBlock BB);
Does this sound reasonable? Am I missing something?
- Evan
2010 May 27
0
[LLVMdev] Manipulating basic blocks with the C bindings
...owing functions. Hopefully my intent is clear.
> I'm very open to name suggestions, as these are a mouthful:
>
> void LLVMAppendExistingBasicBlockInContext(LLVMContextRef C,
> LLVMValueRef Fn, LLVMBasicBlock BB);
> void LLVMInsertExistingBasicBlockInContext(LLVMContextRef C,
> LLVMBasicBlockRef InsertBeforeBB, LLVMBasicBlock BB);
> void LLVMAppendExistingBasicBlock(LLVMValueRef Fn, LLVMBasicBlock BB);
> void LLVMInsertExistingBasicBlock(LLVMBasicBlockRef InsertBeforeBB,
> LLVMBasicBlock BB);
>
> Does this sound reasonable? Am I missing something?
>
> - Evan
> _____...
2008 Apr 26
0
[LLVMdev] ParamAttr Patch - Alignment fix
...t place braces on the same line
> Index: include/llvm-c/Core.h
> ===================================================================
> --- include/llvm-c/Core.h (revision 50213)
> +++ include/llvm-c/Core.h (working copy)
> @@ -69,6 +69,7 @@
> typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef;
> typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
>
> +
> /* Used to provide a module to JIT or interpreter.
> * See the llvm::ModuleProvider class.
> */
? :)
> @@ -441,6 +459,9 @@
> /* Operations on call sites */
> void LLVMSetInstructionCallConv(LLVMValueR...
2008 Apr 26
2
[LLVMdev] ParamAttr Patch - Alignment fix
...t;
> > Index: include/llvm-c/Core.h
> > ===================================================================
> > --- include/llvm-c/Core.h (revision 50213)
> > +++ include/llvm-c/Core.h (working copy)
> > @@ -69,6 +69,8 @@
> > typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef;
> > typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
> >
> > +typedef struct LLVMOpaqueParamAttrs *LLVMParamAttrs;
>
> Please delete this, as it is unused.
>
> > +void LLVMInstrAddParamAttr(LLVMValueRef, unsigned index,
> > LLVMParamAttr);
> > +void L...
2012 Apr 25
2
[LLVMdev] Crash in JIT
...LLVMValueRef mParam = LLVMGetParam(func, 0);
LLVMSetValueName(mParam, "m");
LLVMValueRef xParam = LLVMGetParam(func, 1);
LLVMSetValueName(xParam, "x");
LLVMValueRef bParam = LLVMGetParam(func, 2);
LLVMSetValueName(bParam, "b");
LLVMBasicBlockRef entryBB;
entryBB = LLVMAppendBasicBlockInContext(llvm, func, "entry");
LLVMBuilderRef builder;
builder = LLVMCreateBuilderInContext(llvm);
LLVMPositionBuilderAtEnd(builder, entryBB);
LLVMValueRef mx;
mx = LLVMBuildMul(builder, mParam, xParam, "mx&qu...
2008 Apr 26
0
[LLVMdev] ParamAttr Patch - Alignment fix
...and removeAttr(ParamAttr Attr).
> Index: include/llvm-c/Core.h
> ===================================================================
> --- include/llvm-c/Core.h (revision 50213)
> +++ include/llvm-c/Core.h (working copy)
> @@ -69,6 +69,8 @@
> typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef;
> typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
>
> +typedef struct LLVMOpaqueParamAttrs *LLVMParamAttrs;
Please delete this, as it is unused.
> +void LLVMInstrAddParamAttr(LLVMValueRef, unsigned index,
> LLVMParamAttr);
> +void LLVMInstrSetAlignment(LLVMValueRef, unsign...
2013 Sep 30
1
[LLVMdev] RFC: llvm-shlib-test (Was: [llvm] r191029 - llvm-c: Make LLVMGetFirstTarget a proper prototype)
Attached is what I got thus far.
What I'm struggling with is proper integration in build system. What
is in there is just wild guesses from my side, both on autoconf and
cmake variants. It would be great if someone with proper knowledge of
the buildsystems could have a look. Also I'm not sure how to properly
handle compilation on msvc - clearly "-std=c11 -Wstrict-prototypes" is
2008 Apr 24
2
[LLVMdev] ParamAttr Patch - Alignment fix
Hi..
Updated so you now set alignment through LLVMInstrSetAlignment.
Anders Johnsen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ParamAttr.patch
Type: text/x-diff
Size: 7420 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080424/cb72b4bb/attachment.patch>
2008 Dec 19
2
[LLVMdev] llvm-c API and well formed block
How can I find out, in llvm-c API, whether a basic block is well
formed? In C++ I could call getTerminator and test for NULL.
--
Seo Sanghyeon
2008 Dec 19
0
[LLVMdev] llvm-c API and well formed block
On 2008-12-19, at 09:18, Seo Sanghyeon wrote:
> How can I find out, in llvm-c API, whether a basic block is well
> formed? In C++ I could call getTerminator and test for NULL.
There's not currently a binding for this. In general, there's
incomplete support for inspection and analysis through the C bindings.
BasicBlock::getTerminator() is just a convenient way to spell for
2012 Apr 25
0
[LLVMdev] Crash in JIT
...Type);
LLVMValueRef mParam = LLVMGetParam(func, 0);
LLVMSetValueName(mParam, "m");
LLVMValueRef xParam = LLVMGetParam(func, 1);
LLVMSetValueName(xParam, "x");
LLVMValueRef bParam = LLVMGetParam(func, 2);
LLVMSetValueName(bParam, "b");
LLVMBasicBlockRef entryBB;
entryBB = LLVMAppendBasicBlockInContext(llvm, func, "entry");
LLVMBuilderRef builder;
builder = LLVMCreateBuilderInContext(llvm);
LLVMPositionBuilderAtEnd(builder, entryBB);
LLVMValueRef mx;
mx = LLVMBuildMul(builder, mParam, xParam, "mx");...
2010 Aug 12
3
[LLVMdev] LLVM-C: Calling functions contained in other libraries
...call i8* @NSFullUserName() ; <i8*> [#uses=1]
ret i8* %myCall
}
Where am I going wrong here?
To add some code to my previous question:
LLVMTypeRef i8Ptr(void) {
return LLVMPointerType(LLVMInt8Type(), 0);
}
LLVMValueRef d(LLVMModuleRef module) {
LLVMValueRef result;
LLVMBasicBlockRef block;
LLVMBuilderRef builder = LLVMCreateBuilder();
LLVMValueRef fullUsername = LLVMAddFunction(module, "NSFullUserName", LLVMFunctionType(LLVMPointerType(LLVMInt8Type(), 0), NULL, 0, 0));
LLVMSetLinkage(fullUsername, LLVMExternalLinkage);
result = LLVMAddFuncti...
2012 Sep 27
0
[LLVMdev] Possible bug or misunderstanding of feature LLVMConstIntOfString
...;
LLVMTypeRef vpMainFuncTypes[] = { LLVMInt32Type(), ppInt8 };
LLVMTypeRef rMainFuncType = LLVMFunctionType(LLVMInt32Type(),
vpMainFuncTypes, 2, 0);
LLVMValueRef vFnMain = LLVMAddFunction(modCEx, "main", rMainFuncType);
LLVMSetFunctionCallConv(vFnMain, LLVMCCallConv);
LLVMBasicBlockRef bEntry = LLVMAppendBasicBlock(vFnMain, "entry");
LLVMBuilderRef bldr = LLVMCreateBuilder();
LLVMPositionBuilderAtEnd(bldr, bEntry);
// "C" printf function;
LLVMTypeRef vpFnPrintfArgsType[] = { LLVMPointerType(LLVMInt8Type(), 0)
};
LLVMTypeRef vFnPrintfType...
2008 Apr 26
2
[LLVMdev] ParamAttr Patch - Alignment fix
...t;
> > Index: include/llvm-c/Core.h
> > ===================================================================
> > --- include/llvm-c/Core.h (revision 50213)
> > +++ include/llvm-c/Core.h (working copy)
> > @@ -69,6 +69,7 @@
> > typedef struct LLVMOpaqueBasicBlock *LLVMBasicBlockRef;
> > typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
> >
> > +
> >
> > /* Used to provide a module to JIT or interpreter.
> > * See the llvm::ModuleProvider class.
> > */
>
> ? :)
>
> > @@ -441,6 +459,9 @@
> > /* Operations on...
2017 Jan 25
2
mcjit C interface problems
...rgv[]) {
LLVMModuleRef mod = LLVMModuleCreateWithName("my_module");
LLVMTypeRef param_types[] = {LLVMInt32Type(), LLVMInt32Type()};
LLVMTypeRef ret_type = LLVMFunctionType(LLVMInt32Type(), param_types, 2,
0);
LLVMValueRef sum = LLVMAddFunction(mod, "sum", ret_type);
LLVMBasicBlockRef entry = LLVMAppendBasicBlock(sum, "entry");
LLVMBuilderRef builder = LLVMCreateBuilder();
LLVMPositionBuilderAtEnd(builder, entry);
LLVMValueRef tmp = LLVMBuildAdd(builder, LLVMGetParam(sum, 0),
LLVMGetParam(sum, 1), "tmp");
LLVMBuildRet(builder, tmp);
char* error =...
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.
...> [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
> *LLVMBasicBlockRef;
> typedef struct LLVMOpaqueBuilder *LLVMBuilderRef;
>
> /* Used to provide a module to JIT or interpreter.
> - * See the llvm::ModuleProvider class.
> + * See the [llvm::ModuleProvider] class.
> */
> typedef struct LLVMOpaqueModuleProvider *LLVMModuleProviderRef;
>
> /*...
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: