《003--肖玮.pdf》由会员分享,可在线阅读,更多相关《003--肖玮.pdf(21页珍藏版)》请在三个皮匠报告上搜索。
1、LLVM RISC-V Retrospect&Outlook回顾与展望肖玮 Wei Xiao()Contributors:刘天乐 Tianle Liu()王天晴 Tianqing Wang()闻浩海 Haohai Wen()裴根 Gen Pei()AgendaSATG|SOFTWARE AND ADVANCED TECHNOLOGY GROUP2 LLVM RISC-V Target Support Overview LLVM Architecture Overview RISC-V&LLVM FE RISC-V&LLVM ME RISC-V&LLVM BE RISC-V Performanc
2、e Analysis w/QEMULLVM RISC-V Target Support Overview Base ISAs Extensions Experimental Extensionsexperimental-zacasexperimental-zihintntlexperimental-zvfhexperimental-zca Vendor ExtensionsXVentanaCondOpsXTHeadVdotXSfvcp Profilesrvi20u32rvi20u64SATG|SOFTWARE AND ADVANCED TECHNOLOGY GROUP3LLVM Archite
3、cture Overview Classical design to support multiple source languages or target architectures Serves a broader set of programmers which naturally leads to more enhancements andimprovements to the compiler LLVM IR is a Complete Code Representation LLVM is a Collection of LibrariesSATG|SOFTWARE AND ADV
4、ANCED TECHNOLOGY GROUP4Source codeX86 IR from FERISCV IR from FEComment of RISCV(Xlen=64)struct A intint%struct.A=type i32,i32 define dso_local i64 _Z5myfunv()%struct.A=type i32,i32 define dso_local i64 _Z5myfunv()Aggregates which are=2*XLEN will be passed in registers if possiblestruct A longint%st
5、ruct.A=type i64,i32 define dso_local i64,i32 _Z5myfunv()%struct.A=type i64,i32 define dso_local 2 x i64 _Z5myfunv()Use a single XLEN int if possible,2*XLEN if 2*XLEN alignment is required,and a 2-element XLEN array if only XLEN alignment is required.struct A long*int%struct.A=type ptr,i32 define dso
6、_local ptr,i32 _Z5myfunv()%struct.A=type ptr,i32 define dso_local 2 x i64 _Z5myfunv()struct A long double%struct.A=type i64,double define dso_local i64,double _Z5myfunv()%struct.A=type i64,double define dso_local i64,double _Z5myfunv()Determine if a struct is eligible for passing according to the fl