[PATCH] D87845: [LowerTypeTests][NewPM] Add constructor that uses command line flags
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 17:40:19 PDT 2020
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG83e3ea2cfce6: [LowerTypeTests][NewPM] Add constructor that uses command line flags (authored by aeubanks).
Changed prior to commit:
https://reviews.llvm.org/D87845?vs=292565&id=294465#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87845/new/
https://reviews.llvm.org/D87845
Files:
llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
llvm/lib/Passes/PassRegistry.def
llvm/lib/Transforms/IPO/LowerTypeTests.cpp
llvm/test/Transforms/LowerTypeTests/simple.ll
Index: llvm/test/Transforms/LowerTypeTests/simple.ll
===================================================================
--- llvm/test/Transforms/LowerTypeTests/simple.ll
+++ llvm/test/Transforms/LowerTypeTests/simple.ll
@@ -1,3 +1,4 @@
+; RUN: opt -S -passes=lowertypetests < %s | FileCheck %s
; RUN: opt -S -lowertypetests < %s | FileCheck %s
; RUN: opt -S -lowertypetests -mtriple=x86_64-apple-macosx10.8.0 < %s | FileCheck %s
; RUN: opt -S -O3 < %s | FileCheck -check-prefix=CHECK-NODISCARD %s
Index: llvm/lib/Transforms/IPO/LowerTypeTests.cpp
===================================================================
--- llvm/lib/Transforms/IPO/LowerTypeTests.cpp
+++ llvm/lib/Transforms/IPO/LowerTypeTests.cpp
@@ -2239,9 +2239,13 @@
PreservedAnalyses LowerTypeTestsPass::run(Module &M,
ModuleAnalysisManager &AM) {
- bool Changed =
- LowerTypeTestsModule(M, ExportSummary, ImportSummary, DropTypeTests)
- .lower();
+ bool Changed;
+ if (UseCommandLine)
+ Changed = LowerTypeTestsModule::runForTesting(M);
+ else
+ Changed =
+ LowerTypeTestsModule(M, ExportSummary, ImportSummary, DropTypeTests)
+ .lower();
if (!Changed)
return PreservedAnalyses::all();
return PreservedAnalyses::none();
Index: llvm/lib/Passes/PassRegistry.def
===================================================================
--- llvm/lib/Passes/PassRegistry.def
+++ llvm/lib/Passes/PassRegistry.def
@@ -67,7 +67,7 @@
MODULE_PASS("invalidate<all>", InvalidateAllAnalysesPass())
MODULE_PASS("ipsccp", IPSCCPPass())
MODULE_PASS("print-ir-similarity", IRSimilarityAnalysisPrinterPass(dbgs()))
-MODULE_PASS("lowertypetests", LowerTypeTestsPass(nullptr, nullptr))
+MODULE_PASS("lowertypetests", LowerTypeTestsPass())
MODULE_PASS("mergefunc", MergeFunctionsPass())
MODULE_PASS("name-anon-globals", NameAnonGlobalPass())
MODULE_PASS("no-op-module", NoOpModulePass())
Index: llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
===================================================================
--- llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
+++ llvm/include/llvm/Transforms/IPO/LowerTypeTests.h
@@ -198,10 +198,14 @@
} // end namespace lowertypetests
class LowerTypeTestsPass : public PassInfoMixin<LowerTypeTestsPass> {
+ bool UseCommandLine = false;
+
+ ModuleSummaryIndex *ExportSummary = nullptr;
+ const ModuleSummaryIndex *ImportSummary = nullptr;
+ bool DropTypeTests = true;
+
public:
- ModuleSummaryIndex *ExportSummary;
- const ModuleSummaryIndex *ImportSummary;
- bool DropTypeTests;
+ LowerTypeTestsPass() : UseCommandLine(true) {}
LowerTypeTestsPass(ModuleSummaryIndex *ExportSummary,
const ModuleSummaryIndex *ImportSummary,
bool DropTypeTests = false)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D87845.294465.patch
Type: text/x-patch
Size: 2803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200926/38450f9c/attachment.bin>
More information about the llvm-commits
mailing list