Displaying 20 results from an estimated 2000 matches similar to: "[LLVMdev] Query regarding CallInst::Create"
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
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.
>
>
2013 Jan 20
0
[LLVMdev] Dynamic Profiling - Instrumentation basic query
Hi Silky,
Sorry for the slow reply. You probably already fixed this, but just in
case I'll reply anyway.
Comments inline below
On 15/01/13 19:38, SArora wrote:
> Hi Alastair,
> Thank you so much for the information on the tools. Actually, I need to
> analyze which sections of code are prone to misses and mis predicts, and
> would have to eventually instrument the code.
>
2013 Jan 16
2
[LLVMdev] Dynamic Profiling - Instrumentation basic query
Hi Alastair,
Thank you so much for the information on the tools. Actually, I need to
analyze which sections of code are prone to misses and mis predicts, and
would have to eventually instrument the code.
I was able to instrument and call an external function, but faced an issue
while passing an argument to the function. I am following EdgeProfiling.cpp
but couldn't figure out the problem.
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 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,
2011 Nov 20
0
[LLVMdev] Insert a function call in the code
Thank you for your help
I found the problem,
as hook() is a no paramter function,so
for(Function::arg_iterator i =
hook->arg_begin(), e = hook->arg_end(); i != e; ++i)
{
Args.push_back(i); /////////////Wong
}
we can add a call by
Instruction *newInst = CallInst::Create(hook,
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 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
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
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,"");
>
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...
>
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();
..
2005 Nov 22
3
[LLVMdev] Cloning BasicBlock
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 tried mapping the original instruction and the clone as below :
Instruction *NewInst = II->clone();
if (II->hasName())
NewInst->setName(II->getName());
NewBB->getInstList().push_back(NewInst);
ValueMap[II] =
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
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*
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
2008 Jul 21
0
[LLVMdev] Casting between address spaces and address space semantics
Hi Matthijs,
Thanks for giving some code so we can discuss this in more concrete
detail. In terms of the information we need, I think you have it
right. We just need a description of how the different address spaces
relate and I don't see much of an issue with how you implemented to
InstructionCombining.
As you also mentioned, I don't like that we pass a reference to