Displaying 20 results from an estimated 839 matches for "callinsts".
Did you mean:
callinst
2008 Apr 09
2
[LLVMdev] Compiling Stacker compiler
Hi, I'm new to LLVM, and I'm trying to get things set up. So far I've
successfully gotten the C and C++ frontends to run, using the
pre-compiled Mac OS X PPC binaries. I've also successfully compiled
the main LLVM package (minus the gcc frontend).
I'm now trying to get the Stacker sample project to compile.
I checked out the Stacker directory from svn, and put it in my
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 =
2009 Nov 19
0
[LLVMdev] Strange error using CallInst constructor
Please keep replies on the list.
Now you've missed "InputIterator must be a random-access iterator
pointing to contiguous storage (e.g. a std::vector<>::iterator).
Checks are made for random-accessness but not for contiguous storage
as that would incur runtime overhead." from CallInst's constructor
(although that comment should be on Create()). Function::arg_iterator
2006 Feb 14
1
[LLVMdev] dynamic_cast error
Hello,
Following statement from LLVM Programmer's Manual is not compiling.
CallInst* callInst = dyn_cast<CallInst>(&*basic_block_iterator_1);
The gcc version is :
gcc (GCC) 4.0.2 20051125 (Red Hat 4.0.2-8)
============
Error message
============
llvm/include/llvm/Support/Casting.h: In function 'bool
llvm::isa_impl(const From&) [with To = llvm::CallInst, From =
2012 Jan 06
2
[LLVMdev] How to duplicate a CallInst
Hi,
I have the following piece of code:
%34 = fptosi float %33 to i32
%35 = call i32 @function(i32 %34) nounwind
I would like of know how can I duplicate the statement %35 ? , as follows:
%34 = fptosi float %33 to i32
%35 = call i32 @function(i32 %34) nounwind
*%36 = **call i32 @function(i32 %34) nounwind*
*
*
i.e, two instructions exactly equal.
Using clone, results in badref.
Moreover, how
2018 Mar 23
3
Change function call name in a CallInst only in certain functions
Hello,
In my module I have functions:
a
b
c
f3 calls "a"
f2 calls "a"
f1 calls "b"
I would like to modify a CallInst in the f2. Now it calls "a", but I want
changed it to "c".
When loop over the instructions of the f2, I can get a CallInst to be
modified, then I use "setName" to changed it to "c".
Problem is, since
2007 Mar 07
3
[LLVMdev] use of CallInst()
To create a new CallInst I used to call the following constructor:
CallInst(Value *F, const std::vector<Value*> &Par, const std::string
&Name = "", Instruction *InsertBefore = 0);
However, it seems as though that constructor has been removed. I assume
that I'm suppossed to use the following constructor, but I can't figure
out what to pass as the Args parameter
2018 Mar 24
0
Change function call name in a CallInst only in certain functions
You are probably calling setName() on the called Function, which in-turned renamed the called Function instead of replacing the called function.
Depending on your use-case, if you are certain that you only need to modify CallInsts, then you could simply call CallInst::setCalledFunction , otherwise it’s probably wiser to use CallSite as a wrapper for both CallInst and InvokeInst. Do note, however, that no matter which solution you end up using, you’ll need to update the FunctionType as well
Zhang
> On 23 Mar 2018, at 23:0...
2010 Jun 30
2
[LLVMdev] [HEADSUP] Another attempt at CallInst operand rotation
Am 30.06.2010 um 23:31 schrieb John Criswell:
>
> Stupid question: is making the getOperand() method of CallInst
> going to work? For example, if I have the following code:
>
> void
> method (Instruction * I) {
> I->getOperand(2);
> ...
> }
>
> void method2 (CallInst * CI) {
> method (CI);
> ...
> }
>
> Will method() still work
2015 Nov 13
5
How to efficiently extract the calledFunction from a complex CallInst?
Hi all,
Usually if we want to get the called Function we can directly use
CallInst->getCalledFunction(), however, today i encounter an unusual
CallInst as follows:
%call11 = call double (...)* bitcast (double ()* @quantum_frand to double
(...)*)()
the original C source involve type cast:
float u,v;
extern double quantum_frand();
u = 2 * quantum_frand() - 1;
v = 2 * quantum_frand() -
2005 Aug 24
1
[LLVMdev] CallInst constructor interface
Hi,
Inserting a call instruction is a bit of a pain. The only way I know
how to do it is to write a bunch of code like the following:
std::vector<const Type*> formalArgs;
formalArgs.push_back(arg1->getType());
formalArgs.push_back(arg2->getType());
...
formalArgs.push_back(argn->getType());
std::vector<Value*> args;
args.push_back(arg1);
2012 Apr 10
4
[LLVMdev] How to explain this weird phenomenon????????
My friends,
I ran a function pass on a .bc file, intending to insert a CallInst to my self-made check function.
The compilation is successful. BUT after I ran that pass on the .bc file, the size of the file didn't get any bigger!!
Does this mean my instrumentation work failed??
BTW the opt command I use is "opt -load ../../../Debug+Asserts/lib/Hello.so -hello <hello.bc> -o
2007 Mar 07
0
[LLVMdev] use of CallInst()
On Tue, 2007-03-06 at 22:44 -0600, Ryan M. Lefever wrote:
> To create a new CallInst I used to call the following constructor:
>
> CallInst(Value *F, const std::vector<Value*> &Par, const std::string
> &Name = "", Instruction *InsertBefore = 0);
>
> However, it seems as though that constructor has been removed. I assume
> that I'm suppossed to
2010 Jul 01
0
[LLVMdev] [HEADSUP] Another attempt at CallInst operand rotation
Gabor Greif wrote:
> Am 30.06.2010 um 23:31 schrieb John Criswell:
>
>
>> Stupid question: is making the getOperand() method of CallInst
>> going to work? For example, if I have the following code:
>>
>> void
>> method (Instruction * I) {
>> I->getOperand(2);
>> ...
>> }
>>
>> void method2 (CallInst * CI) {
2010 Jun 30
0
[LLVMdev] [HEADSUP] Another attempt at CallInst operand rotation
Gabor Greif wrote:
> Hi all,
>
> I am almost ready for the last step with landing my long-standing patch.
> I have converted (almost) all low-level interface users of CallInst to
> respective high-level interfaces. What remains is a handful of hunks
> to flip the switch.
>
> But before I do the final commit I'd like to coerce all external users
> to code against the
2010 Jun 30
4
[LLVMdev] [HEADSUP] Another attempt at CallInst operand rotation
Hi all,
I am almost ready for the last step with landing my long-standing patch.
I have converted (almost) all low-level interface users of CallInst to
respective high-level interfaces. What remains is a handful of hunks
to flip the switch.
But before I do the final commit I'd like to coerce all external users
to code against the high-level interface too. This will (almost, but
see below)
2014 Jul 07
2
[LLVMdev] Return Type of Call Function with nested bitcast
Hi All,
I am facing an issue with CallInst with nested bitcast instruction. I want
to check if the return type of a call is void or non-void the below line
works well for CallInst without bit cast.
*cast<CallInst>(I)->getCalledFunction()->getReturnType()->isVoidTy()*
But for Call instructions like
*call void bitcast (void (%struct.jpeg_compress_struct.131*, i32)*
2007 Mar 07
1
[LLVMdev] use of CallInst()
Thanks for the help Reid! I frequently look at the online doxygen, but
sometimes its difficult to determine the correct replacement when a
method is removed from LLVM. In this particular case, I knew which new
CallInst constructor to use, I just couldn't figure out the proper syntax.
At any rate, I really appreciate your help!!
Reid Spencer wrote:
> On Tue, 2007-03-06 at 22:44 -0600,
2012 Apr 10
0
[LLVMdev] How to explain this weird phenomenon????????
I figured that my opt command is wrong! How to specify the output file anyway??
if I want hello.bc to be input file and newhello.bc to be output file, is the opt command go like this?
opt -load ../../../Debug+Asserts/lib/Hello.so -hello <hello.bc> -o newhello.bc ??
--
祝好!
甄凯
2010 Feb 07
3
[LLVMdev] Help with Mac OS X 10.6.2 build
Greetings,
I am having trouble getting the Kaleidoscope example to build from
tutorial #3 on Mac OS X 10.6.2. I didn't have too much trouble
getting llvm-2.6 and llvm-gcc-frontend to build. Thanks for the help.
Here are the steps I followed:
Environment variables for build
export LLVMOBJDIR=/opt/llvm
export TARGETOPTIONS='--with-arch=nocona --with-tune=generic'
export