Skip to content

Commit 8ef4090

Browse files
authored
[SYCL][ESIMD] Remove LowerESIMDVecArg pass and update opaque pointer tests (#10738)
After 0c51f60, opaque pointers are enabled by default for device code. This means that LowerESIMDVecArg is now never run because we do a runtime check in sycl-post-link and only run it if opaque pointers are off. Remove the pass since it's now dead code, and remove related tests. The tests check for changes unique to LowerESIMDVecArg and cannot be ported to instead use the pass that is run when opaque pointers is enabled, ESIMDOptimizeVecArgCallConvPass, and that pass has its own tests already and it does something completely different anyway. For the tests removed under sycl/test/esimd, all of those tests already have opaque pointer versions in-tree with the _opaque suffix, so there is no test coverage loss. I also updated tests in sycl/test that have the _opaque suffix to not have the suffix, removed the typed pointer versions, and removed the opaque pointer flags. --------- Signed-off-by: Sarnie, Nick <[email protected]>
1 parent 2d12863 commit 8ef4090

25 files changed

+208
-1423
lines changed

llvm/include/llvm/InitializePasses.h

-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ void initializeSYCLLowerInvokeSimdLegacyPassPass(PassRegistry &);
337337
void initializeSYCLMutatePrintfAddrspaceLegacyPassPass(PassRegistry &);
338338
void initializeSPIRITTAnnotationsLegacyPassPass(PassRegistry &);
339339
void initializeESIMDLowerLoadStorePass(PassRegistry &);
340-
void initializeESIMDLowerVecArgLegacyPassPass(PassRegistry &);
341340
void initializeESIMDVerifierPass(PassRegistry &);
342341
void initializeSYCLLowerWGLocalMemoryLegacyPass(PassRegistry &);
343342
void initializeTailCallElimPass(PassRegistry&);

llvm/include/llvm/SYCLLowerIR/ESIMD/LowerESIMD.h

-14
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,6 @@ class ESIMDLowerLoadStorePass : public PassInfoMixin<ESIMDLowerLoadStorePass> {
5252
FunctionPass *createESIMDLowerLoadStorePass();
5353
void initializeESIMDLowerLoadStorePass(PassRegistry &);
5454

55-
// Pass converts simd* function parameters and globals to
56-
// llvm's first-class vector* type.
57-
class ESIMDLowerVecArgPass : public PassInfoMixin<ESIMDLowerVecArgPass> {
58-
public:
59-
PreservedAnalyses run(Module &M, ModuleAnalysisManager &);
60-
61-
private:
62-
Function *rewriteFunc(Function &F);
63-
Type *getSimdArgPtrTyOrNull(Value *arg);
64-
};
65-
66-
ModulePass *createESIMDLowerVecArgPass();
67-
void initializeESIMDLowerVecArgLegacyPassPass(PassRegistry &);
68-
6955
// - Converts simd* function parameters and return values passed by pointer to
7056
// pass-by-value
7157
// (where possible)

llvm/lib/Passes/PassRegistry.def

-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ MODULE_PASS("memprof-module", ModuleMemProfilerPass())
129129
MODULE_PASS("poison-checking", PoisonCheckingPass())
130130
MODULE_PASS("pseudo-probe-update", PseudoProbeUpdatePass())
131131
MODULE_PASS("LowerESIMD", SYCLLowerESIMDPass())
132-
MODULE_PASS("ESIMDLowerVecArg", ESIMDLowerVecArgPass())
133132
MODULE_PASS("esimd-opt-call-conv", ESIMDOptimizeVecArgCallConvPass())
134133
MODULE_PASS("esimd-verifier", ESIMDVerifierPass())
135134
MODULE_PASS("lower-invoke-simd", SYCLLowerInvokeSimdPass())

llvm/lib/SYCLLowerIR/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ add_llvm_component_library(LLVMSYCLLowerIR
5454
ESIMD/LowerESIMDKernelAttrs.cpp
5555
CompileTimePropertiesPass.cpp
5656
DeviceGlobals.cpp
57-
ESIMD/LowerESIMDVecArg.cpp
5857
ESIMD/LowerESIMDVLoadVStore.cpp
5958
ESIMD/LowerESIMDSlmReservation.cpp
6059
HostPipes.cpp

llvm/lib/SYCLLowerIR/ESIMD/LowerESIMDVecArg.cpp

-216
This file was deleted.

0 commit comments

Comments
 (0)