Hi, We are working on a project to improve garbage collection using pool allocation in llvm. Has anybody implemented any garbage collection algorithm in llvm? There is an incomplete semispace GC implementation in llvm. It will be of great help, if somebody has a complete GC implementation. Regards, Swarup. ************************************* Swarup Kumar Sahoo Thomas M. Siebel Center for Computer Science University of Illinois at Urbana Champaign 201 N Goodwin Avenue Urbana, IL-61801 Phone - 614 264 9574
I tried to optimize the following code using opt -load-vn -sccp -dcse, but no effect. The loading and storing of unique should be removed, and branch should be statically evaluated. Any suggestions? The code: %tmp.0 = call int %acquireLock( ) ; <int> [#uses=0] store int 1, int* %unique %load = load int* %unique ; <int> [#uses=1] %Set = seteq int 1, %load ; <bool> [#uses=1] br bool %Set, label %Insertion, label %remaining Insertion: ; preds = %entry call int %releaseLock( ) ; <int>:0 [#uses=0] br label %remaining remaining: ; preds = %Insertion, %entry %tmp.1 = call int %acquireLock( ) ; <int> [#uses=0] %tmp.2 = call int %releaseLock( ) Note: %unique = internal global int 0 ; <int*> [#uses=2]
On Mon, 5 Dec 2005, Umar Janjua wrote:> > I tried to optimize the following code using opt -load-vn -sccp -dcse, but no > effect. The loading and storing of unique should be removed, and branch should > be statically evaluated.Without a testable testcase, it's hard to say, however -load-vn -gcse should do it, allowing -instcombine -simplifycfg to constant prop and nuke the branch. -Chris> The code: > > %tmp.0 = call int %acquireLock( ) ; <int> [#uses=0] > store int 1, int* %unique > %load = load int* %unique ; <int> [#uses=1] > %Set = seteq int 1, %load ; <bool> [#uses=1] > br bool %Set, label %Insertion, label %remaining > > Insertion: ; preds = %entry > call int %releaseLock( ) ; <int>:0 [#uses=0] > br label %remaining > > remaining: ; preds = %Insertion, %entry > %tmp.1 = call int %acquireLock( ) ; <int> [#uses=0] > %tmp.2 = call int %releaseLock( ) > > Note: > > %unique = internal global int 0 ; <int*> [#uses=2] > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.org/