[llvm] 60e5fd0 - [RS4GC] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build after D125000
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat May 14 10:47:54 PDT 2022
Author: Fangrui Song
Date: 2022-05-14T10:47:50-07:00
New Revision: 60e5fd00cde3e98cc2b2b8769b5cef23c8faa1d7
URL: https://github.com/llvm/llvm-project/commit/60e5fd00cde3e98cc2b2b8769b5cef23c8faa1d7
DIFF: https://github.com/llvm/llvm-project/commit/60e5fd00cde3e98cc2b2b8769b5cef23c8faa1d7.diff
LOG: [RS4GC] Fix -Wunused-function in -DLLVM_ENABLE_ASSERTIONS=off build after D125000
Added:
Modified:
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index 3c1ccc0426b98..85dc56cf89eb8 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -396,10 +396,6 @@ static void analyzeParsePointLiveness(
Result.LiveSet = LiveSet;
}
-// Returns true if V is a BaseResult that already exists in the IR, i.e. it is
-// not created by the findBasePointers algorithm.
-static bool isOriginalBaseResult(Value *V);
-
/// Returns true if V is a known base.
static bool isKnownBase(Value *V, const IsKnownBaseMapTy &KnownBases);
@@ -713,6 +709,7 @@ static Value *findBaseOrBDV(Value *I, DefiningValueMapTy &Cache,
return Def;
}
+#ifndef NDEBUG
/// This value is a base pointer that is not generated by RS4GC, i.e. it already
/// exists in the code.
static bool isOriginalBaseResult(Value *V) {
@@ -721,6 +718,7 @@ static bool isOriginalBaseResult(Value *V) {
!isa<ExtractElementInst>(V) && !isa<InsertElementInst>(V) &&
!isa<ShuffleVectorInst>(V);
}
+#endif
static bool isKnownBase(Value *V, const IsKnownBaseMapTy &KnownBases) {
auto It = KnownBases.find(V);
More information about the llvm-commits
mailing list