similar to: need more information about the two classes of CallInst and CastInst

Displaying 20 results from an estimated 200 matches similar to: "need more information about the two classes of CallInst and CastInst"

2007 Feb 24
3
[LLVMdev] cast instruction
I need to create a cast instruction that casts an sbyte* to another pointer type. Previously I was using the CastInst::createInferredCast() function to do that; however, that function has been removed. Which of the create() functions from CastInst should I use to do that? It seems like the obdvious answer should be createPointerCast(). However, the documentation for createPointerCast
2010 Jun 12
1
[LLVMdev] Memory leak?
Hi folk, I get the following stack trace and do have any clue how to fix the problem. 0 opt 0x087ecc99 1 opt 0x087ed265 2 0xb7f6a400 __kernel_sigreturn + 0 3 opt 0x086d4198 llvm::LeakDetector::addGarbageObject(llvm::Value const*) + 29 4 opt 0x0872945f llvm::Instruction::Instruction(llvm::Type const*, unsigned int,
2010 May 16
1
[LLVMdev] How to access the return value of a CallInst
Hi all: I am trying to get the return value of a call instruction that I inserted during the optimization pass I wrote. I have something like the following: CallInst *InitCall = CallInst::Create(InitFn, Args.begin(), Args.end(), "log_load_addr_ret", LI); CastInst *InsertedCast =
2014 Sep 01
2
[LLVMdev] Instrumenting Various Types Using Single Instrumentation Function
Hi All, My instrumentation code needs to insert calls to transmit Value list. Each element in this list could be of different type. The list is sent to instrumenting function say void recordVarInputValues(int num, ...) . So, I have created a Union type in Tracing.cpp, which I link with my benchmark module at compile time. These steps are similar to giri instrumentation
2015 Jan 05
3
[LLVMdev] should AlwaysInliner inline this case?
On Mon, Jan 5, 2015 at 1:40 AM, Pete Cooper <peter_cooper at apple.com> wrote: > Hi lx, Philip > > I've seen an instcombine which helps with this situation. It fires when > the function types on both sides of the bitcast have the same number of > operands and compatible types. It then adds bitcasts on the arguments and > removes the one on the called function. > It
2012 Dec 21
2
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
I am seeing an assert when I compile the attached program with clang: $ clang -fno-strict-aliasing -target mips64el-unknown-linux -O3 -fomit-frame-pointer -S test1.c -o test1.ll -emit-llvm It asserts when LoopVectorize.cpp:506 is executed. It looks like it is complaining because it is trying to zero-extend an i64 (type Count->getType() returns i64) to an i32 (IdxTy). if (Count->getType()
2008 May 22
2
[LLVMdev] Latest SVN head (gcc front end) build failed
hi all, I was trying to build the latest LLVM gcc front end and it failed. rajika@:~/project/llvm/dst-directory$ svn info | grep URL URL: http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk configure option: ../dst-directory/configure --prefix=/usr/local/ --enable-llvm=/home/rajika/project/llvm/llvm-objects it gave me the following errors ../../dst-directory/gcc/llvm-convert.cpp:1163: error:
2015 Jan 17
2
[LLVMdev] How to test isDereferenceablePointer?
I'm have a [PATCH] isDereferenceablePointer: look through gc.relocates and I want to know how to test this patch. So far, I've found one candiate: speculative execution in SimplifyCFG (test/Transforms/SimplifyCFG/SpeculativeExec.ll). However, it's somewhat involved to show that SimplifyCFG does kick in for gc.relocate. Is there a better way to directly test it? Signed-off-by:
2012 Dec 21
0
[LLVMdev] assert in InnerLoopVectorizer::createEmptyLoop
Please file a bug for these types of issues. On Fri, Dec 21, 2012 at 1:49 PM, Akira Hatanaka <ahatanak at gmail.com> wrote: > I am seeing an assert when I compile the attached program with clang: > > $ clang -fno-strict-aliasing -target mips64el-unknown-linux -O3 > -fomit-frame-pointer -S test1.c -o test1.ll -emit-llvm > > > It asserts when LoopVectorize.cpp:506 is
2019 Oct 30
2
pointer arithmetic with address space attribute not working
Hi, I have a case that for pointer with address space attribute, pointer arithmetic is not work. For example, -bash-4.4$ cat test.c #define __user __attribute__((address_space(1))) void __user * test(void __user *arg) { #ifdef ADD return arg + 4; #else return arg; #endif } -bash-4.4$ -bash-4.4$ clang -g -c test.c -bash-4.4$ clang -g -c -DADD test.c clang-10: ../lib/IR/Instructions.cpp:2749:
2011 Aug 19
1
[LLVMdev] LLVM: Very simple question
Hi, guys. I'm a newbie to LLVM and have a very simple question. Which instructions should I use (in terms of IRBuilder calls) to allocate an array of bytes in stack (alloca?), then to work with it (from a given offset) as with integer (bitcast?). I mean something like that: unsigned char var[8]; unsigned int offset = 3; int val = *(int*)(&var+offset); /* read */ *(int*)(&var+offset)
2008 May 22
0
[LLVMdev] Latest SVN head (gcc front end) build failed
Did you update llvm and build that first? -Tanya On May 21, 2008, at 10:29 PM, Rajika Kumarasiri wrote: > hi all, > I was trying to build the latest LLVM gcc front end and it failed. > > rajika@:~/project/llvm/dst-directory$ svn info | grep URL > URL: http://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk > > configure option: ../dst-directory/configure --prefix=/usr/local/
2019 Oct 31
2
pointer arithmetic with address space attribute not working
I forgot the -DADD flag earlier but the result did not change: https://godbolt.org/z/NPcn22 ________________________________________ From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Doerfert, Johannes via llvm-dev <llvm-dev at lists.llvm.org> Sent: Wednesday, October 30, 2019 20:18 To: LLVM Developers Mailing List; Y Song Cc: Alexei Starovoitov Subject: Re: [llvm-dev]
2009 Sep 28
0
[LLVMdev] Printing Function Arguments
Hi Nick, I parsed your message again carefully and did some experiments. I guess the: for (User::op_iterator i = I->op_begin(), e = I->op_end(); i != e; ++i) { } iterates over the operands of the instruction "I", which are as you said, *other* instructions. But if I want to get other information about the instruction, say the type of the operands, then I still need to figure
2019 Oct 31
2
pointer arithmetic with address space attribute not working
Thanks for the detailed info! The problem was that I tried without assertions and didn't inspect the IR closely as it contained this, for now, illegal instruction: %6 = bitcast i8* %5 to i8 addrspace(1)* This is clearly a clang error. I suggest opening a bug report, or sending the reproducer to cfe-dev at llvm.lists.org so someone will take a look that has more clang experience. @Matt Do
2014 Jan 07
2
[LLVMdev] Build/Install of LLVM without root access
I must not be asking clearly. I have a machine on which I have placed the tarballs - but no internet access. How do I use the *src.tar.gz files from the llvm 3.4 downloads page? I understand the layout produced by the svn actions, but if I have just the tarballs, do I simply replace "svn co" with "tar -xvzf" in the sequence? How do the names of the tarballs map to the names
2009 May 21
3
[LLVMdev] Passing a pointer to a function
I recently began hacking around with my first LLVM pass. The big picture is that I would like to insert function calls for each instruction type, and pass some parameters based on the instruction type. Then I will link the output to some C file that implements those functions. Things were going well until I started trying to make function calls with a pointer as a parameter. For example, I would
2008 May 16
0
[LLVMdev] API CHANGE: create*() --> Create
Hi all, I have checked in the API change for the classes BinaryOperator, CmpInst and CastInst, that upper- cases all methods that begin with "create". As announced (<http://lists.cs.uiuc.edu/pipermail/llvmdev/2008-May/ 014636.html>) the legacy API is still in place. If you observe something to the contrary, please alert me and I shall fix it. Please note that LLVM 2.3 will have
2009 May 21
0
[LLVMdev] Passing a pointer to a function
On Wed, May 20, 2009 at 7:31 PM, Scott Ricketts <sricketts at maxentric.com> wrote: > Where load_fcall is build using a call to Module::getOrInsertFunction > as in the example here: > > http://wiki.llvm.org/HowTo:_Insert_a_function_call > > My question is, what do I pass as the argument type for P above? The > following seems to work, as long as there are no floating
2012 Jun 19
0
[LLVMdev] Cast Pointer Address to Functions
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Xin Tong > Subject: [LLVMdev] Cast Pointer Address to Functions > I have a function address held in an uint64_t. I would like to cast > the function address to a function prototype and create a call to the > function in LLVM. How could I do this ? This is what works for us: