-
Notifications
You must be signed in to change notification settings - Fork 13.6k
[NFC] Move DroppedVariableStats code to Analysis #120502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@llvm/pr-subscribers-llvm-analysis Author: Shubham Sandeep Rastogi (rastogishubham) ChangesThis 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 #120501 Full diff: https://github.com/llvm/llvm-project/pull/120502.diff 5 Files Affected:
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
|
that introduces a circular dependency of analysis -> codegen -> target This reverts commit e389492.
that creates a circular dependency of analysis on codegen |
@metaflow Can you please tell me how I can reproduce the circular dependency? Analysis doesn't link against codegen, so I am confused as to how that happened |
@rastogishubham I was looking on bazel build, let me try to reproduce this... |
Reland "Add a pass to collect dropped var stats for MIR" (#117044) I am trying to reland llvm/llvm-project#115566 I also moved the DroppedVariableStats code to the Analysis lib This is part of a stack of patches with llvm/llvm-project#120502 being the first one in the stack
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 #120501