[LLVMdev] Making LLVM safer in out-of-memory situations

Philip Reames listmail at philipreames.com
Thu Dec 12 17:04:10 PST 2013


On 12/12/13 4:25 AM, Gasiunas, Vaidas wrote:
> Hello,
>
> Philipp Becker and me, Vaidas Gasiunas, are developers at SAP and part of a team developing a C-like domain-specific language for the SAP HANA in-memory database. We use LLVM as a backend to translate our language to native code, primarily on x86-64 platforms. Our programs are created dynamically, compiled and optimized in a running database. As a result of that we have special requirements with respect to response time and safety. In particular, we have to avoid long compile times and must deal with error situations like out-of-memory without crashing or producing memory leaks in the compiler. The compiler performance is especially important since that we must compile generated functions which tend to be rather long - in the range of thousands of LOC per function.
>
> To address these requirements we have developed a set of patches improving performance and malfunction safety of certain compiler passes and would be interested in contributing them at some point. Before proposing concrete changes, we would like to know what the general interest is with respect to making LLVM safer in out-of-memory situations.
I'm hugely in favor of the general direction.  Happy to help by 
reviewing changes and the like.

This type of work was on my long term todo list; I'm thrilled to see 
someone else doing it now.  :)

One question: How are you handling EOM?  Error return?  Custom region 
allocator?

Philip



More information about the llvm-dev mailing list