[llvm] e389492 - [NFC] Move DroppedVariableStats code to Analysis (#120502)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 18 23:42:28 PST 2024
Author: Shubham Sandeep Rastogi
Date: 2024-12-18T23:42:24-08:00
New Revision: e389492d6a00e1c49a034e13343098541ebd03c6
URL: https://github.com/llvm/llvm-project/commit/e389492d6a00e1c49a034e13343098541ebd03c6
DIFF: https://github.com/llvm/llvm-project/commit/e389492d6a00e1c49a034e13343098541ebd03c6.diff
LOG: [NFC] Move DroppedVariableStats code to Analysis (#120502)
This is done because the CodeGen library and Passes library both link
against Analysis, to avoid adding a dependency between CodeGen and
Passes if we want to extend the DroppedVariableStats code for MIR stats
as well, as seen in https://github.com/llvm/llvm-project/pull/120501
Added:
llvm/include/llvm/Analysis/DroppedVariableStats.h
llvm/lib/Analysis/DroppedVariableStats.cpp
Modified:
llvm/include/llvm/Passes/StandardInstrumentations.h
llvm/lib/Analysis/CMakeLists.txt
llvm/lib/Passes/CMakeLists.txt
Removed:
llvm/include/llvm/Passes/DroppedVariableStats.h
llvm/lib/Passes/DroppedVariableStats.cpp
################################################################################
diff --git a/llvm/include/llvm/Passes/DroppedVariableStats.h b/llvm/include/llvm/Analysis/DroppedVariableStats.h
similarity index 100%
rename from llvm/include/llvm/Passes/DroppedVariableStats.h
rename to llvm/include/llvm/Analysis/DroppedVariableStats.h
diff --git a/llvm/include/llvm/Passes/StandardInstrumentations.h b/llvm/include/llvm/Passes/StandardInstrumentations.h
index 6ba466f9269f09..23bfee7115df6f 100644
--- a/llvm/include/llvm/Passes/StandardInstrumentations.h
+++ b/llvm/include/llvm/Passes/StandardInstrumentations.h
@@ -19,13 +19,13 @@
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSet.h"
+#include "llvm/Analysis/DroppedVariableStats.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/IR/BasicBlock.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/OptBisect.h"
#include "llvm/IR/PassTimingInfo.h"
#include "llvm/IR/ValueHandle.h"
-#include "llvm/Passes/DroppedVariableStats.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/TimeProfiler.h"
#include "llvm/Transforms/IPO/SampleProfileProbe.h"
diff --git a/llvm/lib/Analysis/CMakeLists.txt b/llvm/lib/Analysis/CMakeLists.txt
index 0db5b80f336cb5..5cf3777253fbe4 100644
--- a/llvm/lib/Analysis/CMakeLists.txt
+++ b/llvm/lib/Analysis/CMakeLists.txt
@@ -60,6 +60,7 @@ add_llvm_component_library(LLVMAnalysis
DomPrinter.cpp
DomTreeUpdater.cpp
DominanceFrontier.cpp
+ DroppedVariableStats.cpp
DXILResource.cpp
DXILMetadataAnalysis.cpp
FunctionPropertiesAnalysis.cpp
diff --git a/llvm/lib/Passes/DroppedVariableStats.cpp b/llvm/lib/Analysis/DroppedVariableStats.cpp
similarity index 99%
rename from llvm/lib/Passes/DroppedVariableStats.cpp
rename to llvm/lib/Analysis/DroppedVariableStats.cpp
index 5dc6b75fb8ace9..7162cece4f3d9b 100644
--- a/llvm/lib/Passes/DroppedVariableStats.cpp
+++ b/llvm/lib/Analysis/DroppedVariableStats.cpp
@@ -11,7 +11,7 @@
///
///===---------------------------------------------------------------------===//
-#include "llvm/Passes/DroppedVariableStats.h"
+#include "llvm/Analysis/DroppedVariableStats.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Module.h"
diff --git a/llvm/lib/Passes/CMakeLists.txt b/llvm/lib/Passes/CMakeLists.txt
index 9e16a446c9b399..6425f4934b2103 100644
--- a/llvm/lib/Passes/CMakeLists.txt
+++ b/llvm/lib/Passes/CMakeLists.txt
@@ -1,6 +1,5 @@
add_llvm_component_library(LLVMPasses
CodeGenPassBuilder.cpp
- DroppedVariableStats.cpp
OptimizationLevel.cpp
PassBuilder.cpp
PassBuilderBindings.cpp
More information about the llvm-commits
mailing list