Skip to content

Commit 38a6525

Browse files
committed
[Support] Move OptimizationLevel to the Support directory
Sometimes code depends upon the constant variables declared in OptimizationLevel (e.g. see #156802), which then requires them to add a dependency on the Passes directory. Given that code is much more likely to depend upon Support than Passes I believe it makes sense to move OptimizationLevel to Support. The Passes component already depends upon Support.
1 parent 018dc1b commit 38a6525

File tree

16 files changed

+15
-15
lines changed

16 files changed

+15
-15
lines changed

clang/examples/LLVMPrintFunctionNames/LLVMPrintFunctionNames.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
#include "clang/Sema/Sema.h"
2121
#include "llvm/IR/Module.h"
2222
#include "llvm/IR/PassManager.h"
23-
#include "llvm/Passes/OptimizationLevel.h"
2423
#include "llvm/Passes/PassBuilder.h"
24+
#include "llvm/Support/OptimizationLevel.h"
2525
#include "llvm/Support/raw_ostream.h"
2626
using namespace clang;
2727

clang/tools/clang-fuzzer/handle-llvm/handle_llvm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
#include "llvm/IRPrinter/IRPrintingPasses.h"
3535
#include "llvm/IRReader/IRReader.h"
3636
#include "llvm/MC/TargetRegistry.h"
37-
#include "llvm/Passes/OptimizationLevel.h"
3837
#include "llvm/Passes/PassBuilder.h"
3938
#include "llvm/Support/MemoryBuffer.h"
39+
#include "llvm/Support/OptimizationLevel.h"
4040
#include "llvm/Support/SourceMgr.h"
4141
#include "llvm/Support/TargetSelect.h"
4242
#include "llvm/Target/TargetMachine.h"

flang/include/flang/Optimizer/Passes/CommandLineOpts.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
#define FORTRAN_OPTIMIZER_PASSES_COMMANDLINEOPTS_H
1414

1515
#include "llvm/Frontend/Debug/Options.h"
16-
#include "llvm/Passes/OptimizationLevel.h"
1716
#include "llvm/Support/CommandLine.h"
17+
#include "llvm/Support/OptimizationLevel.h"
1818

1919
/// Shared option in tools to control whether dynamically sized array
2020
/// allocations should always be on the heap.

flang/include/flang/Optimizer/Passes/Pipelines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
2727
#include "mlir/Transforms/Passes.h"
2828
#include "llvm/Frontend/Debug/Options.h"
29-
#include "llvm/Passes/OptimizationLevel.h"
3029
#include "llvm/Support/CommandLine.h"
30+
#include "llvm/Support/OptimizationLevel.h"
3131

3232
namespace fir {
3333

flang/include/flang/Tools/CrossToolHelpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "mlir/Pass/PassRegistry.h"
2424
#include "llvm/ADT/SmallVector.h"
2525
#include "llvm/Frontend/Debug/Options.h"
26-
#include "llvm/Passes/OptimizationLevel.h"
26+
#include "llvm/Support/OptimizationLevel.h"
2727

2828
// Flang Extension Point Callbacks
2929
class FlangEPCallBacks {

flang/tools/bbc/bbc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@
5656
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
5757
#include "mlir/Transforms/Passes.h"
5858
#include "llvm/MC/TargetRegistry.h"
59-
#include "llvm/Passes/OptimizationLevel.h"
6059
#include "llvm/Support/CommandLine.h"
6160
#include "llvm/Support/ErrorOr.h"
6261
#include "llvm/Support/FileSystem.h"
6362
#include "llvm/Support/InitLLVM.h"
6463
#include "llvm/Support/MemoryBuffer.h"
64+
#include "llvm/Support/OptimizationLevel.h"
6565
#include "llvm/Support/Path.h"
6666
#include "llvm/Support/SourceMgr.h"
6767
#include "llvm/Support/TargetSelect.h"

flang/tools/tco/tco.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
#include "mlir/Pass/Pass.h"
2727
#include "mlir/Pass/PassManager.h"
2828
#include "mlir/Transforms/Passes.h"
29-
#include "llvm/Passes/OptimizationLevel.h"
3029
#include "llvm/Support/CommandLine.h"
3130
#include "llvm/Support/ErrorOr.h"
3231
#include "llvm/Support/FileSystem.h"
3332
#include "llvm/Support/InitLLVM.h"
3433
#include "llvm/Support/MemoryBuffer.h"
34+
#include "llvm/Support/OptimizationLevel.h"
3535
#include "llvm/Support/SourceMgr.h"
3636
#include "llvm/Support/TargetSelect.h"
3737
#include "llvm/Support/ToolOutputFile.h"

llvm/include/llvm/Passes/PassBuilder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
#include "llvm/CodeGen/MachinePassManager.h"
2020
#include "llvm/CodeGen/RegAllocCommon.h"
2121
#include "llvm/IR/PassManager.h"
22-
#include "llvm/Passes/OptimizationLevel.h"
2322
#include "llvm/Support/Compiler.h"
2423
#include "llvm/Support/Error.h"
24+
#include "llvm/Support/OptimizationLevel.h"
2525
#include "llvm/Support/PGOOptions.h"
2626
#include "llvm/Support/raw_ostream.h"
2727
#include "llvm/Transforms/IPO/Inliner.h"

llvm/lib/Passes/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
add_llvm_component_library(LLVMPasses
22
CodeGenPassBuilder.cpp
3-
OptimizationLevel.cpp
43
PassBuilder.cpp
54
PassBuilderBindings.cpp
65
PassBuilderPipelines.cpp

0 commit comments

Comments
 (0)