Skip to content

Commit 8afdd3d

Browse files
scottp101igcbot
authored andcommitted
inlineDynConstants to FunctionMetaData
1 parent 95555b4 commit 8afdd3d

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

IGC/Compiler/CodeGenContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,7 @@ namespace IGC
594594
return llvmCtxWrapper;
595595
}
596596

597-
IGC::IGCMD::MetaDataUtils* CodeGenContext::getMetaDataUtils()
597+
IGC::IGCMD::MetaDataUtils* CodeGenContext::getMetaDataUtils() const
598598
{
599599
IGC_ASSERT_MESSAGE(nullptr != m_pMdUtils, "Metadata Utils is not initialized");
600600
return m_pMdUtils;

IGC/Compiler/CodeGenPublic.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ namespace IGC
10041004

10051005
void initLLVMContextWrapper(bool createResourceDimTypes = true);
10061006
llvm::LLVMContext* getLLVMContext() const;
1007-
IGC::IGCMD::MetaDataUtils* getMetaDataUtils();
1007+
IGC::IGCMD::MetaDataUtils* getMetaDataUtils() const;
10081008
IGCLLVM::Module* getModule() const;
10091009

10101010
void setModule(llvm::Module* m);

IGC/common/MDFrameWork.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,23 @@ namespace IGC
177177
};
178178

179179

180+
struct ConstantAddress
181+
{
182+
unsigned int bufId = 0;
183+
unsigned int eltId = 0;
184+
unsigned int size = 0;
185+
};
186+
187+
bool operator < (const ConstantAddress &a, const ConstantAddress &b);
188+
180189
//to hold metadata of every function
181190
struct FunctionMetaData
182191
{
183192
std::vector<LocalOffsetMD> localOffsets;
184193
WorkGroupWalkOrderMD workGroupWalkOrder;
185194
std::vector<FuncArgMD> funcArgs;
186195
FunctionTypeMD functionType = KernelFunction;
196+
std::map<ConstantAddress, uint32_t> inlineDynConstants;
187197
ResourceAllocMD resAllocMD;
188198
std::vector<unsigned> maxByteOffsets;
189199
bool IsInitializer = false;
@@ -349,15 +359,6 @@ namespace IGC
349359
std::map<unsigned int, int> simplePushLoads;
350360
};
351361

352-
struct ConstantAddress
353-
{
354-
unsigned int bufId = 0;
355-
unsigned int eltId = 0;
356-
unsigned int size = 0;
357-
};
358-
359-
bool operator < (const ConstantAddress &a, const ConstantAddress &b);
360-
361362
struct StatelessPushInfo
362363
{
363364
unsigned int addressOffset = 0;
@@ -449,7 +450,6 @@ namespace IGC
449450
PixelShaderInfo psInfo;
450451
ComputeShaderInfo csInfo;
451452
uint32_t CurUniqueIndirectIdx = DefaultIndirectIdx;
452-
std::map<ConstantAddress, uint32_t> inlineDynConstants;
453453
std::map<uint32_t, std::array<uint32_t, 4>> inlineDynTextures;
454454
std::vector<InlineResInfo> inlineResInfoData;
455455
ImmConstantInfo immConstant;

0 commit comments

Comments
 (0)