similar to: [LLVMdev] How to insert two instructions with the same name?

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] How to insert two instructions with the same name?"

2006 Oct 08
0
[LLVMdev] How to insert two instructions with the same name?
On Oct 8, 2006, at 1:15 AM, Zhou Sheng wrote: > i want to insert a PHI into one basicblock like this: > > %s.1 = phi int [ 80, %entry ], [ %tmp21, %bb17 ] > > then, insert a cast inst. into another basicblock like this: > > %s.1 = cast int %s.1 to uint > > But, when i do this, the llvm automatically change the same name > into a new one. > In SSA, any assignment
2008 Dec 09
1
[LLVMdev] scalar-evolution + indvars fail to get the loop trip count?
Hi, Seems pass scalar-evolution+indvars fail to get the loop trip count of the following case: int foo(int x, int y, int lam[256], int alp[256]) { int i; int z = y; for (i = 255; i >= 0; i--) { z += x; lam[i] = alp[i]; } return z; } The final optimized ll code is : define i32 @foo(i32 %x, i32 %y, i32* %lam, i32* %alp) nounwind { entry: br label %bb bb:
2010 Nov 10
2
[LLVMdev] llvm-gcc not compatible with gcc on a small case?
I found a case which gcc can compile while llvm-gcc can not. I'm using the gcc4.1 and the most recent llvm-gcc. Here is the case: template <int N> class T { public: int V; }; T<4> test(T<4> a[4][8]) { return a[3][3]; } llvm-gcc dumped: fail.cpp: In function \u2018T<4> test(T<4> (*)[8])\u2019: fail.cpp:7: error: invalid use of incomplete type
2008 Sep 04
3
[LLVMdev] A simple case about SDiv
Hi, I have a simple C case as following: int test(int x, int y) { return -x / -y; } With llvm-gcc -O1, I got: define i32 @test(i32 %x, i32 %y) nounwind { entry: sub i32 0, %x ; <i32>:0 [#uses=1] sub i32 0, %y ; <i32>:1 [#uses=1] sdiv i32 %0, %1 ; <i32>:2 [#uses=1] ret i32 %2 } With llvm-gcc -O2, I got: define i32 @test(i32 %x, i32 %y) nounwind { entry: sdiv i32
2008 Mar 04
3
[LLVMdev] llvm-gcc 4.2 building failed on x86-64
Current llvm-gcc 4.2 building failed on X86-64, here is the dump information: xgcc -B/home/zsth/projects/llvm.org/build/cfe4.2obj/./prev-gcc/ -B/home/zsth/projects/llvm.org/install/x86_64-unknown-linux-gnu/bin/ -I../../../cfe4.2/libcpp -I. -I../../../cfe4.2/libcpp/../include -I../../../cfe4.2/libcpp/include -DENABLE_LLVM -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
2006 Sep 18
2
[LLVMdev] llvm-g++: Internal error
Hi, i used CVS to checkout the source of llvm and llvm-gcc, compiled and built them on my machine successfully. i tried a c-language hello program, it was OK. But when i tried a c++-language hello program, i got: ~/project/llvm/examples$ llvm-g++ t3.cc -o t3 gccld: /developer/zsth/project/llvm/src/llvm/lib/Analysis/IPA/CallGraph.cpp:277: void
2006 Dec 04
2
[LLVMdev] problem using scc_iterator on CallGraph
I am working on a transform that uses an scc_iterator on a program's CallGraph. However, I am running into a problem in which not all callees are being processed before callers, leading me to believe there might be a bug. In particular, this is happening in a case where a callee is a function pointer. I ran bugpoint and have included the bugpoint-reduced-simplified.ll below. If
2007 Jun 12
3
[LLVMdev] ARM backend problem ?
Hello, I want to compile a LLVM file into an executable running on ARM platform. I use LLVM 2.0 with the following command lines: llvm-as -f -o test.bc test.ll llc -march=arm -mcpu=arm1136j-s -mattr=+v6 -f -o test.s test.bc arm-linux-gnu-as -mcpu=arm1136j-s test.s With the last command, I obtain the following error: rd and rm should be different in mul The bad instruction is
2008 Jan 14
3
[LLVMdev] llvm-gcc miscompilation or it's the gcc's rule?
Hi, Here is C function: uint64_t mul(uint32_t x, uint32_t y) { return x * y; } current llvm-gcc-4.0 with -O3 will compile it to: define i64 @mul(i32 %x, i32 %y) nounwind { entry: %tmp3 = mul i32 %y, %x ; <i32> [#uses=1] %tmp34 = zext i32 %tmp3 to i64 ; <i64> [#uses=1] ret i64 %tmp34 } This seems incorrect. I think it should extend %x, %y to i64 first and
2009 Apr 24
1
[LLVMdev] llvm-g++ doesnt support class member initialization of arrays of constants
Here is the example code: class A { const int x[5]; public: //A() { x[0] = 1; x[1] = 1; x[2] = 2; x[3] = 3; x[4] = 4; } A():x((const int[5]){1,2,3,4,5}) {} int getV(int idx) { return x[idx];} }; //const int A::x[5] = { 1, 2, 3, 4, 5 }; int main() { A a; return a.getV(1); } gcc 4.1.2 can compile the above code. llvm-gcc reports: x.cpp: In constructor \u2018A::A()\u2019: x.cpp:5:
2009 Jan 13
2
[LLVMdev] llvm-gcc doesnt honor volatile quantifier of the array type?
Hi, I encountered a problem about volatile quantifier when using llvm-gcc, here is the example: #define N 10 int sum(volatile int a[N]) { int sum = 0; unsigned i = 0; for (i = 0; i < N; ++i) sum += a[i]; return sum; } If I compile it as C code, then llvm-gcc will dump: define i32 @sum(i32* nocapture %a) nounwind { bb1.thread: %0 = volatile load i32* %a, align 4
2007 Jun 12
0
[LLVMdev] ARM backend problem ?
Hi Mikael, You are obtaining warning, not an error, right? The most arm cores, including arm1136, can execute mul with rd = rm. So, you can ignore this warning. Lauro 2007/6/12, Peltier, Mikael <m-peltier at ti.com>: > > > > > Hello, > > > > I want to compile a LLVM file into an executable running on ARM platform. > > I use LLVM 2.0 with the following
2008 May 23
1
[LLVMdev] Eliminate Store-Load pair even the LoadInst is volatile
Hi, Thanks, John, I just forgot the multi-thread issue. I'll write my own pass to handle this as for my project, it is just single-thread case. Sheng. Date: Thu, 22 May 2008 09:30:45 -0500 > From: John Criswell <criswell at cs.uiuc.edu> > Subject: Re: [LLVMdev] Eliminate Store-Load pair even the LoadInst is > volatile > To: LLVM Developers Mailing List
2006 Dec 04
0
[LLVMdev] problem using scc_iterator on CallGraph
On Sun, 3 Dec 2006, Ryan M. Lefever wrote: > I am working on a transform that uses an scc_iterator on a program's > CallGraph. However, I am running into a problem in which not all > callees are being processed before callers, leading me to believe there > might be a bug. In particular, this is happening in a case where a > callee is a function pointer. I ran bugpoint and
2008 Mar 04
0
[LLVMdev] llvm-gcc 4.2 building failed on x86-64
Hi Sheng Am Dienstag, 4. März 2008 schrieb Zhou Sheng: > Current llvm-gcc 4.2 building failed on X86-64, here is the dump I am not followng head closely but may it be that the current head still doesn't support amd64 proper: gcc README.LLVM: "When targeting non-darwin X86-64/AMD-64/EM64-T, configure with --disable-shared. The LLVM X86-64 backend doesn't support PIC codegen on
2006 Dec 04
1
[LLVMdev] problem using scc_iterator on CallGraph
I printed the call graph as you suggested. The bugpoint bytecode that I sent below prints the following call graph: Indirect call node / | | \ / | | \ V | V V execute | prog_char clear_func | | V V push_constant | V Node0x8d7b370 i.e., Indirect call node -> execute
2009 Feb 04
2
[LLVMdev] make TEST=dbgopt donesn't work?
Hi, I'm following http://llvm.org/docs/SourceLevelDebugging.html#debugopt to do the dbgopt testing. But seems, there is something wrong with the Makefile, it told me : llvm-gcc sse.expandfft.c -g --emit-llvm -c -o Output/sse.expandfft.bc llvm-gcc: sse.expandfft.c: No such file or directory llvm-gcc: no input files Am I missing something, like the configure option? -------------- next part
2008 Aug 13
4
[LLVMdev] A case where llvm created different cfg for same code
> > Message: 4 > Date: Tue, 12 Aug 2008 13:23:52 -0700 > From: "Bill Wendling" <isanbard at gmail.com> > Subject: Re: [LLVMdev] A case where llvm created different cfg for > same code > To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> > Message-ID: > <16e5fdf90808121323g1ae2a2e3lb6c5bd62521df621 at mail.gmail.com> >
2013 Oct 27
2
[LLVMdev] Missed optimization opportunity with piecewise load shift-or'd together?
The following piece of IR is a fixed point for opt -std-compile-opts/-O3: --- target datalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-unknown-linux-gnu" ; Function Attrs: nounwind readonly define i32 @get32Bits(i8*
2009 Jan 13
0
[LLVMdev] llvm-gcc doesnt honor volatile quantifier of the array type?
This looks wrong to me, though the x86 backend produces code that does the right thing (reads each element once). If you change the code (see below) to read each element twice, llvm-gcc still does the right thing but llvm-g++ does not (i.e. it fails to read aech location twice). Current versions of gcc/g++ also look wrong. All 4 compilers (gcc,g++,llvm-gcc,llvm-g++) do the right thing when