[PATCH] D130976: [NFC] Add option to disable the scalarizer pass.
Thomas Symalla via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 2 03:11:19 PDT 2022
tsymalla created this revision.
tsymalla added reviewers: foad, piotr.
Herald added a subscriber: hiraditya.
Herald added a project: All.
tsymalla requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch adds a new CLI option, which can be used to
disable the scalarizer pass globally.
We found that disabling the scalarizer pass helps with
generating v_pk_* instructions, therefore this option should
help with experiments which lead to better understanding
of the impact of running the scalarizer pass in such cases.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130976
Files:
llvm/lib/Transforms/Scalar/Scalarizer.cpp
Index: llvm/lib/Transforms/Scalar/Scalarizer.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/Scalarizer.cpp
+++ llvm/lib/Transforms/Scalar/Scalarizer.cpp
@@ -50,6 +50,10 @@
#define DEBUG_TYPE "scalarizer"
+static cl::opt<bool>
+ DisableScalarizer("disable-scalarizer", cl::init(false), cl::Hidden,
+ cl::desc("Don't execute the scalarizer pass"));
+
static cl::opt<bool> ClScalarizeVariableInsertExtract(
"scalarize-variable-insert-extract", cl::init(true), cl::Hidden,
cl::desc("Allow the scalarizer pass to scalarize "
@@ -1011,6 +1015,9 @@
}
PreservedAnalyses ScalarizerPass::run(Function &F, FunctionAnalysisManager &AM) {
+ if (DisableScalarizer)
+ return PreservedAnalyses::all();
+
Module &M = *F.getParent();
unsigned ParallelLoopAccessMDKind =
M.getContext().getMDKindID("llvm.mem.parallel_loop_access");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130976.449242.patch
Type: text/x-patch
Size: 930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220802/a2e18033/attachment.bin>
More information about the llvm-commits
mailing list