About to watch the video, In the past I've thought about trying to model llvm code inside datomic and doing transforms with the help of datalog queries.
People have done something like this for pointer analysis (statically determining to which memory locations a pointer can point, which is a prerequisite for many optimizations), e.g. http://yanniss.github.io/doop-datalog2.0.pdf