Rather than having special rules like "intrinsics cannot
throw exceptions", just mark intrinsics with the nounwind
attribute.  Likewise, mark intrinsics as readnone/readonly
and get rid of special aliasing logic (which didn't use
anything more than this anyway).

llvm-svn: 44544
diff --git a/llvm/lib/VMCore/Instructions.cpp b/llvm/lib/VMCore/Instructions.cpp
index 7ad588c..0df0466 100644
--- a/llvm/lib/VMCore/Instructions.cpp
+++ b/llvm/lib/VMCore/Instructions.cpp
@@ -53,7 +53,18 @@
   else
     return cast<InvokeInst>(I)->paramHasAttr(i, attr);
 }
-
+bool CallSite::doesNotAccessMemory() const {
+  if (CallInst *CI = dyn_cast<CallInst>(I))
+    return CI->doesNotAccessMemory();
+  else
+    return cast<InvokeInst>(I)->doesNotAccessMemory();
+}
+bool CallSite::onlyReadsMemory() const {
+  if (CallInst *CI = dyn_cast<CallInst>(I))
+    return CI->onlyReadsMemory();
+  else
+    return cast<InvokeInst>(I)->onlyReadsMemory();
+}