@@ -282,12 +282,10 @@ T getWithDefaultOverride(const cl::opt<T> &ClOption,
282
282
283
283
class ScalarizerVisitor : public InstVisitor <ScalarizerVisitor, bool > {
284
284
public:
285
- ScalarizerVisitor (unsigned ParallelLoopAccessMDKind, DominatorTree *DT,
286
- ScalarizerPassOptions Options)
287
- : ParallelLoopAccessMDKind(ParallelLoopAccessMDKind), DT(DT),
288
- ScalarizeVariableInsertExtract (
289
- getWithDefaultOverride (ClScalarizeVariableInsertExtract,
290
- Options.ScalarizeVariableInsertExtract)),
285
+ ScalarizerVisitor (DominatorTree *DT, ScalarizerPassOptions Options)
286
+ : DT(DT), ScalarizeVariableInsertExtract(getWithDefaultOverride(
287
+ ClScalarizeVariableInsertExtract,
288
+ Options.ScalarizeVariableInsertExtract)),
291
289
ScalarizeLoadStore (getWithDefaultOverride(ClScalarizeLoadStore,
292
290
Options.ScalarizeLoadStore)),
293
291
ScalarizeMinBits(getWithDefaultOverride(ClScalarizeMinBits,
@@ -337,8 +335,6 @@ class ScalarizerVisitor : public InstVisitor<ScalarizerVisitor, bool> {
337
335
338
336
SmallVector<WeakTrackingVH, 32 > PotentiallyDeadInstrs;
339
337
340
- unsigned ParallelLoopAccessMDKind;
341
-
342
338
DominatorTree *DT;
343
339
344
340
const bool ScalarizeVariableInsertExtract;
@@ -448,8 +444,7 @@ bool ScalarizerLegacyPass::runOnFunction(Function &F) {
448
444
return false ;
449
445
450
446
DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree ();
451
- ScalarizerVisitor Impl (LLVMContext::MD_mem_parallel_loop_access, DT,
452
- ScalarizerPassOptions ());
447
+ ScalarizerVisitor Impl (DT, ScalarizerPassOptions ());
453
448
return Impl.visit (F);
454
449
}
455
450
@@ -556,7 +551,7 @@ bool ScalarizerVisitor::canTransferMetadata(unsigned Tag) {
556
551
|| Tag == LLVMContext::MD_invariant_load
557
552
|| Tag == LLVMContext::MD_alias_scope
558
553
|| Tag == LLVMContext::MD_noalias
559
- || Tag == ParallelLoopAccessMDKind
554
+ || Tag == LLVMContext::MD_mem_parallel_loop_access
560
555
|| Tag == LLVMContext::MD_access_group);
561
556
}
562
557
@@ -1253,7 +1248,7 @@ bool ScalarizerVisitor::finish() {
1253
1248
1254
1249
PreservedAnalyses ScalarizerPass::run (Function &F, FunctionAnalysisManager &AM) {
1255
1250
DominatorTree *DT = &AM.getResult <DominatorTreeAnalysis>(F);
1256
- ScalarizerVisitor Impl (LLVMContext::MD_mem_parallel_loop_access, DT, Options);
1251
+ ScalarizerVisitor Impl (DT, Options);
1257
1252
bool Changed = Impl.visit (F);
1258
1253
PreservedAnalyses PA;
1259
1254
PA.preserve <DominatorTreeAnalysis>();
0 commit comments