Add an @llvm.sideeffect intrinsic
This patch implements Chandler's idea  for supporting languages that
require support for infinite loops with side effects, such as Rust, providing
part of a solution to bug 965 .
Specifically, it adds an llvm.sideeffect() intrinsic, which has no actual
effect, but which appears to optimization passes to have obscure side effects,
such that they don't optimize away loops containing it. It also teaches
several optimization passes to ignore this intrinsic, so that it doesn't
significantly impact optimization in most cases.
As discussed on llvm-dev , this patch is the first of two major parts.
The second part, to change LLVM's semantics to have defined behavior
on infinite loops by default, with a function attribute for opting into
potential-undefined-behavior, will be implemented and posted for review in
a separate patch.
Differential Revision: https://reviews.llvm.org/D38336