[clang] 2757085 - [clang][dataflow][NFC] Delete unused function. (#65602)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 11 00:54:53 PDT 2023
Author: martinboehme
Date: 2023-09-11T09:54:50+02:00
New Revision: 2757085e90823431cbaf96e5cc93cf7a73b8bdbd
URL: https://github.com/llvm/llvm-project/commit/2757085e90823431cbaf96e5cc93cf7a73b8bdbd
DIFF: https://github.com/llvm/llvm-project/commit/2757085e90823431cbaf96e5cc93cf7a73b8bdbd.diff
LOG: [clang][dataflow][NFC] Delete unused function. (#65602)
I'm not sure why we had this originally, but the function seems to have
a pretty
onerous contract anyway for a function that is externally available, so
it seems
better not to keep it around.
Added:
Modified:
clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
Removed:
################################################################################
diff --git a/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
index 88a33d19f7d8f61..67c323dbf45e1b2 100644
--- a/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
+++ b/clang/include/clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h
@@ -132,25 +132,6 @@ struct TypeErasedDataflowAnalysisState {
}
};
-/// Transfers the state of a basic block by evaluating each of its elements in
-/// the context of `Analysis` and the states of its predecessors that are
-/// available in `BlockStates`. `PostVisitCFG` (if provided) will be applied to
-/// each element in the block, after it is evaluated.
-///
-/// Requirements:
-///
-/// All predecessors of `Block` except those with loop back edges must have
-/// already been transferred. States in `BlockStates` that are set to
-/// `std::nullopt` represent basic blocks that are not evaluated yet.
-TypeErasedDataflowAnalysisState transferBlock(
- const ControlFlowContext &CFCtx,
- llvm::ArrayRef<std::optional<TypeErasedDataflowAnalysisState>> BlockStates,
- const CFGBlock &Block, const Environment &InitEnv,
- TypeErasedDataflowAnalysis &Analysis,
- std::function<void(const CFGElement &,
- const TypeErasedDataflowAnalysisState &)>
- PostVisitCFG = nullptr);
-
/// Performs dataflow analysis and returns a mapping from basic block IDs to
/// dataflow analysis states that model the respective basic blocks. Indices of
/// the returned vector correspond to basic block IDs. Returns an error if the
diff --git a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
index 626b57b43755ec7..900aa97e9f6de64 100644
--- a/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
+++ b/clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
@@ -495,18 +495,6 @@ transferCFGBlock(const CFGBlock &Block, AnalysisContext &AC,
return State;
}
-TypeErasedDataflowAnalysisState transferBlock(
- const ControlFlowContext &CFCtx,
- llvm::ArrayRef<std::optional<TypeErasedDataflowAnalysisState>> BlockStates,
- const CFGBlock &Block, const Environment &InitEnv,
- TypeErasedDataflowAnalysis &Analysis,
- std::function<void(const CFGElement &,
- const TypeErasedDataflowAnalysisState &)>
- PostVisitCFG) {
- AnalysisContext AC(CFCtx, Analysis, InitEnv, BlockStates);
- return transferCFGBlock(Block, AC, PostVisitCFG);
-}
-
llvm::Expected<std::vector<std::optional<TypeErasedDataflowAnalysisState>>>
runTypeErasedDataflowAnalysis(
const ControlFlowContext &CFCtx, TypeErasedDataflowAnalysis &Analysis,
More information about the cfe-commits
mailing list