mirror of
git://git.yoctoproject.org/meta-intel.git
synced 2025-07-19 12:59:03 +02:00
intel-graphics-compiler: update IGC to 1.0.8365
Updating IGC to add ADL-P support. All patches under files folder are rebased as well. Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
This commit is contained in:
parent
6a628fa0b5
commit
6f8e742aab
|
@ -1,7 +1,7 @@
|
|||
From 5501fab763aa2b11437fbdb19e07a11157a7d3e6 Mon Sep 17 00:00:00 2001
|
||||
From: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
Date: Thu, 6 Feb 2020 14:56:56 +0800
|
||||
Subject: [PATCH] skip execution of ElfPackager
|
||||
From 562a19fe7ef3f4732365efdfc6d2a30763a5b8b0 Mon Sep 17 00:00:00 2001
|
||||
From: Dongwon Kim <dongwon.kim@intel.com>
|
||||
Date: Wed, 18 Aug 2021 18:49:49 -0700
|
||||
Subject: [PATCH 1/5] skip execution of ElfPackager
|
||||
|
||||
ElfPackager adds the ability to convert llvm bitcode into elf files for
|
||||
easier partitioning. Skip for now until we start building a native
|
||||
|
@ -11,33 +11,34 @@ Upstream-Status: Inappropriate [configuration specific]
|
|||
|
||||
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
|
||||
---
|
||||
IGC/ElfPackager/CMakeLists.txt | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/IGC/ElfPackager/CMakeLists.txt b/IGC/ElfPackager/CMakeLists.txt
|
||||
index 563ac9d6..c6c74ce9 100644
|
||||
index 8959a3ebb..7c3a0b42f 100644
|
||||
--- a/IGC/ElfPackager/CMakeLists.txt
|
||||
+++ b/IGC/ElfPackager/CMakeLists.txt
|
||||
@@ -71,12 +71,12 @@ include_directories (
|
||||
${IGC_SOURCE_DIR}/AdaptorOCL/CLElfLib/
|
||||
)
|
||||
@@ -51,12 +51,12 @@ if(NOT TARGET ${IGC_BUILD__PROJ__ElfPackager})
|
||||
${IGC_SOURCE_DIR}/AdaptorOCL/CLElfLib/
|
||||
)
|
||||
|
||||
-if(NOT ANDROID)
|
||||
- add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager}
|
||||
- POST_BUILD
|
||||
- COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin
|
||||
- )
|
||||
-endif()
|
||||
+#if(NOT ANDROID)
|
||||
+# add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager}
|
||||
+# POST_BUILD
|
||||
+# COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin
|
||||
+# )
|
||||
+#endif()
|
||||
- if(NOT ANDROID)
|
||||
- add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager}
|
||||
- POST_BUILD
|
||||
- COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin
|
||||
- )
|
||||
- endif()
|
||||
+# if(NOT ANDROID)
|
||||
+# add_custom_command(TARGET ${IGC_BUILD__PROJ__ElfPackager}
|
||||
+# POST_BUILD
|
||||
+# COMMAND $<TARGET_FILE:${IGC_BUILD__PROJ__ElfPackager}> -includeSizet -funcList ${CMAKE_CURRENT_SOURCE_DIR}/function_bin.txt ${IGC_BUILD__BIF_DIR}/OCLBiFImpl.bc ${IGC_BUILD__BIF_DIR}/igdclbif.bin
|
||||
+# )
|
||||
+# endif()
|
||||
|
||||
|
||||
add_dependencies("${IGC_BUILD__PROJ__ElfPackager}" "${IGC_BUILD__PROJ__BiFModule_OCL}")
|
||||
add_dependencies("${IGC_BUILD__PROJ__ElfPackager}" "${IGC_BUILD__PROJ__BiFModule_OCL}")
|
||||
--
|
||||
2.17.1
|
||||
2.20.1
|
||||
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
From 92a663dd55917fdfad5ae4daa173a9d18df0ee9e Mon Sep 17 00:00:00 2001
|
||||
From: Dongwon Kim <dongwon.kim@intel.com>
|
||||
Date: Wed, 18 Aug 2021 19:14:28 -0700
|
||||
Subject: [PATCH 2/5] IGC/VectorCompiler/CMakeLists.txt: link to external
|
||||
LLVMGenXIntrinsics
|
||||
|
||||
By default LLVMGenXIntrinsics is to be build In-tree, but we want to
|
||||
link externally.
|
||||
|
||||
Upstream-Status: Inappropriate [configuration specific]
|
||||
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
|
||||
---
|
||||
IGC/VectorCompiler/CMakeLists.txt | 16 ----------------
|
||||
1 file changed, 16 deletions(-)
|
||||
|
||||
diff --git a/IGC/VectorCompiler/CMakeLists.txt b/IGC/VectorCompiler/CMakeLists.txt
|
||||
index 0b26072f0..bf1cd939d 100644
|
||||
--- a/IGC/VectorCompiler/CMakeLists.txt
|
||||
+++ b/IGC/VectorCompiler/CMakeLists.txt
|
||||
@@ -43,22 +43,6 @@ if(LLVM_ON_WIN32)
|
||||
endif()
|
||||
|
||||
# --- VC Intrinsics ---
|
||||
-
|
||||
-if(DEFINED VC_INTRINSICS_SRC)
|
||||
- set(INTRSRC "${VC_INTRINSICS_SRC}/GenXIntrinsics")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT DEFINED INTRSRC)
|
||||
- set(INTRSRC "${CMAKE_CURRENT_SOURCE_DIR}/../../../vc-intrinsics/GenXIntrinsics")
|
||||
-endif()
|
||||
-
|
||||
-message(STATUS "[VC] Using vc-intrinsics source from: ${INTRSRC}")
|
||||
-# Trick intrinsics.
|
||||
-set(BUILD_EXTERNAL YES)
|
||||
-# We are using prebuilt SPIRV and building intrinsics.
|
||||
-set(INTRBUILD "${CMAKE_CURRENT_BINARY_DIR}/intrbuild")
|
||||
-add_subdirectory(${INTRSRC} ${INTRBUILD} EXCLUDE_FROM_ALL)
|
||||
-
|
||||
include(cmake/spirv.cmake)
|
||||
|
||||
set(IGC_OPTION__VC_DISABLE_BIF_DEFAULT OFF)
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -1,318 +0,0 @@
|
|||
From 60136b453bb3a109bfc88c4040b871af9d522ed5 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= <zboszor@pr.hu>
|
||||
Date: Thu, 25 Feb 2021 19:40:21 +0100
|
||||
Subject: [PATCH 2/3] Review fixes for LLVM 12 phase 1
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
---
|
||||
IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp | 6 +-----
|
||||
IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp | 6 +-----
|
||||
IGC/Compiler/CISACodeGen/AdvMemOpt.cpp | 7 ++-----
|
||||
IGC/Compiler/CISACodeGen/Simd32Profitability.cpp | 7 ++-----
|
||||
IGC/Compiler/ConvertMSAAPayloadTo16Bit.cpp | 11 +----------
|
||||
IGC/Compiler/GenTTI.cpp | 9 ++-------
|
||||
IGC/Compiler/Legalizer/InstPromoter.cpp | 8 +-------
|
||||
.../DeviceEnqueueFuncs/TransformBlocks.cpp | 6 +-----
|
||||
.../OpenCLPasses/WIFuncs/WIFuncResolution.cpp | 4 ----
|
||||
IGC/Compiler/Optimizer/Scalarizer.cpp | 2 +-
|
||||
IGC/WrapperLLVM/include/llvmWrapper/IR/DerivedTypes.h | 10 ++++++++++
|
||||
.../include/llvmWrapper/Support/TypeSize.h | 4 +---
|
||||
.../include/llvmWrapper/Transforms/Utils/LoopUtils.h | 8 ++++++++
|
||||
IGC/common/igc_resourceDimTypes.h | 5 ++---
|
||||
14 files changed, 33 insertions(+), 60 deletions(-)
|
||||
|
||||
diff --git a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
|
||||
index 725a1512..12f42be8 100644
|
||||
--- a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
|
||||
+++ b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
|
||||
@@ -1929,11 +1929,7 @@ SPIRVToLLVM::transType(SPIRVType *T) {
|
||||
auto name = isSubgroupAvcINTELTypeOpCode(OC) ?
|
||||
OCLSubgroupINTELTypeOpCodeMap::rmap(OC) :
|
||||
BuiltinOpaqueGenericTypeOpCodeMap::rmap(OC);
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
- auto *pST = llvm::StructType::getTypeByName(M->getContext(), name);
|
||||
-#else
|
||||
- auto *pST = M->getTypeByName(name);
|
||||
-#endif
|
||||
+ auto *pST = IGCLLVM::getTypeByName(M, name);
|
||||
pST = pST ? pST : StructType::create(*Context, name);
|
||||
|
||||
return mapType(T, PointerType::get(pST, getOCLOpaqueTypeAddrSpace(OC)));
|
||||
diff --git a/IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp b/IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp
|
||||
index 91b4623c..f4f0dee5 100644
|
||||
--- a/IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp
|
||||
+++ b/IGC/AdaptorOCL/SPIRV/SPIRVUtil.cpp
|
||||
@@ -93,11 +93,7 @@ saveLLVMModule(Module *M, const std::string &OutputFile) {
|
||||
PointerType*
|
||||
getOrCreateOpaquePtrType(Module *M, const std::string &Name,
|
||||
unsigned AddrSpace) {
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
- auto OpaqueType = llvm::StructType::getTypeByName(M->getContext(), Name);
|
||||
-#else
|
||||
- auto OpaqueType = M->getTypeByName(Name);
|
||||
-#endif
|
||||
+ auto OpaqueType = IGCLLVM::getTypeByName(M, Name);
|
||||
if (!OpaqueType)
|
||||
OpaqueType = StructType::create(M->getContext(), Name);
|
||||
return PointerType::get(OpaqueType, AddrSpace);
|
||||
diff --git a/IGC/Compiler/CISACodeGen/AdvMemOpt.cpp b/IGC/Compiler/CISACodeGen/AdvMemOpt.cpp
|
||||
index fc45a510..a612a473 100644
|
||||
--- a/IGC/Compiler/CISACodeGen/AdvMemOpt.cpp
|
||||
+++ b/IGC/Compiler/CISACodeGen/AdvMemOpt.cpp
|
||||
@@ -33,6 +33,7 @@ IN THE SOFTWARE.
|
||||
#include <llvm/Support/Debug.h>
|
||||
#include <llvm/Support/raw_ostream.h>
|
||||
#include <llvm/Transforms/Utils/Local.h>
|
||||
+#include "llvmWrapper/Transforms/Utils/LoopUtils.h"
|
||||
#include "common/LLVMWarningsPop.hpp"
|
||||
#include "GenISAIntrinsics/GenIntrinsics.h"
|
||||
#include "Compiler/CISACodeGen/ShaderCodeGen.hpp"
|
||||
@@ -134,11 +135,7 @@ bool AdvMemOpt::runOnFunction(Function& F) {
|
||||
for (auto I = LI->begin(), E = LI->end(); I != E; ++I)
|
||||
for (auto DFI = df_begin(*I), DFE = df_end(*I); DFI != DFE; ++DFI) {
|
||||
Loop* L = *DFI;
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
- if (L->isInnermost())
|
||||
-#else
|
||||
- if (L->empty())
|
||||
-#endif
|
||||
+ if (IGCLLVM::isInnermost(L))
|
||||
InnermostLoops.push_back(L);
|
||||
}
|
||||
|
||||
diff --git a/IGC/Compiler/CISACodeGen/Simd32Profitability.cpp b/IGC/Compiler/CISACodeGen/Simd32Profitability.cpp
|
||||
index c1f4a419..5393d4e8 100644
|
||||
--- a/IGC/Compiler/CISACodeGen/Simd32Profitability.cpp
|
||||
+++ b/IGC/Compiler/CISACodeGen/Simd32Profitability.cpp
|
||||
@@ -28,6 +28,7 @@ IN THE SOFTWARE.
|
||||
#include "Compiler/CISACodeGen/Platform.hpp"
|
||||
#include "common/LLVMWarningsPush.hpp"
|
||||
#include <llvmWrapper/IR/DerivedTypes.h>
|
||||
+#include <llvmWrapper/Transforms/Utils/LoopUtils.h>
|
||||
#include <llvm/IR/InstIterator.h>
|
||||
#include <llvm/IR/Operator.h>
|
||||
#include <llvmWrapper/IR/DerivedTypes.h>
|
||||
@@ -995,11 +996,7 @@ static bool hasLongStridedLdStInLoop(Function* F, LoopInfo* LI, WIAnalysis* WI)
|
||||
// Collect innermost simple loop.
|
||||
for (auto I = LI->begin(), E = LI->end(); I != E; ++I) {
|
||||
auto L = *I;
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
- if (!L->isInnermost())
|
||||
-#else
|
||||
- if (!L->empty())
|
||||
-#endif
|
||||
+ if (!IGCLLVM::isInnermost(L))
|
||||
continue;
|
||||
if (L->getNumBlocks() != 2)
|
||||
continue;
|
||||
diff --git a/IGC/Compiler/ConvertMSAAPayloadTo16Bit.cpp b/IGC/Compiler/ConvertMSAAPayloadTo16Bit.cpp
|
||||
index adf992cb..33473c23 100644
|
||||
--- a/IGC/Compiler/ConvertMSAAPayloadTo16Bit.cpp
|
||||
+++ b/IGC/Compiler/ConvertMSAAPayloadTo16Bit.cpp
|
||||
@@ -153,21 +153,12 @@ void ConvertMSAAPayloadTo16Bit::visitCallInst(CallInst& I)
|
||||
// In OGL there are uses of ldmcs other then ldms, using vec4float type.
|
||||
// Fix them to use newly created 16bit ldmcs.
|
||||
if (ldmcs->getType()->isVectorTy() &&
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
- ldmcs->getType()->getScalarType()->isFloatTy())
|
||||
-#else
|
||||
- ldmcs->getType()->getVectorElementType()->isFloatTy())
|
||||
-#endif
|
||||
+ cast<IGCLLVM::FixedVectorType>(ldmcs->getType())->getElementType()->isFloatTy())
|
||||
{
|
||||
m_builder->SetInsertPoint(ldmcs);
|
||||
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
uint ldmcsNumOfElements = cast<IGCLLVM::FixedVectorType>(ldmcs->getType())->getNumElements();
|
||||
uint new_mcs_callNumOfElements = cast<IGCLLVM::FixedVectorType>(new_mcs_call->getType())->getNumElements();
|
||||
-#else
|
||||
- uint ldmcsNumOfElements = ldmcs->getType()->getVectorNumElements();
|
||||
- uint new_mcs_callNumOfElements = new_mcs_call->getType()->getVectorNumElements();
|
||||
-#endif
|
||||
|
||||
// vec of 16bit ints to vec of 32bit ints
|
||||
Type* new_mcs_callVecType = IGCLLVM::FixedVectorType::get(m_builder->getInt32Ty(), new_mcs_callNumOfElements);
|
||||
diff --git a/IGC/Compiler/GenTTI.cpp b/IGC/Compiler/GenTTI.cpp
|
||||
index 9e4d2f26..53e3ec9e 100644
|
||||
--- a/IGC/Compiler/GenTTI.cpp
|
||||
+++ b/IGC/Compiler/GenTTI.cpp
|
||||
@@ -37,6 +37,7 @@ IN THE SOFTWARE.
|
||||
#include "llvm/Analysis/LoopInfo.h"
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
+#include "llvmWrapper/Transforms/Utils/LoopUtils.h"
|
||||
#include "common/LLVMWarningsPop.hpp"
|
||||
|
||||
using namespace llvm;
|
||||
@@ -216,13 +217,7 @@ namespace llvm {
|
||||
|
||||
// Skip non-simple loop.
|
||||
if (L->getNumBlocks() != 1) {
|
||||
- if (IGC_IS_FLAG_ENABLED(EnableAdvRuntimeUnroll) &&
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
- L->isInnermost()
|
||||
-#else
|
||||
- L->empty()
|
||||
-#endif
|
||||
- ) {
|
||||
+ if (IGC_IS_FLAG_ENABLED(EnableAdvRuntimeUnroll) && IGCLLVM::isInnermost(L)) {
|
||||
auto countNonPHI = [](BasicBlock* BB) {
|
||||
unsigned Total = BB->size();
|
||||
unsigned PHIs = 0;
|
||||
diff --git a/IGC/Compiler/Legalizer/InstPromoter.cpp b/IGC/Compiler/Legalizer/InstPromoter.cpp
|
||||
index 8fadf89f..63cbccb5 100644
|
||||
--- a/IGC/Compiler/Legalizer/InstPromoter.cpp
|
||||
+++ b/IGC/Compiler/Legalizer/InstPromoter.cpp
|
||||
@@ -398,13 +398,7 @@ bool InstPromoter::visitBitCastInst(BitCastInst& I) {
|
||||
IRB->CreateBitCast(Val, IGCLLVM::FixedVectorType::get(DestTy->getScalarType(), N));
|
||||
|
||||
std::vector<Constant*> Vals;
|
||||
- for (unsigned i = 0;
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
- i < cast<IGCLLVM::FixedVectorType>(DestTy)->getNumElements();
|
||||
-#else
|
||||
- i < DestTy->getVectorNumElements();
|
||||
-#endif
|
||||
- i++)
|
||||
+ for (unsigned i = 0; i < cast<IGCLLVM::FixedVectorType>(DestTy)->getNumElements(); i++)
|
||||
Vals.push_back(IRB->getInt32(i));
|
||||
|
||||
Value* Mask = ConstantVector::get(Vals);
|
||||
diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/DeviceEnqueueFuncs/TransformBlocks.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/DeviceEnqueueFuncs/TransformBlocks.cpp
|
||||
index 119520ed..a3681b79 100644
|
||||
--- a/IGC/Compiler/Optimizer/OpenCLPasses/DeviceEnqueueFuncs/TransformBlocks.cpp
|
||||
+++ b/IGC/Compiler/Optimizer/OpenCLPasses/DeviceEnqueueFuncs/TransformBlocks.cpp
|
||||
@@ -952,11 +952,7 @@ namespace //Anonymous
|
||||
{
|
||||
auto ndrangeStructName = "struct.ndrange_t";
|
||||
auto module = _deviceExecCall->getModule();
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
- auto ndrangeTy = llvm::StructType::getTypeByName(module->getContext(), ndrangeStructName);
|
||||
-#else
|
||||
- auto ndrangeTy = module->getTypeByName(ndrangeStructName);
|
||||
-#endif
|
||||
+ auto ndrangeTy = IGCLLVM::getTypeByName(module, ndrangeStructName);
|
||||
if (ndrangeTy == nullptr)
|
||||
{
|
||||
//create struct type
|
||||
diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/WIFuncs/WIFuncResolution.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/WIFuncs/WIFuncResolution.cpp
|
||||
index 535d6268..c23c661d 100644
|
||||
--- a/IGC/Compiler/Optimizer/OpenCLPasses/WIFuncs/WIFuncResolution.cpp
|
||||
+++ b/IGC/Compiler/Optimizer/OpenCLPasses/WIFuncs/WIFuncResolution.cpp
|
||||
@@ -303,11 +303,7 @@ static Value* BuildLoadInst(CallInst& CI, unsigned int Offset, Type* DataType)
|
||||
auto Size = ElemByteSize;
|
||||
if (DataType->isVectorTy())
|
||||
{
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
Size *= cast<IGCLLVM::FixedVectorType>(DataType)->getNumElements();
|
||||
-#else
|
||||
- Size *= DataType->getVectorNumElements();
|
||||
-#endif
|
||||
}
|
||||
unsigned int AlignedOffset = (Offset / ElemByteSize) * ElemByteSize;
|
||||
unsigned int LoadByteSize = (Offset == AlignedOffset) ? Size : Size * 2;
|
||||
diff --git a/IGC/Compiler/Optimizer/Scalarizer.cpp b/IGC/Compiler/Optimizer/Scalarizer.cpp
|
||||
index a4e73a6d..38627553 100644
|
||||
--- a/IGC/Compiler/Optimizer/Scalarizer.cpp
|
||||
+++ b/IGC/Compiler/Optimizer/Scalarizer.cpp
|
||||
@@ -778,7 +778,7 @@ void ScalarizeFunction::scalarizeInstruction(ShuffleVectorInst* SI)
|
||||
|
||||
// Generate array for shuffled scalar values
|
||||
SmallVector<Value*, MAX_INPUT_VECTOR_WIDTH>newVector;
|
||||
- unsigned width = int_cast<unsigned>(dyn_cast<IGCLLVM::FixedVectorType>(SI->getType())->getNumElements());
|
||||
+ unsigned width = int_cast<unsigned>(cast<IGCLLVM::FixedVectorType>(SI->getType())->getNumElements());
|
||||
|
||||
// Generate undef value, which may be needed as some scalar elements
|
||||
UndefValue* undef = UndefValue::get(inputType->getElementType());
|
||||
diff --git a/IGC/WrapperLLVM/include/llvmWrapper/IR/DerivedTypes.h b/IGC/WrapperLLVM/include/llvmWrapper/IR/DerivedTypes.h
|
||||
index a3f5a0b8..6a5407bb 100644
|
||||
--- a/IGC/WrapperLLVM/include/llvmWrapper/IR/DerivedTypes.h
|
||||
+++ b/IGC/WrapperLLVM/include/llvmWrapper/IR/DerivedTypes.h
|
||||
@@ -29,6 +29,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
#include "llvm/Config/llvm-config.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
+#include "llvm/IR/Module.h"
|
||||
|
||||
namespace IGCLLVM
|
||||
{
|
||||
@@ -62,6 +63,15 @@ namespace IGCLLVM
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+ inline llvm::StructType *getTypeByName(llvm::Module *M, llvm::StringRef Name) {
|
||||
+#if LLVM_VERSION_MAJOR >= 12
|
||||
+ return llvm::StructType::getTypeByName(M->getContext(), Name);
|
||||
+#else
|
||||
+ return M->getTypeByName(Name);
|
||||
+#endif
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
#endif
|
||||
diff --git a/IGC/WrapperLLVM/include/llvmWrapper/Support/TypeSize.h b/IGC/WrapperLLVM/include/llvmWrapper/Support/TypeSize.h
|
||||
index 30e29720..7021820c 100644
|
||||
--- a/IGC/WrapperLLVM/include/llvmWrapper/Support/TypeSize.h
|
||||
+++ b/IGC/WrapperLLVM/include/llvmWrapper/Support/TypeSize.h
|
||||
@@ -39,12 +39,10 @@ inline unsigned getElementCount(unsigned EC) { return EC; }
|
||||
inline ElementCount getElementCount(unsigned EC) {
|
||||
return ElementCount(EC, false);
|
||||
}
|
||||
-#elif LLVM_VERSION_MAJOR == 12
|
||||
+#else
|
||||
inline ElementCount getElementCount(unsigned EC) {
|
||||
return ElementCount::get(EC, false);
|
||||
}
|
||||
-#else
|
||||
-#error "unsupported LLVM version"
|
||||
#endif
|
||||
} // namespace IGCLLVM
|
||||
|
||||
diff --git a/IGC/WrapperLLVM/include/llvmWrapper/Transforms/Utils/LoopUtils.h b/IGC/WrapperLLVM/include/llvmWrapper/Transforms/Utils/LoopUtils.h
|
||||
index db47b00b..bce9cfc1 100644
|
||||
--- a/IGC/WrapperLLVM/include/llvmWrapper/Transforms/Utils/LoopUtils.h
|
||||
+++ b/IGC/WrapperLLVM/include/llvmWrapper/Transforms/Utils/LoopUtils.h
|
||||
@@ -41,6 +41,14 @@ namespace IGCLLVM
|
||||
return llvm::InsertPreheaderForLoop(L, DT, LI, nullptr, PreserveLCSSA);
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+ inline bool isInnermost(llvm::Loop *L) {
|
||||
+#if LLVM_VERSION_MAJOR >= 12
|
||||
+ return L->isInnermost();
|
||||
+#else
|
||||
+ return L->empty();
|
||||
+#endif
|
||||
+ }
|
||||
}
|
||||
|
||||
#endif
|
||||
diff --git a/IGC/common/igc_resourceDimTypes.h b/IGC/common/igc_resourceDimTypes.h
|
||||
index d790330f..2d675969 100644
|
||||
--- a/IGC/common/igc_resourceDimTypes.h
|
||||
+++ b/IGC/common/igc_resourceDimTypes.h
|
||||
@@ -67,10 +67,9 @@ namespace IGC
|
||||
resourceDimTypeId == DIM_3D_TYPE || resourceDimTypeId == DIM_CUBE_TYPE || resourceDimTypeId == DIM_CUBE_ARRAY_TYPE));
|
||||
|
||||
#if LLVM_VERSION_MAJOR >= 12
|
||||
- llvm::LLVMContext& llvmCtx = module.getContext();
|
||||
- return llvm::StructType::getTypeByName(llvmCtx, ResourceDimensionTypeName[resourceDimTypeId]);
|
||||
+ return llvm::StructType::getTypeByName(module.getContext(), ResourceDimensionTypeName[resourceDimTypeId]);
|
||||
#else
|
||||
return module.getTypeByName(ResourceDimensionTypeName[resourceDimTypeId]);
|
||||
#endif
|
||||
}
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
From 2fa3f2da1179bd5b2eeac82839d386f0111e611c Mon Sep 17 00:00:00 2001
|
||||
From c2b7f30dd56568482b1b7c2f22bafdf68736fc88 Mon Sep 17 00:00:00 2001
|
||||
From: Lee Chee Yang <chee.yang.lee@intel.com>
|
||||
Date: Wed, 2 Sep 2020 08:28:35 +0800
|
||||
Subject: [PATCH] Improve Reproducibility for src package
|
||||
Subject: [PATCH 3/5] Improve Reproducibility for src package
|
||||
|
||||
Improve reproducibility for intel-graphics-compiler-src package.
|
||||
needs to pass build path as environment variable to the build.
|
||||
|
@ -14,10 +14,10 @@ Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
|
|||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/visa/CMakeLists.txt b/visa/CMakeLists.txt
|
||||
index 981c35d2..d5944370 100644
|
||||
index 65dbb4934..8cd607a69 100644
|
||||
--- a/visa/CMakeLists.txt
|
||||
+++ b/visa/CMakeLists.txt
|
||||
@@ -109,8 +109,11 @@ endif()
|
||||
@@ -123,8 +123,11 @@ endif()
|
||||
set(bison_output_file ${CMAKE_CURRENT_BINARY_DIR}/CISA.tab.cpp)
|
||||
set(flex_output_file ${CMAKE_CURRENT_BINARY_DIR}/lex.CISA.cpp)
|
||||
|
||||
|
@ -32,5 +32,5 @@ index 981c35d2..d5944370 100644
|
|||
set(CISAScanner_dependencies)
|
||||
|
||||
--
|
||||
2.28.0
|
||||
2.20.1
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
From c6d333637537263930acb1b6c5dadb0467d745f6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= <zboszor@pr.hu>
|
||||
Date: Fri, 26 Feb 2021 06:39:35 +0100
|
||||
Subject: [PATCH 3/3] Review fixes for LLVM 12 phase 2
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Upstream-Status: Pending
|
||||
|
||||
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
---
|
||||
IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp | 4 ----
|
||||
.../AddressSpaceAliasAnalysis.cpp | 10 +++++-----
|
||||
.../PrivateMemory/PrivateMemoryResolution.cpp | 4 ----
|
||||
IGC/DebugInfo/DebugInfoUtils.hpp | 4 ----
|
||||
IGC/DebugInfo/DwarfDebug.cpp | 8 --------
|
||||
5 files changed, 5 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
|
||||
index 12f42be8..c4f9d1ea 100644
|
||||
--- a/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
|
||||
+++ b/IGC/AdaptorOCL/SPIRV/SPIRVReader.cpp
|
||||
@@ -1576,11 +1576,7 @@ void SPIRVToLLVMDbgTran::transDbgInfo(SPIRVValue *SV, Value *V) {
|
||||
Line->getColumn(), scope, iat);
|
||||
|
||||
if(scope && !isa<DIFile>(scope))
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
I->setDebugLoc(DILocation::get(scope->getContext(), Line->getLine(), Line->getColumn(),
|
||||
-#else
|
||||
- I->setDebugLoc(DebugLoc::get(Line->getLine(), Line->getColumn(),
|
||||
-#endif
|
||||
scope, iat));
|
||||
}
|
||||
}
|
||||
diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp
|
||||
index e9c07b34..b6b779da 100644
|
||||
--- a/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp
|
||||
+++ b/IGC/Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.cpp
|
||||
@@ -23,8 +23,7 @@ IN THE SOFTWARE.
|
||||
============================= end_copyright_notice ===========================*/
|
||||
|
||||
#include "llvm/Config/llvm-config.h"
|
||||
-#include "llvmWrapper/IR/DerivedTypes.h"
|
||||
-#include "llvmWrapper/Analysis/TargetLibraryInfo.h"
|
||||
+#include <llvm/Analysis/TargetLibraryInfo.h>
|
||||
#include "Compiler/Optimizer/OpenCLPasses/AddressSpaceAliasAnalysis/AddressSpaceAliasAnalysis.h"
|
||||
#include "Compiler/CodeGenPublic.h"
|
||||
#include "Compiler/IGCPassSupport.h"
|
||||
@@ -180,11 +179,12 @@ namespace {
|
||||
bool doInitialization(Module& M) override {
|
||||
if(M.size() > 0)
|
||||
{
|
||||
+ Result.reset(new AddressSpaceAAResult(
|
||||
+ getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(
|
||||
#if LLVM_VERSION_MAJOR >= 10
|
||||
- Function &F = *M.begin();
|
||||
+ *M.begin()
|
||||
#endif
|
||||
- Result.reset(new AddressSpaceAAResult(
|
||||
- getAnalysis<TargetLibraryInfoWrapperPass>().getTLI(),
|
||||
+ ),
|
||||
*getAnalysis<CodeGenContextWrapper>().getCodeGenContext()));
|
||||
}
|
||||
return false;
|
||||
diff --git a/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp b/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp
|
||||
index 07f85f4c..98ea616f 100644
|
||||
--- a/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp
|
||||
+++ b/IGC/Compiler/Optimizer/OpenCLPasses/PrivateMemory/PrivateMemoryResolution.cpp
|
||||
@@ -816,11 +816,7 @@ bool PrivateMemoryResolution::resolveAllocaInstructions(bool privateOnStack)
|
||||
// Construct an empty DebugLoc.
|
||||
IF_DEBUG_INFO(DebugLoc entryDebugLoc);
|
||||
// Assign with the function location if available.
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
IF_DEBUG_INFO_IF(DISubprogram *subprogram = m_currFunction->getSubprogram(), entryDebugLoc = DILocation::get(subprogram->getContext(), subprogram->getLine(), 0, subprogram););
|
||||
-#else
|
||||
- IF_DEBUG_INFO_IF(DISubprogram *subprogram = m_currFunction->getSubprogram(), entryDebugLoc = DebugLoc::get(subprogram->getLine(), 0, subprogram););
|
||||
-#endif
|
||||
IF_DEBUG_INFO(entryBuilder.SetCurrentDebugLocation(entryDebugLoc));
|
||||
|
||||
if (privateOnStack)
|
||||
diff --git a/IGC/DebugInfo/DebugInfoUtils.hpp b/IGC/DebugInfo/DebugInfoUtils.hpp
|
||||
index b77a550d..88b30a75 100644
|
||||
--- a/IGC/DebugInfo/DebugInfoUtils.hpp
|
||||
+++ b/IGC/DebugInfo/DebugInfoUtils.hpp
|
||||
@@ -108,11 +108,7 @@ namespace IGC
|
||||
IGCLLVM::DIBuilder Builder(M);
|
||||
llvm::DIGlobalVariable* GV = GVs[j]->getVariable();
|
||||
llvm::DIScope* scopeToUse = GV->getScope();
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
llvm::DILocation* locToUse = llvm::DILocation::get(scopeToUse->getContext(), GV->getLine(), 0, scopeToUse, loc);
|
||||
-#else
|
||||
- llvm::DILocation* locToUse = llvm::DebugLoc::get(GV->getLine(), 0, scopeToUse, loc);
|
||||
-#endif
|
||||
if (llvm::isa<llvm::DICompileUnit>(GV->getScope()))
|
||||
{
|
||||
// Function has no DebugLoc so it is either internal
|
||||
diff --git a/IGC/DebugInfo/DwarfDebug.cpp b/IGC/DebugInfo/DwarfDebug.cpp
|
||||
index bd9f17b7..3d9f0835 100644
|
||||
--- a/IGC/DebugInfo/DwarfDebug.cpp
|
||||
+++ b/IGC/DebugInfo/DwarfDebug.cpp
|
||||
@@ -2102,17 +2102,9 @@ static DebugLoc getFnDebugLoc(DebugLoc DL, const LLVMContext& Ctx)
|
||||
// Check for number of operands since the compatibility is cheap here.
|
||||
if (SP->getNumOperands() > 19)
|
||||
{
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
return DILocation::get(SP->getContext(), SP->getScopeLine(), 0, SP);
|
||||
-#else
|
||||
- return DebugLoc::get(SP->getScopeLine(), 0, SP);
|
||||
-#endif
|
||||
}
|
||||
-#if LLVM_VERSION_MAJOR >= 12
|
||||
return DILocation::get(SP->getContext(), SP->getLine(), 0, SP);
|
||||
-#else
|
||||
- return DebugLoc::get(SP->getLine(), 0, SP);
|
||||
-#endif
|
||||
}
|
||||
|
||||
return DebugLoc();
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
From c9fe51ec555fadd098cfc98804ce91b1cf3029d4 Mon Sep 17 00:00:00 2001
|
||||
From: Dongwon Kim <dongwon.kim@intel.com>
|
||||
Date: Thu, 19 Aug 2021 08:28:03 -0700
|
||||
Subject: [PATCH 4/5] find external llvm-tblgen
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
|
||||
---
|
||||
IGC/cmake/igc_llvm.cmake | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/IGC/cmake/igc_llvm.cmake b/IGC/cmake/igc_llvm.cmake
|
||||
index 541793f21..bc82922b1 100644
|
||||
--- a/IGC/cmake/igc_llvm.cmake
|
||||
+++ b/IGC/cmake/igc_llvm.cmake
|
||||
@@ -24,7 +24,10 @@ set(CMAKE_MODULE_PATH
|
||||
${CMAKE_MODULE_PATH}
|
||||
)
|
||||
|
||||
-set(LLVM_TABLEGEN_EXE "llvm-tblgen")
|
||||
+find_program(LLVM_TABLEGEN_EXE "llvm-tblgen")
|
||||
+if(LLVM_TABLEGEN_EXE-NOTFOUND)
|
||||
+ message(FATAL_ERROR "[VC] llvm-tblgen is not found")
|
||||
+endif()
|
||||
|
||||
include(AddLLVM)
|
||||
include(TableGen)
|
||||
--
|
||||
2.20.1
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -1,71 +0,0 @@
|
|||
From 11b923c99cbe3580885ce40c322277fc823107a0 Mon Sep 17 00:00:00 2001
|
||||
From: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
Date: Tue, 2 Feb 2021 13:39:53 +0800
|
||||
Subject: [PATCH] IGC/VectorCompiler/CMakeLists.txt: link to external
|
||||
LLVMGenXIntrinsics
|
||||
|
||||
By default LLVMGenXIntrinsics is to be build In-tree, but we want to
|
||||
link externally.
|
||||
|
||||
Fix llvm-tblgen path.
|
||||
|
||||
Upstream-Status: Inappropriate [configuration specific]
|
||||
|
||||
Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
|
||||
---
|
||||
IGC/VectorCompiler/CMakeLists.txt | 32 ++-----------------------------
|
||||
1 file changed, 2 insertions(+), 30 deletions(-)
|
||||
|
||||
diff --git a/IGC/VectorCompiler/CMakeLists.txt b/IGC/VectorCompiler/CMakeLists.txt
|
||||
index 86f343ee..b4268160 100644
|
||||
--- a/IGC/VectorCompiler/CMakeLists.txt
|
||||
+++ b/IGC/VectorCompiler/CMakeLists.txt
|
||||
@@ -53,10 +53,7 @@ if(IGC_BUILD__USING_SYSTEM_LLVM OR (WIN32 AND LLVM_USE_PREBUILT))
|
||||
message(STATUS "[VC] Using system llvm")
|
||||
|
||||
# Need to search for llvm-tblgen
|
||||
- find_program(LLVM_TABLEGEN_EXE "llvm-tblgen"
|
||||
- ${LLVM_TOOLS_BINARY_DIR}
|
||||
- NO_DEFAULT_PATH
|
||||
- )
|
||||
+ find_program(LLVM_TABLEGEN_EXE "llvm-tblgen")
|
||||
if(LLVM_TABLEGEN_EXE-NOTFOUND)
|
||||
message(FATAL_ERROR "[VC] llvm-tblgen is not found")
|
||||
endif()
|
||||
@@ -140,32 +137,7 @@ if(LLVM_ON_WIN32)
|
||||
add_compile_options(/wd4141)
|
||||
endif()
|
||||
|
||||
-if(DEFINED VC_INTRINSICS_SRC)
|
||||
- set(INTRSRC "${VC_INTRINSICS_SRC}/GenXIntrinsics")
|
||||
-endif()
|
||||
-
|
||||
-if(NOT DEFINED INTRSRC)
|
||||
- set(INTRSRC "${CMAKE_CURRENT_SOURCE_DIR}/../../../vc-intrinsics/GenXIntrinsics")
|
||||
-endif()
|
||||
-
|
||||
-message(STATUS "[VC] Using vc-intrinsics source from: ${INTRSRC}")
|
||||
-
|
||||
-# We are using prebuilt SPIRV and building intrinsics.
|
||||
-set(INTRBUILD "${CMAKE_CURRENT_BINARY_DIR}/intrbuild")
|
||||
-add_subdirectory(${INTRSRC} ${INTRBUILD})
|
||||
-# Make separate target for intrinstics headers.
|
||||
-# Ideally, this should be inside intrinsics, but
|
||||
-# this breaks in-tree build of intrinsics with LLVM.
|
||||
-add_library(VCIntrinsicsHeaders INTERFACE)
|
||||
-target_include_directories(VCIntrinsicsHeaders
|
||||
- INTERFACE
|
||||
- ${INTRSRC}/include
|
||||
- ${INTRBUILD}/include
|
||||
- )
|
||||
-add_dependencies(VCIntrinsicsHeaders
|
||||
- GenXIntrinsics
|
||||
- )
|
||||
-
|
||||
+find_package(LLVMGenXIntrinsics REQUIRED)
|
||||
include(cmake/spirv.cmake)
|
||||
include(${IGC_SOURCE_DIR}/cmake/utils.cmake)
|
||||
|
||||
--
|
||||
2.17.1
|
||||
|
|
@ -5,19 +5,18 @@ hardware architecture."
|
|||
|
||||
LICENSE = "MIT & BSD-3-Clause"
|
||||
LIC_FILES_CHKSUM = "file://IGC/BiFModule/Implementation/ExternalLibraries/libclc/LICENSE.TXT;md5=311cfc1a5b54bab8ed34a0b5fba4373e \
|
||||
file://IGC/Compiler/LegalizationPass.cpp;beginline=1;endline=23;md5=8b19c5999abc484f18232b0905367f9f \
|
||||
file://NOTICES.txt;md5=b12e73994de4fbe0f688cf0bc91512a0"
|
||||
file://IGC/Compiler/LegalizationPass.cpp;beginline=1;endline=23;md5=4a985f2545dd5a846e205b1e60a51cd9 \
|
||||
file://NOTICES.txt;md5=db621145dfb627436bc90ad600386801"
|
||||
|
||||
SRC_URI = "git://github.com/intel/intel-graphics-compiler.git;protocol=https; \
|
||||
file://0001-skip-execution-of-ElfPackager.patch \
|
||||
file://link-to-LLVMGenXIntrinsics.patch \
|
||||
file://improve_src_package_reproducibility.patch \
|
||||
file://0001-Fix-build-with-LLVM-12.patch \
|
||||
file://0002-Review-fixes-for-LLVM-12-phase-1.patch \
|
||||
file://0003-Review-fixes-for-LLVM-12-phase-2.patch \
|
||||
file://0002-IGC-VectorCompiler-CMakeLists.txt-link-to-external-L.patch \
|
||||
file://0003-Improve-Reproducibility-for-src-package.patch \
|
||||
file://0004-find-external-llvm-tblgen.patch \
|
||||
file://0005-Temporary-LLVM-12-compatiblity-fix.patch \
|
||||
"
|
||||
|
||||
SRCREV = "535aaaef03ce338e05e6162118082e6e007e8c10"
|
||||
SRCREV = "5d5672d6cc0c415dae76648390026f777004bd99"
|
||||
|
||||
# Used to replace with relative path in reproducibility patch
|
||||
export B
|
Loading…
Reference in New Issue
Block a user