[LLVMdev] Disabling rtti on default build - could it be reverted/re-enabled?

Heikki Kultala hkultala at cs.tut.fi
Wed Feb 17 03:15:18 PST 2010

We at Tampere University of technology are using LLVM for high-level 
optimizations in the compiler for our TTA processor toolkit(TCE)

We have a llvm backend which creates our own intermediate code, and our 
own instruction selector after that (as LLVM's machine code cannot 
represent the actual machine codes of our processors).

This makes our llvm backend quite different from the ordinary llvm 
backends, and we have to link lots of code to same binaries which also 
link to llvm libraries.

LLVM 2.7 is dropping rtti on default build, which is a problem to us.
We are using Boost libraries on many places in our code, and Boost has 
some heavy usage of type info tricks, which cannot be compiled without 
rtti, so we have to keep rtti on for our code.

But our code also implements the llvm backend framework classes, which 
are compiled without rtti , which causes problems; we cannot derive from 
the non-rtti enabled base classes with derived classes that are compiled 
with rtti on.

So could rtti be turned on for default builds of llvm so that we could 
continue using (non-customized) llvm libraries for our compiler?

Just having rtti on should not cause you any performance deficits, just 
causes some extra typeinfo methods to be created to your binaries, and 
these should be quite small so they should not make them much larger.

More information about the llvm-dev mailing list