For example: introduce a pass that runs before llvm opt pipeline that removes all TBAA, changes all geps to int math, remove all nsw/nuw flags from int math, replace all undef's with 0, and 0-initialize all alloca's. That gets you very close to no UB.
-
-
It’s pretty much LLVM or GCC if you want really fast code though.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
LLVM has managed to make concessions in its UB exploitation in the past; it doesn’t fall over into the next function when you end in unreachable anymore after all
-
For things like recursion without side effects, seems like you could allow code motion and other passes to ignore nontermination while still not letting the recursion evaporate away to undef but leave a trap behind, without hurting code quality too much
- 3 more replies
New conversation -
-
-
Or you could use a real compiler like B3.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.