Displaying 20 results from an estimated 130 matches for "returninsts".
Did you mean:
returninst
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
Hi all,
I am trying to write a pass where i am creating a clone of a
function (the only difference being, the new function returns void ,
instead of any value).
I am creating a new Function Type with a void return type (rest being
the same as original function), and using this i am creating a new
function body. Then, i clone the body of the old function into new
function, but when ever i
2008 Apr 16
0
[LLVMdev] Problems in removing a cloned instruction.
Hi,
I'm gonna try to give some feedback, but I have only been working with LLVM
for a few days, so don't take what I'm saying without verifying :-)
> BasicBlock *ProgSlicer::CloneBasicBlock(const BasicBlock *BB,
> DenseMap<const Value*, Value*> &ValueMap,
> const char *NameSuffix, Function *F) {
>
> BasicBlock
2008 Sep 12
3
[LLVMdev] CPP API User-level Question: Returning multiple values
Greetings,
I'm working on getting our compiler's interface to LLVM to mimic the
way the LLVM-GCC inserts instructions to generate AMD64 ABI compliant
code. I'm trying to create
ret i64 %mrv, double %double_mrv37
which is basically what LLVM-GCC puts out. However if I use lcc
-march=cpp to get the API code I need it has the following line:
2008 Sep 12
2
[LLVMdev] CPP API User-level Question: Returning multiple values
Dan,
Thanks for the info. Unfortunately for the time being we are using
(for the most part) the 2.3 release (with a couple of patches that Dave
Greene has applied). The first-class aggregates is one of the things we
don't yet have in the LLVM we're working with. I'll look again to see if
there's a ReturnInst::Create( ) which I can pass an array of llvm::Value
*'s to,
2008 Sep 12
0
[LLVMdev] CPP API User-level Question: Returning multiple values
Hi Tony,
I just checked LLVM 2.3 and ReturnInst has these:
static ReturnInst* Create(Value * const* retVals, unsigned N,
Instruction *InsertBefore)
static ReturnInst* Create(Value * const* retVals, unsigned N,
BasicBlock *InsertAtEnd)
which are what you're looking for.
In LLVM trunk, MRV-syntax LLVM assembly files and bitcode
2013 Oct 10
2
[LLVMdev] Are there implicit rules or conventions for an llvm frontend to generate llvm IR?
Hi, this question might be a bit silly: apart from the language
reference(http://llvm.org/docs/LangRef.html#switch-instruction) page, are
there additional rules for a regular llvm frontend to generate llvm IRs?
There are a few cases that I got from clang/llvm-gcc/dragonegg when
compiling *C* source code into llvm IR:
1. It seems that there is ONLY ONE ReturnInst(and NO InvokeInst) for such
llvm
2013 Oct 10
0
[LLVMdev] Are there implicit rules or conventions for an llvm frontend to generate llvm IR?
...are a few cases that I got from clang/llvm-gcc/dragonegg when
> compiling *C* source code into llvm IR:
>
> 1. It seems that there is ONLY ONE ReturnInst(and NO InvokeInst) for such
> llvm IR; is it legal to add other *ReturnInst*s when transforming?
An LLVM function can have multiple ReturnInsts as long as each one
terminates a basic block. There is a transform (UnifyExitNodes, IIRC)
that will take a function with multiple ReturnInsts and create one with
a single ReturnInst. Having a single ReturnInst (exit node) simplifies
other analyses.
>
> 2. Is it possible for a frontend...
2013 Oct 10
1
[LLVMdev] Are there implicit rules or conventions for an llvm frontend to generate llvm IR?
...-gcc/dragonegg when
>> compiling *C* source code into llvm IR:
>>
>>
>> 1. It seems that there is ONLY ONE ReturnInst(and NO InvokeInst) for such
>> llvm IR; is it legal to add other *ReturnInst*s when transforming?
>>
>
> An LLVM function can have multiple ReturnInsts as long as each one
> terminates a basic block. There is a transform (UnifyExitNodes, IIRC) that
> will take a function with multiple ReturnInsts and create one with a single
> ReturnInst. Having a single ReturnInst (exit node) simplifies other
> analyses.
>
> Thanks so much, Jo...
2008 Sep 12
0
[LLVMdev] CPP API User-level Question: Returning multiple values
On Sep 12, 2008, at 9:40 AM, Tony Scudiero wrote:
> Greetings,
Hi Tony,
This is an area that's undergone some changes recently. The LLVM 2.3
multiple-return-value (MRV) syntax has been replaced by the
first-class aggregates syntax in SVN trunk.
>
> I'm working on getting our compiler's interface to LLVM to mimic
> the
> way the LLVM-GCC inserts instructions to
2015 Oct 10
2
[RFC] Clean up the way we store optional Function data
...Function about this.
What's wrong with this?
=======================
1. Functions without personalities pay the space-cost for them.
2. We handle personalities differently from prefix and prologue data.
3. Suppose N functions share the same prefix or prologue data. We create N
different ReturnInsts to point to the same thing. I think that's wasteful.
4. These hidden ReturnInsts effectively make a Function an indirect user of
its optional data. This relationship should be made explicit to avoid bugs.
Proposal: Introduce a new Constant, llvm::IndirectUser
=============================...
2011 May 18
1
[LLVMdev] function terminators
On 5/17/2011 11:37 PM, Duncan Sands wrote:
> Hi George,
>
>> Does llvm provide a way to determine instructions that cause control to
>> leave functions? For example, return statements and exit statements cause
>> control exit out of function.
> there is no "exit" statement.
>
> I am looking for something similar to basic block
>> terminators.
2013 Jan 11
0
[LLVMdev] modifiy the address of GlobalVariable emitted by JIT
Hi everyone,
I am building a binary translator, and try to do block chaining.
LLVM version : 3.1
my machine : x86-32 bit, Linux
Before each *LLVM IR returnInst constantValue*, I insert a call instruction
& a returnInst which looks like
%x = call @G ;
ret %x;
then remove the *LLVM IR returnInst constantValue*
The initializer of @G is a function which has prototype int f(struct MyType*
2015 Mar 15
3
[LLVMdev] Explicit constructors with more than one argument
Hi,
Some LLVM classes (e.g. ReturnInst) have explicit constructors with at
least two parameters (with no default arguments). Why is that? E.g. what
are they trying to prevent?
-- Gaby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150314/4d4cc6cc/attachment.html>
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
2018 Sep 04
2
Replacing a function from one module into another one
Hi Philip,
Thank you very much for your answer, the vector declaration example worked.
I'm pretty sure the ValueToValueMapTy is the last thing I need because I
even saw there is another function that could help me llvm*:*:RemapFunction
<http://llvm.org/doxygen/namespacellvm.html#addf0183e92893bdbcde00fc9091dda93>;
but my problem is that I don't know how to populate the
2018 Sep 02
2
Replacing a function from one module into another one
Hello and thanks for the answer,
I'm still facing issues, I'll do my best to explain my situation, as I
explained, I have two modules, each one with its own main and functions, I
would like to replace in the *oldModule* a function call that is calling
*foo2* (defined in *oldModule*) to instead call *foo3*, which is defined in
the *refModule. *So in summary, I have:
1. The original
2011 Sep 16
2
[LLVMdev] How to duplicate a function?
Hi all,
Sorry for the inconvenient about the previous post. The files were not
attached. So I put them here again.
I am a newbie in LLVM and I am trying to replace the function like:
old function || new function
==============================
=========
int haha(int a) { int haha(int a, char* ID) {
===>
}
2018 Sep 06
2
Replacing a function from one module into another one
Hi Philip,
Thanks for the reference, I was able to follow it and copy the code that I
saw necessary, but I still have some issues (references are still not
updated). I created the function:
void populateVMap(llvm::ValueToValueMapTy &VMap, llvm::Function *fOld,
llvm::Function *fNew) {
llvm::Function::arg_iterator DestI = fOld->arg_begin();
for (llvm::Function::const_arg_iterator J =
2011 May 18
2
[LLVMdev] function terminators
Hi All,
Does llvm provide a way to determine instructions that cause control to
leave functions? For example, return statements and exit statements cause
control exit out of function. I am looking for something similar to basic
block
terminators. Thanks.
George
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2011 May 18
0
[LLVMdev] function terminators
Hi George,
> Does llvm provide a way to determine instructions that cause control to
> leave functions? For example, return statements and exit statements cause
> control exit out of function.
there is no "exit" statement.
I am looking for something similar to basic block
> terminators. Thanks.
Control can leave a function either (1) due to a return instruction