Displaying 20 results from an estimated 300 matches similar to: "Copy Function from one LLVM IR file to another"
2016 Jun 20
3
function call replacement
Hi everyone,
I am trying to replace the call of a certain function with a call to
another function. It would for example replace the following:
%call = tail call noalias i8* @func(i64 10)
by
%call = tail call noalias i8* @other_func(i64 10)
I managed to declare other_func correctly but I am having troubles to
understand how I should proceed to do the replacement.
I tried to use
2016 Jun 21
3
function call replacement
Hi,
Thanks both of you for the help. I just missed that Create function had
many optional arguments... sorry for that. However my problem wasn't coming
from here (IRBuilder CreateCall function still return a pointer to CallInst
so I just added 2 times the call?). I didn't wanted to detail the all issue
previously because I knew I had a problem with my syntax. So here's my
problem:
I
2012 Dec 02
1
[LLVMdev] GetElementPtrInst question
Hi James,
Thanks for your quick reply.
> I assume because you asked this question, something went wrong when using the above method. What was it? :)
No, I am not using this method. I was trying to create a
llvm::GetElementPtrInst . I didn't create IRBuilder. I am writing a
ModulePass that insert new instruction to an existing Module.
Besides, how can you get a reference to myreg1 ?
2011 May 06
1
[LLVMdev] ReplaceInstWithInst appears to invalidate BB iterator?
Hello,
I have a call to ReplaceInstWithInst(Instruction *From, Instruction *To) inside of a for loop iterating through a BasicBlock::iterator. On the very next pass after I replace the instruction, the iterator appears to be invalidated. Is this supposed to happen or am I doing something silly? Is there a more appropriate way to do this? Thanks,
-Justin
2012 Jan 03
2
[LLVMdev] AliasAnalysis and memory dependency
Hi all,
I want to find memory dependency between CallInst instruction and other.
So i used the following code:
* AliasAnalysis &AA=getAnalysis<AliasAnalysis>();*
* if(isa<StoreInst>(inst1)){*
* ** **if(isa<CallInst>(inst2))**{*
* CallInst *call_inst2= dyn_cast<CallInst>(inst2); *
* if(AA.getModRefInfo(inst1,call_inst2)==mod)**{*
*
2003 Nov 24
1
[LLVMdev] Question about Instruction comparison
On Mon, Nov 24, 2003 at 02:13:04PM -0600, Tanya Brethour wrote:
> > I have been looking over the doxygen documentation as well as the
> > llvm code. Is there a standard way to check to see if two
> > instructions are identical (i.e., Inst1 == Inst2 does not work)?
>
> If you want to check if two instructions are the same instruction, you
> should be able to just
2015 Jun 18
3
[LLVMdev] problem with replacing an instruction
I am trying to change this
define void @main(float* noalias %arg0, float* noalias %arg1, float*
noalias %arg2) {
entrypoint:
%0 = bitcast float* %arg1 to <4 x float>*
intothis
define void @main(float* noalias %arg0, float* noalias %arg1, float*
noalias %arg2) {
entrypoint:
%0 = getelementptr float* %arg1, i64 0
%1 = bitcast float* %0 to <4 x float>*
I must be close but
2009 Sep 11
0
[LLVMdev] [proposal] Extensible IR metadata
I've got a suggestion for a refinement:
Right now, we have classes like DILocation that wrap an MDNode* to
provide more convenient access to it. It would be more convenient for
users if instead of
MDNode *DbgInfo = Inst->getMD(MDKind::DbgTag);
Inst2->setMD(MDKind::DbgTag, DbgInfo);
they could write:
DILocation DbgInfo = Inst->getMD<DILocation>();
2008 Jul 29
1
[LLVMdev] Memory Dependence Analysis: getNonLocalDependency()
Thanks for the quick reply, Owen. I went through the code in
MemoryDependenceAnalysis.cpp again. Since DenseMap<BasicBlock*, Value*> maps
a BasicBlock to a single Value (Instruction) and it is populated by a DFS on
the reverse Control Flow Graph starting at the query instruction's block, is
it correct to say that the last dependent instruction in each visited basic
block is what is
2012 Jan 03
0
[LLVMdev] AliasAnalysis and memory dependency
Hi neda 8664,
> I want to find memory dependency between CallInst instruction and other. So i
> used the following code:
>
>
>
> / AliasAnalysis &AA=getAnalysis<AliasAnalysis>();/
>
> /*if* (isa< StoreInst >(inst1)){ /
>
> // // /*if* (isa<CallInst>(inst2)) / /{/
>
> / CallInst *call_inst2= dyn_cast<CallInst>(inst2); /
2009 Nov 18
2
[LLVMdev] Strange error using CallInst constructor
Hi,
This is probably more of a standard C++ question instead of an actual
LLVM question, but here it goes anyway. I'm trying to invoke the
following constructor:
CallInst::CallInst(Value *Func, InputIterator ArgBegin, InputIterator
ArgEnd,
const Twine &NameStr, BasicBlock *InsertAtEnd);
My code is:
using namespace llvm;
void replaceByClone(Function *f, CallInst *I){
Function *clone =
2003 Nov 24
2
[LLVMdev] Question about Instruction comparison
I have been looking over the doxygen documentation as well as the llvm
code. Is there a standard way to check to see if two instructions are
identical (i.e., Inst1 == Inst2 does not work)?
Thanks,
Brian
Brian M. Fahs
Graduate Student
University of Illinois
2016 May 09
4
Some questions about phase ordering in OPT and LLC
Hi,
I'm a PhD student doing phase ordering as part of my PhD topic and I
would like to ask some questions about LLVM.
Executing the following command to see what passes does OPT execute when
targeting a SPARC V8 processor:
/opt/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-15.10/bin/llvm-as <
/dev/null | /opt/clang+llvm-3.7.1-x86_64-linux-gnu-ubuntu-15.10/bin/opt
-O3 -march=sparc -mcpu=v8
2003 Nov 24
0
[LLVMdev] Question about Instruction comparison
> I have been looking over the doxygen documentation as well as the llvm
> code. Is there a standard way to check to see if two instructions are
> identical (i.e., Inst1 == Inst2 does not work)?
If you want to check if two instructions are the same instruction, you
should be able to just compare pointers.
-Tanya
2000 Apr 06
0
Testcase to show the bug in smbclient with tar,ls,mget
I'm posting this message in charge of Denis MARS (France), because he is not
a subscriber of teh list and I worked with him about the same problem.
Domenico Viggiani
----------------------------------------------------------------
Hello,
I worked on this problem since three weeks and now i really
give up. Clearly i can't go further without your help.
I hesitate to send you this bug
2018 Aug 08
3
Error Calling eraseFromParent()
LLVM is built in Release mode. The version is 6.0.0. I think that a similar
code worked on verison 3.9.0. It is probably a null pointer dereference
occurring in eraseFromParent(). I checked and reconfirmed that the
instruction had no uses. Perhaps I should rebuild LLVM. Thanks.
On Wed, Aug 8, 2018 at 9:03 PM, mayuyu.io <admin at mayuyu.io> wrote:
> Hmmmm that’s strange. Do you get an
2009 Sep 30
2
R package for visualizing/analyzing accelerometry data?
Hello All -
Any recommendations or suggestions for neat ways to visualize data
taken from a 3-axis accelerometer? My study species is aquatic, so I
would be interested in movement in the 3 dimensions in addition to
being able to incorporate the time series as well. Is there a package
in R that might be useful for this?
Thank you in advance,
Jen
~~~~~~~~~~~~~~~~~~~~~
Jennifer Maresh, PhD
2009 Sep 11
4
[LLVMdev] [proposal] Extensible IR metadata
On Friday 11 September 2009 15:20, Jeffrey Yasskin wrote:
> I've got a suggestion for a refinement:
>
> Right now, we have classes like DILocation that wrap an MDNode* to
> provide more convenient access to it. It would be more convenient for
> users if instead of
>
> MDNode *DbgInfo = Inst->getMD(MDKind::DbgTag);
> Inst2->setMD(MDKind::DbgTag, DbgInfo);
>
2013 Dec 03
1
[LLVMdev] Help with creating and replacing instructions in LLVM
Hi,
I have the following instruction in my IR-
%call2 = call i8* @strcpy(i8* %1, i8* %2) #2
I intend to change call to strcpy with strncpy. I have included the following code in runOnFunction, so that when it is strcpy's turn to be invoked, strncpy is invoked instead.
Assuming I* is the strcpy instruction,
CallInst* x=new
2013 Dec 03
1
[LLVMdev] Help needed with creating new and replacing an old instruction
Hi,I have the following instruction in my IR-%call2 = call i8* @strcpy(i8* %1, i8* %2) #2I intend to change call to strcpy with strncpy. I have included the following code in runOnFunction, so that when it is strcpy's turn to be invoked, strncpy is invoked instead.Assuming I* is the strcpy instruction,CallInst* x=new