Displaying 17 results from an estimated 17 matches for "classllvm_1_1function".
2016 Nov 18
2
DWARF gotchas moving from 3.7.1 to 3.9.0
Are you perhaps not calling
void Function::setSubprogram (DISubprogram * SP)
http://llvm.org/doxygen/classllvm_1_1Function.html#a05a19abc8ee11d5909275d980efa1670
?
-- adrian
> On Nov 18, 2016, at 8:46 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
> (+Adrian who might have some more context here)
>
> Generally I'd suggest looking at Clang's code to see how it's constructing the...
2013 Oct 14
0
[LLVMdev] Generating New Functions
...w to create new functions. For most LLVM objects, there is
either a new method or a static Create/create method that will create
the objects. The doxygen docs contain the list of methods for each
class and will usually have the information for which you're looking:
http://llvm.org/doxygen/classllvm_1_1Function.html
As for copying instructions into a new function, look at the functions
in lib/Transforms/Utils/CloneFunction.cpp (note that the pathname of the
file may have moved; this is its location in LLVM 3.2).
-- John T.
>
>
>
> --
> View this message in context: http://llvm.1065342....
2008 May 22
0
[LLVMdev] How to get a return type of a function with LLVM-C API
...on type, so you could look at
the function's type and get the info there.
Looking the the API docs [1], I find that there is a simple method on Function
called getReturnType(). You should thus be able to do:
Type* rt = F->getReturnType();
Good luck,
Matthijs
[1]: http://llvm.org/doxygen/classllvm_1_1Function.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080522/295ddde9/attachment.sig>
2013 Oct 14
2
[LLVMdev] Generating New Functions
How can I generate a new function at compile time and insert some instruction
onto it, through llvm pass.
eg.
1) %y = alloca i32, align 4
2) %z = alloca i32, align 4
3) %t = alloca i32, align 4
4) %2 = load i32* %y, align 4
5) %3 = load i32* %z, align 4
6) %add = add nsw i32 %2, %3
7) %4 = load i32* %t, align 4
8) %add1 = add nsw i32 %add, %4
9) store i32 %add1, i32* %x, align 4
2007 Sep 28
2
[LLVMdev] Accounting for code size
...ize
might be possible via some pointer arithmetic. Is there another way I
might be missing? Or would I have to subclass JITEmitter and add a
method to perform this calculation?
Finally, can I free the memory used by the in-memory IR after the code
is generated?
Sandro
[1] http://llvm.org/doxygen/classllvm_1_1Function.html#a27
[2] http://llvm.org/doxygen/classllvm_1_1JIT.html
[3] http://llvm.org/doxygen/classllvm_1_1MachineCodeEmitter.html
2008 May 22
3
[LLVMdev] How to get a return type of a function with LLVM-C API
Hi LLVM-ers,
I am trying to get a return type of a function(from bitcode file) with
LLVM-C API, but there seems no appropriate API to do that.
I've tried to do that with following code,
----
LLVMModuleRef M;
LLVMMemoryBufferRef MemBuf;
LLVMValueRef F; // Function
LLVMTypeRef RetTy;
char *ErrStr;
//
// -- Load shader module
//
2013 Nov 17
0
[LLVMdev] Doxygen not up to date?
At the bottom of <
http://llvm.org/docs/doxygen/html/classllvm_1_1Function.html>, it says
"Generated on Sat Nov 16 2013", but the hasPrefixData/getPrefixData
functions don't seem to be there (I just happened to notice those being
missing).
Even going directly to the header source code at <
http://llvm.org/docs/doxygen/html/Function_8h_source.html>...
2008 Mar 26
0
[LLVMdev] JIT and anonymous procs
On Wed, Mar 26, 2008 at 2:01 PM, Jonathan S. Shapiro <shap at eros-os.com> wrote:
> > All functions in the tutorial are referenced by their Function*. The
> > Function* uniquely identifies a function and is independent of the name.
>
> I had understood that.
>
> So now I have compiled and run my top level expression's anonymous
> function. How do I go
2008 Mar 26
3
[LLVMdev] JIT and anonymous procs
On Wed, 2008-03-26 at 10:40 -0700, Chris Lattner wrote:
> On Wed, 26 Mar 2008, Jonathan S. Shapiro wrote:
> > The Kaleidoscope tutorial has us "interpreting" top-level expressions by
> > generating a one-shot anonymous procedure and executing that. Once the
> > expressions have been executed, these procedures will never be called
> > again.
> >
> >
2007 Sep 28
0
[LLVMdev] Accounting for code size
...You could do that, it will tell you the size of all of the machine
code jit'd.
> Finally, can I free the memory used by the in-memory IR after the code
> is generated?
Yes, you can call F->deleteBody() after JIT'ing F.
-Chris
> Sandro
>
> [1] http://llvm.org/doxygen/classllvm_1_1Function.html#a27
> [2] http://llvm.org/doxygen/classllvm_1_1JIT.html
> [3] http://llvm.org/doxygen/classllvm_1_1MachineCodeEmitter.html
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists....
2016 Nov 18
2
DWARF gotchas moving from 3.7.1 to 3.9.0
I recently upgraded a codebase to use LLVM 3.9.0, up from 3.7.1.
All seems to work well, except that I am unable to generate debug
information.
However, if I run objdump -g on the generated object file, it reports that
the compile unit has no children:
Contents of the .debug_abbrev section:
Number TAG (0x0)
1 DW_TAG_compile_unit [no children]
DW_AT_producer DW_FORM_strp
2018 Sep 04
2
Replacing a function from one module into another one
...o map the arguments (llvm::Attribute) of both functions (the first
argument of foo2 is equivalent to the first argument of foo3, and so on),
however, apparently there's no transformation from a llvm::Attribute to a
llvm::Value. I'm using the function getAttribute
<http://llvm.org/doxygen/classllvm_1_1Function.html#ab2a5fc8baaee7e74dbe47d848508745a>
(unsigned <http://llvm.org/doxygen/classunsigned.html> i, StringRef
<http://llvm.org/doxygen/classllvm_1_1StringRef.html> Kind
<http://llvm.org/doxygen/ARMAsmParser_8cpp.html#a5ec5335889cd241b0ccfd4e4e58cf52e>
) const
<http://llvm.org...
2014 Dec 17
5
[LLVMdev] How to figure out what #includes are needed?
This is partly an llvm question, and maybe partly C++.
I am trying to make calls on code in the llvm infrastructure.(3.4.2) I appear
to be missing some include files, but don't know how to track them down. I get
compile errors on existing llvm header files, like the following two examples:
--------------------------------------------------------------------------------
In file included
2013 Mar 02
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
...00188 unsigned NumPredsFromRegion = 0;00189 unsigned
NumPredsOutsideRegion = 0;00190 00191 if (Header !=
&Header->getParent
<http://llvm.org/docs/doxygen/html/classllvm_1_1BasicBlock.html#aca229503e4f5c83a187a6a921c625fa8>()->getEntryBlock
<http://llvm.org/docs/doxygen/html/classllvm_1_1Function.html#a30f2c362631e3728d2f47a8203071ade>())
{00192 PHINode
<http://llvm.org/docs/doxygen/html/classllvm_1_1PHINode.html> *PN =
dyn_cast <http://llvm.org/docs/doxygen/html/namespacellvm.html#ad6dbabbbb9495cf1501d64a5c71729ed><PHINode
<http://llvm.org/docs/doxygen/html/classll...
2018 Sep 06
2
Replacing a function from one module into another one
...) of both functions (the first
>> argument of foo2 is equivalent to the first argument of foo3, and so on),
>> however, apparently there's no transformation from a llvm::Attribute to a
>> llvm::Value. I'm using the function getAttribute
>> <http://llvm.org/doxygen/classllvm_1_1Function.html#ab2a5fc8baaee7e74dbe47d848508745a>
>> (unsigned <http://llvm.org/doxygen/classunsigned.html> i, StringRef
>> <http://llvm.org/doxygen/classllvm_1_1StringRef.html> Kind
>> <http://llvm.org/doxygen/ARMAsmParser_8cpp.html#a5ec5335889cd241b0ccfd4e4e58cf52e>...
2018 Sep 06
2
Replacing a function from one module into another one
...gt;>>> argument of foo2 is equivalent to the first argument of foo3, and so on),
>>>> however, apparently there's no transformation from a llvm::Attribute to a
>>>> llvm::Value. I'm using the function getAttribute
>>>> <http://llvm.org/doxygen/classllvm_1_1Function.html#ab2a5fc8baaee7e74dbe47d848508745a>
>>>> (unsigned <http://llvm.org/doxygen/classunsigned.html> i, StringRef
>>>> <http://llvm.org/doxygen/classllvm_1_1StringRef.html> Kind
>>>> <http://llvm.org/doxygen/ARMAsmParser_8cpp.html#a5ec5335889cd2...
2018 Sep 03
2
Replacing a function from one module into another one
Thank you Ahmad,
I figured out that, although the type of both p(oInst) and p(nInst) were
the same, I had to:
for (unsigned int i = 0; i < callOInst->getNumArgOperands(); i++) {
callOInst->getArgOperand(i)->mutateType(callNInst->getArgOperand(i)->getType());
}
that solves the issue at the calling instruction in the main function, but
now I see that *linkModules* does not work