similar to: [LLVMdev] modify instructions

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] modify instructions"

2002 Sep 29
1
[LLVMdev] modify instructions
I think since we use the replaceAllUsesWith to replace all uses of old one, the old one should already be a instruction with # of uses equals 0. So it should be Ok to directly delete it. Can you let me know if there is anything wrong with simple deletion? Why can we create illegal LLVM? Thanks, xiaodong ---- Original message ---- >Date: Thu, 26 Sep 2002 10:50:00 -0500 >From: "Vikram
2002 Sep 25
3
[LLVMdev] question about GetElementPtr Instruction
I have a question about GetElementPtr. Suppose I have an GetElementPtr Instruction GI: %reg = getelementptr %ST* %s, uint 1, ubyte 2, ubyte 1, uint 5, uint 13 I want to check if this is the reference of a component of a structure, how can I do that? Should I check which operand of this instruction is 'ubyte' type? How can I do that in code? should I use ubyte *a =
2002 Oct 31
1
[LLVMdev] problems with llvmgcc
Dear Prof. Adve, Now I can use llvmgcc to compile a .c file into .bc file. But I still have trouble simply run the .bc code. Below is the sequence I got when I tried. I really don't know what's going on here. Please let me know how can I fix it. Thanks, xiaodong xli3|csil-suna48|~/cs426|[13]% llvmgcc scalarize.c -o scalarize xli3|csil-suna48|~/cs426|[14]% scalarize Cannot load value of
2002 Sep 14
1
[LLVMdev] MP1: names
Does our pass need to ensure that the new names it creates for the field allocations are, in fact, unique? -- Casey Carter Casey at Carter.net ccarter at uiuc.edu AIM: cartec69
2002 Nov 11
1
[LLVMdev] DSGraph questions
Dear Prof. Adve, I recently checked out the llvm using cvs update command under the llvm directory. But when I went to see the DSNode.h, there is no getPointerSize function. I checked the doxygen tree, it's there. So that means I didn't update my cvs tree correctly. Could you let me know how to update my CVS tree? Or there is a problem at somewhere else? Thanks, xiaodong On Sun, 10 Nov
2004 May 11
2
[LLVMdev] Problems accessing structs
Hello! I get some odd behaviour using my structs: "myKernelMap" = type {int (sbyte*)*, int ()*} "Kernel" = type {"myKernelMap"*} The second member ( int()* ) is a pointer to the %getchar() function. I want to call getchar using this function: int "callmyKernelgetchar_kernel"("Kernel"* "myKernel") { "PTRMAP" =
2002 Sep 26
2
[LLVMdev] question about GetElementPtr Instruction
You are correct, ubyte 2 simply means 3rd element of the structure. This quantity is always constant (it specifies the field number), so we could have used any signed or unsigned integer type for it instead of ubyte. UByte means we are limited to at most 256 structure fields but it also makes the bytecode representation more compact. (To remove this restriction, we may migrate to UInt in the
2007 Feb 13
2
[LLVMdev] Unused malloc/free don't get optimized
Hi, i have some code that allocate some memory, store the pointer to a variable, read it back and deallocates it, like this: int %main(int %argc, ubyte** %argv) { %c_19 = alloca ubyte* %malloc_206 = malloc ubyte, uint 10 store ubyte* %malloc_206, ubyte** %c_19 %tmp_207 = load ubyte** %c_19 free ubyte* %tmp_207 ret int 0 } i expected the optimized to remove everything, but after running it the
2006 Mar 16
2
[LLVMdev] Stupid '-load-vn -licm' question (LLVM 1.6)
Hello! I'm compiling code which uses pointers as iterators. For some reason--probably a silly misunderstanding of the docs--I can't eliminate duplicate pointer loads. I'll probably figure this out eventually, but if somebody else sees the answer instantly, I certainly won't complain. :-) Here are the optimizers I'm running: opt -f -simplifycfg -dce -instcombine
2004 May 11
0
[LLVMdev] Problems accessing structs
Anders Alexandersson wrote: > Hello! > > I get some odd behaviour using my structs: > > "myKernelMap" = type {int (sbyte*)*, int ()*} > "Kernel" = type {"myKernelMap"*} > > The second member ( int()* ) is a pointer to the %getchar() function. > > I want to call getchar using this function: > > int
2007 Mar 01
2
[LLVMdev] Version 1.9 SSA form question
int %nlz10(uint %param.x) { %.t3 = shr uint %param.x, ubyte 1 ; <uint> [#uses=1] %.t4 = or uint %.t3, %param.x ; <uint> [#uses=2] %.t7 = shr uint %.t4, ubyte 2 ; <uint> [#uses=1] %.t8 = or uint %.t7, %.t4 ; <uint> [#uses=2] %.t11 = shr uint %.t8, ubyte 4 ; <uint> [#uses=1]
2004 May 03
2
[LLVMdev] Problems with getelementptr
Hello! I'm having trouble with pointer traversing. I have a design as follows: class -> map -> classFunctions Starting with a pointer to the class, I want to get a pointer to a classFunction via a pointer to the map. I can't get that function pointer! How shall I think to get the traversing right (see code below)? Is it something with the fact that I am using only pointers in my
2004 May 03
0
[LLVMdev] Problems with getelementptr
On Mon, 3 May 2004, Anders Alexandersson wrote: > Hello! > > I'm having trouble with pointer traversing. I have a design as follows: > class -> map -> classFunctions > > Starting with a pointer to the class, I want to get a pointer to a > classFunction via a pointer to the map. Okay... > I can't get that function pointer! > > How shall I think to get
2007 Feb 14
0
[LLVMdev] Unused malloc/free don't get optimized
On Tue, 13 Feb 2007, Nicola Lugato wrote: > Hi, i have some code that allocate some memory, store the pointer to a > variable, read it back and deallocates it, like this: ok > i expected the optimized to remove everything, but after running it > the code i get is: > > int %main(int %argc, ubyte** %argv) { > %malloc_206 = malloc [10 x ubyte] > %malloc_206.sub =
2002 Oct 30
2
[LLVMdev] problems with llvmgcc
Thanks, Chris, Below is the output of 'llvmgcc he.c -v' xli3|csil-suna27|~/cs426|[35]% llvmgcc he.c -v Reading specs from /usr/dcs/projects/cs426/Software/gcc_install/bin/../lib/gcc-lib/llvm/3.1/specs Configured with: /home/vadve/lattner/cvs/gcc/configure --srcdir=/home/vadve/lattner/cvs/gcc --prefix=/home/vadve/lattner/cvs/gcc_install_sparc --target=llvm --enable-languages=c
2007 Feb 14
2
[LLVMdev] Unused malloc/free don't get optimized
I've made some other test and it looks like it don't remove even simple malloc/free couple. Maybe there's something wrong in the way i use the opt command. How can i tell him to optimize at best, whitout specifing each pass? I'm not using c/c++ frontend, just the assembler. Thanks in advance On 2/14/07, Chris Lattner <sabre at nondot.org> wrote: > On Tue, 13 Feb 2007,
2005 Jun 13
2
[LLVMdev] problem compiling the cfrontend on Linux/PPC
> Okay, I took a closer look at your output. > > I was correct in that gccas is attempting to assemble a native PPC > assembly language file. However, this appears to be happening because > the assembly file is generated by the GCC Makefiles for libgcc2 (in > llvm-gcc/gcc/config/rs6000/t-ppccomm, I think). > > The first thing I would try is Marco's suggestion: add
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
2004 Apr 04
2
[LLVMdev] Two important changes to the getelementptr instruction
Hi all, I just checked in a series of patches that makes some substantial changes to the LLVM getelementptr instruction. In particular, in LLVM 1.2 and earlier, the getelementptr instruction required index operands for structure types to be 'ubyte' constants and index operands for sequential types to be 'long' values. This had several problems, most notably that it was
2004 Apr 02
0
[LLVMdev] Function pointers
On Fri, 2 Apr 2004, Anders Alexandersson wrote: > OK, I solved it all ( so far :) ), mixing in some load-instructions and > called on the result of that, which worked. > > Here is the skeleton-code: > > %kernel = type { int ()* } > > int puts_kernel(){...} > > ; main() > > %theKernel = malloc %kernel > %puts_kernelPTR = getelementptr %kernel* %theKernel,