This prevents LLVM from removing calls to functions if that function may not terminate. This was previously done by several passes (including ADCE and the inliner) in cases where the callee is otherwise side-effect free.
The actual fix is in Instruction.{h,cpp}, the rest of the changes are fixing up passes that were relying on the old behaviour, in cases such as intrinsics and known library functions where it is still safe to do this.
A few of the tests had to be modified as they were checking that calls were removed when this this is not safe to do so. The only test I am concerned about is LTO/X86/parallel.ll, which appears to be the only test for parallel LTO. I've relaxed it so that it passes, but I'm not sure if it is really testing the functionality any more.
It looks like many of these entries are shared with the switch in hasOptimizedCodeGen(). Could you consider sharing some of this code?