aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorJohannes Doerfert <johannes@jdoerfert.de>2023-01-07 01:00:14 -0800
committerJohannes Doerfert <johannes@jdoerfert.de>2023-01-10 11:38:58 -0800
commit10410534696e1922cbed56b229d123b2db4acd8e (patch)
treedb6aba40d34e6131b5b83ae0c7e8f652c3e00910 /llvm/lib/IR/Function.cpp
parentf6ce39cf1d1d80699e13cd1422f60d428e5cf0ec (diff)
downloadllvm-10410534696e1922cbed56b229d123b2db4acd8e.zip
llvm-10410534696e1922cbed56b229d123b2db4acd8e.tar.gz
llvm-10410534696e1922cbed56b229d123b2db4acd8e.tar.bz2
[CallGraph][FIX] Ensure generic intrinsics are represented in the CG
Intrinsics have historically been excluded from the call graph with an exception of 3 special ones added at some point. This meant that passes depending on the call graph needed to handle intrinsics explicitly as the underlying assumption, namely that intrinsics can't call or modify things, doesn't hold. We are slowly moving away from special handling of intrinsics, or at least towards explicitly checking what intrinsics we want to handle differently. This patch: - Includes most intrinsics in the call graph. Debug intrinsics are still excluded. - Removes the special handling of intrinsics in the GlobalsAA pass. - Removes the `IntrinsicInst::isLeaf` method. Properly Fixes: https://github.com/llvm/llvm-project/issues/52706 See also: https://discourse.llvm.org/t/intrinsics-are-not-special-stop-pretending-i-mean-it/67545 Differential Revision: https://reviews.llvm.org/D14119
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
-rw-r--r--llvm/lib/IR/Function.cpp12
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/IR/Function.cpp b/llvm/lib/IR/Function.cpp
index 0691823..694e805 100644
--- a/llvm/lib/IR/Function.cpp
+++ b/llvm/lib/IR/Function.cpp
@@ -1499,18 +1499,6 @@ bool Intrinsic::isOverloaded(ID id) {
#undef GET_INTRINSIC_OVERLOAD_TABLE
}
-bool Intrinsic::isLeaf(ID id) {
- switch (id) {
- default:
- return true;
-
- case Intrinsic::experimental_gc_statepoint:
- case Intrinsic::experimental_patchpoint_void:
- case Intrinsic::experimental_patchpoint_i64:
- return false;
- }
-}
-
/// This defines the "Intrinsic::getAttributes(ID id)" method.
#define GET_INTRINSIC_ATTRIBUTES
#include "llvm/IR/IntrinsicImpl.inc"