@@ -54,7 +54,7 @@ struct SYCLInternalizerImpl {
54
54
TargetFusionInfo TargetInfo;
55
55
56
56
// / Implements internalization the pass run.
57
- PreservedAnalyses operator ()(Module &M, ModuleAnalysisManager &AM ) const ;
57
+ PreservedAnalyses operator ()(Module &M) const ;
58
58
59
59
// /
60
60
// / Update a value to be promoted in a function.
@@ -71,8 +71,8 @@ struct SYCLInternalizerImpl {
71
71
void promoteValue (Value *Val, const PromotionInfo &PromInfo,
72
72
bool InAggregate) const ;
73
73
74
- void promoteGEPI (GetElementPtrInst *GEPI, const Value *Val ,
75
- const PromotionInfo &PromInfo, bool InAggregate) const ;
74
+ void promoteGEPI (GetElementPtrInst *GEPI, const PromotionInfo &PromInfo ,
75
+ bool InAggregate) const ;
76
76
77
77
void promoteCall (CallBase *C, const Value *Val,
78
78
const PromotionInfo &PromInfo) const ;
@@ -103,8 +103,8 @@ struct SYCLInternalizerImpl {
103
103
// /
104
104
// / Check that the operand of a GEP can be promoted to its users, and
105
105
// / propagate whether it represents a pointer into an aggregate object.
106
- Error canPromoteGEP (GetElementPtrInst *GEPI, const Value *Val ,
107
- const PromotionInfo &PromInfo, bool InAggregate) const ;
106
+ Error canPromoteGEP (GetElementPtrInst *GEPI, const PromotionInfo &PromInfo ,
107
+ bool InAggregate) const ;
108
108
109
109
// /
110
110
// / Check if operand to a function call can be promoted.
@@ -356,7 +356,6 @@ static int getGEPKind(GetElementPtrInst *GEPI, const PromotionInfo &PromInfo) {
356
356
}
357
357
358
358
Error SYCLInternalizerImpl::canPromoteGEP (GetElementPtrInst *GEPI,
359
- const Value *Val,
360
359
const PromotionInfo &PromInfo,
361
360
bool InAggregate) const {
362
361
if (cast<PointerType>(GEPI->getType ())->getAddressSpace () == AS) {
@@ -405,7 +404,7 @@ Error SYCLInternalizerImpl::canPromoteValue(Value *Val,
405
404
}
406
405
break ;
407
406
case Instruction::GetElementPtr:
408
- if (auto Err = canPromoteGEP (cast<GetElementPtrInst>(I), Val, PromInfo,
407
+ if (auto Err = canPromoteGEP (cast<GetElementPtrInst>(I), PromInfo,
409
408
InAggregate)) {
410
409
return Err;
411
410
}
@@ -488,7 +487,6 @@ void SYCLInternalizerImpl::promoteCall(CallBase *C, const Value *Val,
488
487
}
489
488
490
489
void SYCLInternalizerImpl::promoteGEPI (GetElementPtrInst *GEPI,
491
- const Value *Val,
492
490
const PromotionInfo &PromInfo,
493
491
bool InAggregate) const {
494
492
// Not PointerType is unreachable. Other case is caught in caller.
@@ -523,7 +521,7 @@ void SYCLInternalizerImpl::promoteValue(Value *Val,
523
521
promoteCall (cast<CallBase>(I), Val, PromInfo);
524
522
break ;
525
523
case Instruction::GetElementPtr:
526
- promoteGEPI (cast<GetElementPtrInst>(I), Val, PromInfo, InAggregate);
524
+ promoteGEPI (cast<GetElementPtrInst>(I), PromInfo, InAggregate);
527
525
break ;
528
526
case Instruction::Load:
529
527
case Instruction::Store:
@@ -637,8 +635,7 @@ Function *SYCLInternalizerImpl::promoteFunctionArgs(
637
635
return NewF;
638
636
}
639
637
640
- PreservedAnalyses
641
- SYCLInternalizerImpl::operator ()(Module &M, ModuleAnalysisManager &AM) const {
638
+ PreservedAnalyses SYCLInternalizerImpl::operator ()(Module &M) const {
642
639
bool Changed{false };
643
640
SmallVector<Function *> ToUpdate;
644
641
for (auto &F : M) {
@@ -729,10 +726,10 @@ PreservedAnalyses llvm::SYCLInternalizer::run(Module &M,
729
726
TargetFusionInfo TFI{&M};
730
727
// Private promotion
731
728
const PreservedAnalyses Tmp = SYCLInternalizerImpl{
732
- TFI.getPrivateAddressSpace (), PrivatePromotion, true , TFI}(M, AM );
729
+ TFI.getPrivateAddressSpace (), PrivatePromotion, true , TFI}(M);
733
730
// Local promotion
734
- PreservedAnalyses Res = SYCLInternalizerImpl{
735
- TFI. getLocalAddressSpace (), LocalPromotion, false , TFI}(M, AM );
731
+ PreservedAnalyses Res = SYCLInternalizerImpl{TFI. getLocalAddressSpace (),
732
+ LocalPromotion, false , TFI}(M);
736
733
737
734
Res.intersect (Tmp);
738
735
0 commit comments