Hi all, We are looking to try and reduce the size of the clang and LLVM libraries and were wondering if anyone had any advice on how to do this. All we want is to be able to compile from a single language to a single back-end and for that back-end to emit instructions; we don't care about anything else. Currently we are building LLVM to use only our target, so that is OK. Is it possible to build clang with support for only one language? Or does anyone else have any tips about how to reduce the size of the libraries? Thanks for your help, Rob
Hi Rob, There is no way to compile Clang to support only one language right now, and it would probably provide only a marginal size win. Your best place to focus attention is on pieces of the LLVM backend that you don't need. For example, I added support for reading LLVM files directly which added in the asmparser library, but you can get eliminate that (with some code editing, we don't currently have any support for conditionalizing these things). Note that compiling with Clang or llvm-gcc, especially at -Os, will also give a pretty major code size improvement. - Daniel On Thu, Jun 10, 2010 at 6:06 AM, Robert Quill <robert.quill at imgtec.com> wrote:> Hi all, > > We are looking to try and reduce the size of the clang and LLVM > libraries and were wondering if anyone had any advice on how to do this. > All we want is to be able to compile from a single language to a single > back-end and for that back-end to emit instructions; we don't care about > anything else. Currently we are building LLVM to use only our target, so > that is OK. Is it possible to build clang with support for only one > language? Or does anyone else have any tips about how to reduce the size > of the libraries? > > Thanks for your help, > Rob > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
On 10 June 2010 09:06, Robert Quill <robert.quill at imgtec.com> wrote:> Hi all, > > We are looking to try and reduce the size of the clang and LLVM > libraries and were wondering if anyone had any advice on how to do this. > All we want is to be able to compile from a single language to a single > back-end and for that back-end to emit instructions; we don't care about > anything else. Currently we are building LLVM to use only our target, so > that is OK. Is it possible to build clang with support for only one > language? Or does anyone else have any tips about how to reduce the size > of the libraries?If you don't use plugins, dropping the --export-dynamic should help.> Thanks for your help, > Rob >Cheers, -- Rafael Ávila de Espíndola
Hi Robert, Try removing intrinsics you don't need. In particular in Intrinsics.td you can comment out some of the includes at the bottom of the file. Cheers, Nicolas -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Robert Quill Sent: Thursday, June 10, 2010 15:06 To: cfe-dev at cs.uiuc.edu; llvmdev at cs.uiuc.edu Subject: [LLVMdev] Reducing the size of LLVM and clang Hi all, We are looking to try and reduce the size of the clang and LLVM libraries and were wondering if anyone had any advice on how to do this. All we want is to be able to compile from a single language to a single back-end and for that back-end to emit instructions; we don't care about anything else. Currently we are building LLVM to use only our target, so that is OK. Is it possible to build clang with support for only one language? Or does anyone else have any tips about how to reduce the size of the libraries? Thanks for your help, Rob _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Apparently Analagous Threads
- [LLVMdev] Back-end with general purpose registers
- [LLVMdev] [cfe-dev] Reducing the size of LLVM and clang
- [LLVMdev] Detrimental optimization for reducing relocations.
- [LLVMdev] Detrimental optimization for reducing relocations.
- [LLVMdev] Detrimental optimization for reducing relocations.