forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Any benchmarks between LLVM vs GCC on Allegrex code?

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Thu Jan 08, 2009 6:43 am    Post subject: Any benchmarks between LLVM vs GCC on Allegrex code? Reply with quote

There are lots of benchmarks about LLVM vs GCC but I haven't found any about the MIPS Allregrex code? did anyone tried to compare it?

I'd like to know which one generates "better" code. I really like LLVM and learning its code is simpler than GCC (IMHO).

It could give some people interest to improve the LLVM backend to support VFPU instructions.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
hlide



Joined: 10 Sep 2006
Posts: 750

PostPosted: Fri Jan 09, 2009 11:35 pm    Post subject: Reply with quote

MIPS LLVM is still experimental and incomplete. I wouldn't expect too much about LLVM for MIPS.

But, yes, if it could be complete, it would be interesting to add VFPU. But i'm quite sceptical as it is a long time ago MIPS LLVM was started and it still doesn't seem to progress.
Back to top
View user's profile Send private message
Heimdall



Joined: 10 Nov 2005
Posts: 259
Location: Netherlands

PostPosted: Sat Jan 10, 2009 1:37 am    Post subject: Reply with quote

Yeap it is true, i only tried some simple bitcode:

Code:
; Declare the string constant as a global constant...
@.LC0 = internal constant [13 x i8] c"hello world\0A\00"          ; [13 x i8]*

; External declaration of the puts function
declare i32 @puts(i8 *)                                            ; i32(i8 *)*

; Definition of main function
define i32 @main() {                                                 ; i32()*
       ; Convert [13x i8 ]* to i8  *...
       %cast210 = getelementptr [13 x i8 ]* @.LC0, i64 0, i64 0 ; i8 *

       ; Call puts function to write out the string to stdout...
       call i32 @puts(i8 * %cast210)                              ; i32
       ret i32 0
}


the just used the commands:

Code:
llvm-as hello.ll
opt hello.bc -o hello.opt.bc
# doesn't give anything extra in optimization
llc -march=mips -mcpu=allegrex hello.bc
psp-gcc -c hello.s -o hello.o

# now i can link the object file with psp-gcc and run it on the PSP but this is no test at all...
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group