-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
48 changed files
with
932 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
|
||
Copyright (C) 2024 Intel Corporation | ||
|
||
SPDX-License-Identifier: MIT | ||
|
||
============================= end_copyright_notice ===========================*/ | ||
|
||
// NOTE: NO INCLUDE GUARD DESIRED! | ||
|
||
#ifndef MODULE_PASS | ||
#define MODULE_PASS(NAME, CREATE_PASS) | ||
#endif | ||
|
||
MODULE_PASS("CMABIAnalysis", CMABIAnalysisPass()) | ||
MODULE_PASS("GenXPacketize", GenXPacketizePass()) | ||
MODULE_PASS("CMImpParam", CMImpParamPass()) | ||
MODULE_PASS("CMKernelArgOffset", CMKernelArgOffsetPass()) | ||
MODULE_PASS("GenXBIFFlagCtrlResolution", GenXBIFFlagCtrlResolutionPass()) | ||
MODULE_PASS("GenXBTIAssignment", GenXBTIAssignmentPass()) | ||
MODULE_PASS("GenXImportOCLBiF", GenXImportOCLBiFPass()) | ||
MODULE_PASS("GenXLinkageCorruptor", GenXLinkageCorruptorPass()) | ||
MODULE_PASS("GenXPrintfLegalization", GenXPrintfLegalizationPass()) | ||
MODULE_PASS("GenXPrintfPhiClonning", GenXPrintfPhiClonningPass()) | ||
MODULE_PASS("GenXPrintfResolution", GenXPrintfResolutionPass()) | ||
MODULE_PASS("GenXTrampolineInsertion", GenXTrampolineInsertionPass()) | ||
MODULE_PASS("GenXTranslateSPIRVBuiltins", GenXTranslateSPIRVBuiltinsPass()) | ||
MODULE_PASS("CMABI", CMABIPass()) | ||
MODULE_PASS("GenXCloneIndirectFunctions", GenXCloneIndirectFunctionsPass()) | ||
|
||
#undef MODULE_PASS | ||
|
||
#ifndef FUNCTION_PASS | ||
#define FUNCTION_PASS(NAME, CREATE_PASS) | ||
#endif | ||
|
||
FUNCTION_PASS("GenXSimplify", GenXSimplifyPass()) | ||
FUNCTION_PASS("GenXStatePointerFence", GenXStatePointerFencePass()) | ||
FUNCTION_PASS("CMLowerVLoadVStore", CMLowerVLoadVStorePass()) | ||
FUNCTION_PASS("GenXTypeLegalization", GenXTypeLegalizationPass()) | ||
FUNCTION_PASS("GenXTranslateIntrinsics", GenXTranslateIntrinsicsPass()) | ||
|
||
#undef FUNCTION_PASS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_CMABI | ||
#define GENX_OPTS_CMABI | ||
|
||
namespace llvm { | ||
void initializeCMABIPass(PassRegistry &); | ||
} | ||
|
||
struct CMABIPass : public llvm::PassInfoMixin<CMABIPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_CMABI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_CMABIANALYSIS | ||
#define GENX_OPTS_CMABIANALYSIS | ||
|
||
// void initializeCMABIAnalysis(PassRegistry &); | ||
|
||
struct CMABIAnalysisPass : public llvm::PassInfoMixin<CMABIAnalysisPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_CMABIANALYSIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_CMIMPLPARAM | ||
#define GENX_OPTS_CMIMPLPARAM | ||
|
||
namespace llvm { | ||
void initializeCMImpParamPass(PassRegistry &); | ||
} | ||
|
||
struct CMImpParamPass : public llvm::PassInfoMixin<CMImpParamPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_CMIMPLPARAM |
20 changes: 20 additions & 0 deletions
20
IGC/VectorCompiler/include/vc/GenXOpts/CMKernelArgOffset.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_CM_KERNEL_ARG_OFFSET | ||
#define GENX_OPTS_CM_KERNEL_ARG_OFFSET | ||
|
||
namespace llvm { | ||
void initializeCMKernelArgOffsetPass(PassRegistry &); | ||
} | ||
|
||
struct CMKernelArgOffsetPass | ||
: public llvm::PassInfoMixin<CMKernelArgOffsetPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_CM_KERNEL_ARG_OFFSET |
21 changes: 21 additions & 0 deletions
21
IGC/VectorCompiler/include/vc/GenXOpts/CMLowerVLoadVStore.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_CM_LOWER_VLOAD_VSTORE | ||
#define GENX_OPTS_CM_LOWER_VLOAD_VSTORE | ||
|
||
namespace llvm { | ||
void initializeCMLowerVLoadVStorePass(PassRegistry &); | ||
} | ||
|
||
struct CMLowerVLoadVStorePass | ||
: public llvm::PassInfoMixin<CMLowerVLoadVStorePass> { | ||
llvm::PreservedAnalyses run(llvm::Function &F, | ||
llvm::FunctionAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_CM_LOWER_VLOAD_VSTORE |
20 changes: 20 additions & 0 deletions
20
IGC/VectorCompiler/include/vc/GenXOpts/GenXBIFFlagCtrlResolution.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_GENX_BIF_FLAG_CTRL_RESOLUTION | ||
#define GENX_OPTS_GENX_BIF_FLAG_CTRL_RESOLUTION | ||
|
||
namespace llvm { | ||
void initializeGenXBIFFlagCtrlResolutionPass(PassRegistry &); | ||
} | ||
|
||
struct GenXBIFFlagCtrlResolutionPass | ||
: public llvm::PassInfoMixin<GenXBIFFlagCtrlResolutionPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_GENX_BIF_FLAG_CTRL_RESOLUTION |
20 changes: 20 additions & 0 deletions
20
IGC/VectorCompiler/include/vc/GenXOpts/GenXBTIAssignment.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_GENX_BTI_ASSIGNMENT | ||
#define GENX_OPTS_GENX_BTI_ASSIGNMENT | ||
|
||
namespace llvm { | ||
void initializeGenXBTIAssignmentPass(PassRegistry &); | ||
} | ||
|
||
struct GenXBTIAssignmentPass | ||
: public llvm::PassInfoMixin<GenXBTIAssignmentPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_GENX_BTI_ASSIGNMENT |
20 changes: 20 additions & 0 deletions
20
IGC/VectorCompiler/include/vc/GenXOpts/GenXCloneIndirectFunctions.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_GENX_CLONE_INDERECT_FUNCTIONS | ||
#define GENX_OPTS_GENX_CLONE_INDERECT_FUNCTIONS | ||
|
||
namespace llvm { | ||
void initializeGenXCloneIndirectFunctionsPass(PassRegistry &); | ||
} | ||
|
||
struct GenXCloneIndirectFunctionsPass | ||
: public llvm::PassInfoMixin<GenXCloneIndirectFunctionsPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_GENX_CLONE_INDERECT_FUNCTIONS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_GENX_IMPORT_OCL_BIF | ||
#define GENX_OPTS_GENX_IMPORT_OCL_BIF | ||
|
||
namespace llvm { | ||
void initializeGenXImportOCLBiFPass(PassRegistry &); | ||
} | ||
|
||
struct GenXImportOCLBiFPass : public llvm::PassInfoMixin<GenXImportOCLBiFPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_GENX_IMPORT_OCL_BIF |
20 changes: 20 additions & 0 deletions
20
IGC/VectorCompiler/include/vc/GenXOpts/GenXLinkageCorruptor.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
#ifndef GENX_OPTS_GENX_LINKAGE_CORRUPTOR | ||
#define GENX_OPTS_GENX_LINKAGE_CORRUPTOR | ||
|
||
namespace llvm { | ||
void initializeGenXLinkageCorruptorPass(PassRegistry &); | ||
} | ||
|
||
struct GenXLinkageCorruptorPass | ||
: public llvm::PassInfoMixin<GenXLinkageCorruptorPass> { | ||
llvm::PreservedAnalyses run(llvm::Module &M, llvm::ModuleAnalysisManager &AM); | ||
}; | ||
|
||
#endif // GENX_OPTS_GENX_LINKAGE_CORRUPTOR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,99 +1,18 @@ | ||
/*========================== begin_copyright_notice ============================ | ||
Copyright (C) 2019-2024 Intel Corporation | ||
Copyright (C) 2024 Intel Corporation | ||
SPDX-License-Identifier: MIT | ||
============================= end_copyright_notice ===========================*/ | ||
|
||
// | ||
// This header file defines prototypes for accessor functions that expose passes | ||
// in the GenX transformations library. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef VC_GENXOPTS_GENXOPTS_H | ||
#define VC_GENXOPTS_GENXOPTS_H | ||
|
||
namespace llvm { | ||
|
||
class FunctionPass; | ||
class ModulePass; | ||
class Pass; | ||
class PassRegistry; | ||
|
||
//===----------------------------------------------------------------------===// | ||
// | ||
// CMImpParam - Transforms to enable implicit parameters | ||
// | ||
Pass *createCMImpParamPass(bool); | ||
|
||
//===----------------------------------------------------------------------===// | ||
// | ||
// CMKernelArgOffset - Determine offset of each CM kernel argument | ||
// | ||
Pass *createCMKernelArgOffsetPass(unsigned GrfByteSize, bool UseBindlessImages); | ||
|
||
//===----------------------------------------------------------------------===// | ||
// | ||
// CMABI - Fix ABI issues for the genx backend. | ||
// | ||
Pass *createCMABIPass(); | ||
|
||
//===----------------------------------------------------------------------===// | ||
// | ||
// CMLowerVLoadVStore - Lower CM reference loads and stores. | ||
// | ||
Pass *createCMLowerVLoadVStorePass(); | ||
|
||
FunctionPass *createGenXReduceIntSizePass(); | ||
FunctionPass *createGenXRegionCollapsingPass(); | ||
FunctionPass *createGenXSimplifyPass(); | ||
FunctionPass *createGenXLowerAggrCopiesPass(); | ||
|
||
ModulePass *createGenXPacketizePass(); | ||
|
||
void initializeGenXSimplifyPass(PassRegistry &); | ||
void initializeCMABIPass(PassRegistry &); | ||
void initializeCMImpParamPass(PassRegistry &); | ||
void initializeCMKernelArgOffsetPass(PassRegistry &); | ||
|
||
ModulePass *createGenXPrintfResolutionPass(); | ||
void initializeGenXPrintfResolutionPass(PassRegistry &); | ||
|
||
ModulePass *createGenXPrintfPhiClonningPass(); | ||
void initializeGenXPrintfPhiClonningPass(PassRegistry &); | ||
|
||
ModulePass *createGenXPrintfLegalizationPass(); | ||
void initializeGenXPrintfLegalizationPass(PassRegistry &); | ||
|
||
ModulePass *createGenXImportOCLBiFPass(); | ||
void initializeGenXImportOCLBiFPass(PassRegistry &); | ||
|
||
ModulePass *createGenXBIFFlagCtrlResolutionPass(); | ||
void initializeGenXBIFFlagCtrlResolutionPass(PassRegistry &); | ||
|
||
ModulePass *createGenXBTIAssignmentPass(); | ||
void initializeGenXBTIAssignmentPass(PassRegistry &); | ||
|
||
ModulePass *createGenXTranslateSPIRVBuiltinsPass(); | ||
void initializeGenXTranslateSPIRVBuiltinsPass(PassRegistry &); | ||
|
||
ModulePass *createGenXCloneIndirectFunctionsPass(); | ||
void initializeGenXCloneIndirectFunctionsPass(PassRegistry &); | ||
|
||
ModulePass *createGenXTrampolineInsertionPass(); | ||
void initializeGenXTrampolineInsertionPass(PassRegistry &); | ||
|
||
ModulePass *createGenXLinkageCorruptorPass(); | ||
void initializeGenXLinkageCorruptorPass(PassRegistry &); | ||
|
||
FunctionPass *createGenXTranslateIntrinsicsPass(); | ||
void initializeGenXTranslateIntrinsicsPass(PassRegistry &); | ||
|
||
FunctionPass *createGenXTypeLegalizationPass(); | ||
void initializeGenXTypeLegalizationPass(PassRegistry &); | ||
|
||
} // End llvm namespace | ||
#if LLVM_VERSION_MAJOR < 16 | ||
#include "GenXOptsLegacyPM.h" | ||
#else | ||
#include "GenXOptsNewPM.h" | ||
#endif | ||
|
||
#endif // VC_GENXOPTS_GENXOPTS_H |
Oops, something went wrong.