fixed some bugs; added support for dvars in llvm code (untested)