from Hacker News

Ask HN: Fun and exotic things you've done using LLVM?

by jsomedon on 5/4/20, 4:41 AM with 1 comments

I was reading this post about LLVM(https://www.cs.cornell.edu/~asampson/blog/llvm.html) and I found it's amazing that LLVM can do lots of things other than just building compiler with it. So I thought maybe you folks here on HN have done some fun things with LLVM too and could talk about it?
  • by fundamental on 5/4/20, 1:56 PM

    I've used LLVM for some light callgraph analysis to identify when hazardous functions can be called from a 'safe' function. The main application is for realtime audio processing where dynamic memory allocation, IO, and blocking locks can introduce bugs (due to their latency characteristics). Nothing all that fancy, though reconstructing class hierarchies, vtables, templates, etc was a learning curve.

    repo: https://github.com/fundamental/stoat