search for: zhousheng00

Displaying 20 results from an estimated 31 matches for "zhousheng00".

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
2010 Nov 10
1
[LLVMdev] Fw: llvm-gcc not compatible with gcc on a small case?
Whoops, forgot to CC: the list. > >----- Forwarded Message ---- >From: Samuel Crow <samuraileumas at yahoo.com> >To: Sheng Zhou <zhousheng00 at gmail.com> >Sent: Tue, November 9, 2010 9:26:51 PM >Subject: Re: [LLVMdev] llvm-gcc not compatible with gcc on a small case? > > >Hi Sheng Zhou, > > >It shouldn't compile. You have the method declared inside the templated class >thus indicating infinite recur...
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:
2006 Oct 17
0
[LLVMdev] Signedness Elminiation
All, Please welcome Zhou Sheng <zhousheng00 at gmail.com> to the LLVM development community. Sheng is from Beijing and is a Masters student at the University there. Sheng and I will be working together on some significant changes to LLVM in the coming months. Our first task is to implement integer types without signs in LLVM. You can re...
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 Aug 12
0
[LLVMdev] A case where llvm created different cfg for same code
Hi, The following two segments of code are actually the same, but llvm created different cfg for them. Form1: 1 #define N 10 2 int test(int A[N][N]) 3 { 4 int i, j; 5 int result =0; 6 for(j=0; j+2<N; ++j) { 7 //for(i=0; i<j && i+j+1<N; i++) { 8 for(i=0; i<j && i<N-j-1; i++) { 9 A[i+j+1][j] = A[j + 2][j-i] + i; 10 } 11 } 12 13 for (i=0; i<N-2; ++i) 14 for (j=0;
2008 Sep 07
0
[LLVMdev] A simple case about SDiv
Hi, >Hello, > >> eh... I got some error as following: >> llvm-gcc -O2 -mllvm -disable-llvm-optzns -emit-llvm -c test.c -o >test.ll -S >You need to pass these pair of options directly to cc1, driver is >breaking them. Yes, you are right. Thanks for pointing out that. Sheng. >-- >WBR, Anton Korobeynikov -------------- next part -------------- An HTML
2008 Nov 12
1
[LLVMdev] Possible bug in ScalarEvolution
Hi, I'm using pass ScalarEvolution to analyze the loop trip count on my application. And I found a possible bug in the code, that is in function SCEVAddRecExpr::getNumIterationsInRange(), Line 2905: 2904 // The exit value should be (End+A)/A. 2905 APInt ExitVal = (End + A).udiv(A); 2906 ConstantInt *ExitValue = ConstantInt::get(ExitVal); The divide should be sdiv, right?
2010 Aug 05
0
[LLVMdev] AutoESL is hiring
AutoESL (www.autoesl.com) is the leading provider of high-level synthesis for FPGAs and ASICs. The company was founded in 2006 based on advanced technology that was nurtured, developed, and exclusively licensed from UCLA. AutoESL has now deployed this solution at many leading edge system and semiconductor companies. (see more in the "About Us" section). Currently AutoESL has several
2006 Sep 14
1
[LLVMdev] Hello World crashes!
Hi, Sorry for the newbie question. I downloaded llvm 1.8a and llvm-gcc3.4, tried out the simple "Hello, World" program but got the following error. My system is RedHat 9 $ ./hello lli: /home//llvm/lib/Target/X86/X86CodeEmitter.cpp:208: unsigned char ModRMByte(unsigned int, unsigned int, unsigned int): Assertion `Mod < 4 && RegOpcode < 8 && RM < 8 &&
2006 Sep 16
0
[LLVMdev] cpp program crashes
Hi, Sorry for the newbie question. I downloaded llvm 1.8a and llvm-gcc3.4-binary, tried out the simple cpp program like this: #include <iostream> using std::cout; using std::endl; int main() { cout << "Hello World" << endl; return 0; } but got the following error: lli((anonymous namespace)::PrintStackTrace()+0x15)[0x85c4d85]
2007 Nov 22
0
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
Hi, 2007/11/22, Duncan Sands <baldrick at free.fr>: > > PS: It is possible that the C front-end doesn't need to > explicitly produce BUILT_IN_POW because it is auto-synthesized > somehow from a call to "pow". I wouldn't know. One way to > find out is to compile a testcase and rummage around inside > the gcc trees when they hit llvm-convert. Yes, they
2007 Nov 23
1
[LLVMdev] Will any pass change simple return branch into select/return pair?
Hi, Can any llvm pass change simple return branch into select/return pair? For example: define i10 @mod_N(i10 zeroext %a) zeroext { entry: %tmp2 = icmp ugt i10 %a, -400 ; <i1> [#uses=1] br i1 %tmp2, label %cond_true, label %return cond_true: ; preds = %entry %tmp5 = add i10 %a, 400 ; <i10> [#uses=1] ret i10 %tmp5 return: ; preds = %entry ret
2007 Dec 03
1
[LLVMdev] lli interpreter crashed for integer type whose bitwidth > 64
Hi, The lli interpreter crashed for the following case: ; ModuleID = 'x.c' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple = "i686-pc-linux-gnu" define i32 @main() { entry: %retval = alloca i32 ; <i32*> [#uses=2] %tmp = alloca i32 ;
2008 Jan 06
1
[LLVMdev] How to build static linked llvm?
Hi, Does anybody know that how to build static linked lli or llc? I tried several options like --enable-static or LDFLAGS=-static, but still get dynamic linked llvm. Thanks in advance. Sheng. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080106/c92c31fc/attachment.html>
2008 Jun 05
0
[LLVMdev] A question about CBackend.cpp
Hi, I'm reading the code in CBackend.cpp and found some wired chunk in void CWriter::printConstant(Constant *CPV) 938 if (ConstantInt *CI = dyn_cast<ConstantInt>(CPV)) { 939 const Type* Ty = CI->getType(); 940 if (Ty == Type::Int1Ty) 941 Out << (CI->getZExtValue() ? '1' : '0'); 942 else if (Ty == Type::Int32Ty) 943 Out << CI->getZExtValue() <<
2007 Nov 22
2
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
Hi, Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and llvm.sin.* For example: double foo(double x, double y) { return pow(x,y); } will compiled into ll: define double @foo(double %x, double %y) { %tmp3 = tail call double @pow( double %x, double %y ) ret double %tmp3 } This is not consistent with llvm language reference. -------------- next part -------------- An
2008 Sep 04
2
[LLVMdev] A simple case about SDiv
Hi Duncan, Thanks for your help. But seems "opt -std-compile-opts" can't do this simplication :( Any ideas? Sheng. 2008/9/4 Duncan Sands <baldrick at free.fr> > > I tried several passes, like -instcombine, -simplifycfg, -gcse -globaldce > > -globalopt -adce , but all failed to do this transform. > > Try "opt -std-compile-opts
2006 Oct 08
2
[LLVMdev] How to insert two instructions with the same name?
Hi, 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. Actually, i found that sometimes, llvm will create bytecode containing two instructions with same name. So, how can
2007 Nov 22
2
[LLVMdev] llvm-gcc cannot emit @llvm.pow.* ?
2007/11/22, Duncan Sands <baldrick at free.fr>: > > Hi, > > > Current llvm-gcc cannot emit llvm intrinsic function like llvm.pow.* and > > llvm.sin.* > > For example: > > > > double foo(double x, double y) { > > return pow(x,y); > > } > > > > will compiled into ll: > > > > define double @foo(double %x, double %y) {