Skip to content

[SYCL][ESIMD][NFC] Update LowerESIMD APIs taking SmallPtrSet<..., 4> #9120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/include/llvm/SYCLLowerIR/ESIMD/LowerESIMD.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class SYCLLowerESIMDPass : public PassInfoMixin<SYCLLowerESIMDPass> {
PreservedAnalyses run(Module &M, ModuleAnalysisManager &);

private:
size_t runOnFunction(Function &F, SmallPtrSet<Type *, 4> &);
size_t runOnFunction(Function &F, SmallPtrSetImpl<Type *> &);
};

ModulePass *createSYCLLowerESIMDPass();
Expand Down
8 changes: 4 additions & 4 deletions llvm/lib/SYCLLowerIR/ESIMD/LowerESIMD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ static void translateUnPackMask(CallInst &CI) {
CI.replaceAllUsesWith(TransCI);
}

static bool translateVLoad(CallInst &CI, SmallPtrSet<Type *, 4> &GVTS) {
static bool translateVLoad(CallInst &CI, SmallPtrSetImpl<Type *> &GVTS) {
if (GVTS.find(CI.getType()) != GVTS.end())
return false;
IRBuilder<> Builder(&CI);
Expand All @@ -1035,7 +1035,7 @@ static bool translateVLoad(CallInst &CI, SmallPtrSet<Type *, 4> &GVTS) {
return true;
}

static bool translateVStore(CallInst &CI, SmallPtrSet<Type *, 4> &GVTS) {
static bool translateVStore(CallInst &CI, SmallPtrSetImpl<Type *> &GVTS) {
if (GVTS.find(CI.getOperand(1)->getType()) != GVTS.end())
return false;
IRBuilder<> Builder(&CI);
Expand Down Expand Up @@ -1728,7 +1728,7 @@ SmallPtrSet<Type *, 4> collectGenXVolatileTypes(Module &M) {
// of the simd object operations, but in some cases clang can implicitly
// insert stores, such as after a write in inline assembly. To handle that
// case, lower any stores of genx_volatiles into vstores.
void lowerGlobalStores(Module &M, const SmallPtrSet<Type *, 4> &GVTS) {
void lowerGlobalStores(Module &M, const SmallPtrSetImpl<Type *> &GVTS) {
SmallVector<Instruction *, 4> ToErase;
for (auto &F : M.functions()) {
for (Instruction &I : instructions(F)) {
Expand Down Expand Up @@ -1781,7 +1781,7 @@ PreservedAnalyses SYCLLowerESIMDPass::run(Module &M, ModuleAnalysisManager &) {
}

size_t SYCLLowerESIMDPass::runOnFunction(Function &F,
SmallPtrSet<Type *, 4> &GVTS) {
SmallPtrSetImpl<Type *> &GVTS) {
// There is a current limitation of GPU vector backend that requires kernel
// functions to be inlined into the kernel itself. To overcome this
// limitation, mark every function called from ESIMD kernel with
Expand Down