summaryrefslogtreecommitdiff
path: root/include/llvm/Intrinsics.td
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-09-09 07:50:37 +0000
committerDuncan Sands <baldrick@free.fr>2011-09-09 07:50:37 +0000
commit73c8415d90ad5a702538d8bc308411e7b2299f32 (patch)
tree84a547927ab39254ab2a3f0560201bd60b1e98d8 /include/llvm/Intrinsics.td
parentd3be6ecafec0068e70d034f6467b1d6acf1cb806 (diff)
downloadllvm-73c8415d90ad5a702538d8bc308411e7b2299f32.tar.gz
llvm-73c8415d90ad5a702538d8bc308411e7b2299f32.tar.bz2
llvm-73c8415d90ad5a702538d8bc308411e7b2299f32.tar.xz
Mark the eh.typeid.for intrinsic as being 'const', which it is inside
any given function. As pointed out by John McCall, this is needed to have redundant eh.typeid.for tests be eliminated in the presence of cleanups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139360 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Intrinsics.td')
-rw-r--r--include/llvm/Intrinsics.td4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/Intrinsics.td b/include/llvm/Intrinsics.td
index b7b4e7cc06..c526301bf9 100644
--- a/include/llvm/Intrinsics.td
+++ b/include/llvm/Intrinsics.td
@@ -309,7 +309,9 @@ def int_eh_selector : Intrinsic<[llvm_i32_ty],
[llvm_ptr_ty, llvm_ptr_ty, llvm_vararg_ty]>;
def int_eh_resume : Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty], [Throws]>;
-def int_eh_typeid_for : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrReadMem]>;
+// The result of eh.typeid.for depends on the enclosing function, but inside a
+// given function it is 'const' and may be CSE'd etc.
+def int_eh_typeid_for : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty], [IntrNoMem]>;
def int_eh_return_i32 : Intrinsic<[], [llvm_i32_ty, llvm_ptr_ty]>;
def int_eh_return_i64 : Intrinsic<[], [llvm_i64_ty, llvm_ptr_ty]>;