| ▲ | unsnap_biceps 3 hours ago | |
I keep waiting for a LLVM IR reverser. If there's a LLVM IR to foo reverser written, you would be able to use any language supported by LLVM and convert them to foo. It seems like a much better solution than all the disparate one-offs that exist today. | ||
| ▲ | antonvs 3 hours ago | parent [-] | |
You may be waiting a long time. Low-level IRs lose a lot of information compared to the source language - their purpose is only to execute correctly, which means a lot of the information that we depend on when reading code is eliminated. I'm reminded of Hal Abelson's quote, " "Programs must be written for people to read, and only incidentally for machines to execute." IRs are the opposite of that. In general, a reverser is going to suffer because of that. I did some reverse engineering of compiled C code back in the day. Back when compilers and CPUs were simpler, and optimizations were fewer, it was relatively straightforward for a human to do. That's no longer true. I suspect an LLM would have difficulty with it as well, plus the non-determinism that would introduce would be likely to be problematic. | ||