Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Precision Opportunities for Demanded Bits in LLVM (regehr.org)
54 points by luu on Jan 25, 2020 | hide | past | favorite | 7 comments


Nice, but I wonder if applying an SMT solver to just about every instruction in your program isn't likely to blow up sometimes. The solver is, after all, worst case NP complete.


The previous post states that the goal is to use the SMT solver offline to identify opportunities for improving the compiler: https://blog.regehr.org/archives/1709. Using the solver online isn't the goal.


Compilers don't need an exact solution, so they can always fall back to the simple heuristics based approach when the SMT based analysis is too expensive.


Not really, since the input of the solver is bounded by the native word size of the architecture.


It still might try to do 2^64 operations then.


Solvers already can only step into smthg like 5 iterations of each loop. See klee or cbmc. This project is much easier, just a lot of insns.


Does anyone know how do LLVM's demanded bits compare to 'stamps' in compilers like Graal?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: