Displaying 20 results from an estimated 3000 matches similar to: "[LLVMdev] Cloning BasicBlock"
2005 Nov 22
0
[LLVMdev] Cloning BasicBlock
On Tue, 2005-11-22 at 09:12 -0800, Sandra Johnson wrote:
> Hi ,
> I am trying to clone a BasicBlock. I want both to co-exist and I have
> introduced
> a conditional branch to the original or the cloned BB.
I have a pass I haven't commited that does just this. Well, it does so
to implement Arnold and Ryder style profiling. I can send you a copy of
that if you want (I hope to
2005 Nov 23
1
[LLVMdev] Cloning BasicBlock
Hello Andrew ,
Yes , I have missed the phi node since my paths merge together. I'll try this out.
I am implementing a timer based profiling scheme and hope your code will be useful
for me. Please send me a copy of your code.
Thanks
Sandra
Andrew Lenharth <andrewl at lenharth.org> wrote: On Tue, 2005-11-22 at 09:12 -0800, Sandra Johnson wrote:
> Hi ,
> I am trying
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
2013 Jul 25
2
[LLVMdev] Error for AllocaInst and Instruction
Hi,
For the following code
const Type * Int32Type =
IntegerType::getInt32Ty(getGlobalContext());
AllocaInst* newInst = new AllocaInst(Int32Type, 0, "flag", Bb);
Bb->getInstList().push_back(newInst);
It gives me the error
" error: no matching constructor for initialization of 'llvm::AllocaInst'
AllocaInst* newInst = new
2005 May 11
3
[LLVMdev] Question About inserting Instruction?
Hi,
I am working on a project with LLVM. What I need to do is to generate/insert some dummy/dead basic blocls which never have chance to be executed and put some instructions in those dummy/dead basic blocks.
So far, the dummy/dead BB insertion is done. I am trying insert instructions in those dummy/dead BB. Actually, I can insert the legal instructions to dummy/dead BB, however, I really want
2005 Jan 17
0
[LLVMdev] CloneBasicBlock doesn't change parent of cloned instructions
On Mon, 17 Jan 2005, Morten Ofstad wrote:
> It seems the CloneBasicBlock function defined in Transforms/Utils/Cloning.h
> doesn't change the parent BasicBlock of the contained instructions when it
> has cloned them -- Is this a bug or a feature?
I'm not sure I understand. This code:
Instruction *NewInst = II->clone();
..
2013 Jul 30
2
[LLVMdev] Instruction insertion By Module Pass
Hi,
I need to insert new instruction into every basic block like x=1
or while loop
I tried this code, but it doesn't work
Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
AllocaInst* newInst = new AllocaInst(Int32Type,"flag", Bb);
Bb->getInstList().push_back(newInst);
the error:
void llvm::SymbolTableListTraits<llvm::Instruction,
2013 Jul 31
1
[LLVMdev] Instruction insertion By Module Pass
Thank you for your help
I tried
Instruction* p=&( Bb->front());
Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
AllocaInst* newInst = new AllocaInst(Int32Type,"flag", p);
that works well
but I need to store the value of the variable too.
What's the method that could be used to store specific value??
On 30 July 2013 16:01, John Criswell
2013 Jul 30
0
[LLVMdev] Instruction insertion By Module Pass
On 7/30/13 7:44 AM, Rasha Omar wrote:
> Hi,
> I need to insert new instruction into every basic block like x=1
> or while loop
> I tried this code, but it doesn't work
>
> Type * Int32Type = IntegerType::getInt32Ty(getGlobalContext());
> AllocaInst* newInst = new AllocaInst(Int32Type,"flag", Bb);
> Bb->getInstList().push_back(newInst);
The problem is
2013 Mar 06
1
[LLVMdev] LLVM load instruction query
Duncan Sands <baldrick <at> free.fr> writes:
>
> Hi Anshul,
>
> > I am creating a pass that will pass loaded value by load instruction to an
> > external function.
> > I don't know how to do it.Please Help.
>
> your question is too vague for anyone to be able to help you. Add details,
> for example provide the code for your pass.
>
>
2009 Jan 22
0
[LLVMdev] replacing instructions
Ralf Karrenberg wrote:
> Hello everyone,
>
> is there any way to replace an instruction inside LLVM that is more
> elegant than creating a new one, replacing uses and deleting the old one
> if I only want to modify the type? It is generally not a big deal, but
> the issue gets really messy if I am in the middle of iterating over uses
> and start deleting some of them...
>
2011 Jan 24
3
[LLVMdev] How to change the type of an Instruction?
Hi,
Nick, thanks for the reply.
I still have a problem: I only need to "clone" an Instruction, changing its
type. That is, I would like to keep all characteristics of the old
Instruction and create a new one only with a different type. I am trying
create a new Instruction thus:
%3 = add nsw i32 %1, %2 ; <i16> [#uses=2] //Old Instruction
Value* Op0 = I->getOperand(0);
Value*
2005 Jan 17
2
[LLVMdev] CloneBasicBlock doesn't change parent of cloned instructions
It seems the CloneBasicBlock function defined in
Transforms/Utils/Cloning.h doesn't change the parent BasicBlock of the
contained instructions when it has cloned them -- Is this a bug or a
feature?
m.
2011 Jan 24
0
[LLVMdev] How to change the type of an Instruction?
On 01/24/2011 04:41 AM, Douglas do Couto Teixeira wrote:
> Hi,
>
> Nick, thanks for the reply.
> I still have a problem: I only need to "clone" an Instruction, changing
> its type. That is, I would like to keep all characteristics of the old
> Instruction and create a new one only with a different type.
Sure, but what about its operands? An "add" instruction
2011 May 09
2
[LLVMdev] <badref> showed up when duplicating a list of dependent instructions
I collected a sequence of LLVM instructions, want to make a copy of each
and insert them into a PREVIOUS location inside the same function (all
globals and locals are properly declared before the PREVIOUS location).
Here is the list of instructions I want to duplicate and insert:
0 %90 = load i32* @strstart, align 4
1 %91 = add i32 %90, 2
2 %88 = load i32* @ins_h, align 4
3 %92 =
2013 Mar 05
5
[LLVMdev] LLVM load instruction query
HI,
I am creating a pass that will pass loaded value by load instruction to an
external function.
I don't know how to do it.Please Help.
2013 Mar 05
0
[LLVMdev] LLVM load instruction query
Try :
INITIALIZE a1 if you didnt.
if (cpProf EXISTS){
CallInst* newInst = CallInst::Create(cpProf,a1,"");
if (BB->getTerminator() && CI)
BB->getInstList().insert((Instruction*)CI, newInst);
On Tue, Mar 5, 2013 at 1:04 PM, Anshul Garg <gargaa24 at gmail.com> wrote:
> CallInst* newInst = CallInst::Create(cpProf,a1,"");
>
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
2011 Jan 24
3
[LLVMdev] How to change the type of an Instruction?
On Mon, Jan 24, 2011 at 3:01 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> On 01/24/2011 04:41 AM, Douglas do Couto Teixeira wrote:
>
>> Hi,
>>
>> Nick, thanks for the reply.
>> I still have a problem: I only need to "clone" an Instruction, changing
>> its type. That is, I would like to keep all characteristics of the old
>> Instruction