Skip to content

Commit f82224a

Browse files
sys-igcigcbot
authored andcommitted
[Autobackout][FunctionalRegression]Revert of change: 61e417b: Allow customizing function patch names
This change is to allow the compiler to set a customized function patch names.
1 parent 61e417b commit f82224a

File tree

7 files changed

+10
-19
lines changed

7 files changed

+10
-19
lines changed

IGC/Compiler/CISACodeGen/CISABuilder.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5658,10 +5658,9 @@ void CEncoder::Compile(bool hasSymbolTable, GenXFunctionGroupAnalysis *&pFGA) {
56585658
}
56595659
}
56605660

5661-
if (dbgSize > 0) {
5662-
dbgInfo = IGC::aligned_malloc(dbgSize, sizeof(void *));
5663-
memcpy_s(dbgInfo, dbgSize, genxdbgInfo, dbgSize);
5664-
}
5661+
dbgInfo = IGC::aligned_malloc(dbgSize, sizeof(void *));
5662+
5663+
memcpy_s(dbgInfo, dbgSize, genxdbgInfo, dbgSize);
56655664

56665665
freeBlock(genxdbgInfo);
56675666
}

IGC/Compiler/CISACodeGen/CShader.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,13 +614,10 @@ void CShader::AllocateNOSConstants(uint &offset) {
614614
offset += m_State.m_NOSBufferSize;
615615
}
616616

617-
CVariable *CShader::CreateFunctionSymbol(llvm::Function *pFunc, StringRef symbolName) {
617+
CVariable *CShader::CreateFunctionSymbol(llvm::Function *pFunc) {
618618
// Functions with uses in this module requires relocation
619619
CVariable *funcAddr = GetSymbol(pFunc);
620620
std::string funcName = pFunc->getName().str();
621-
if (!symbolName.empty()) {
622-
funcName = symbolName.str();
623-
}
624621
encoder.AddVISASymbol(funcName, funcAddr);
625622
encoder.Push();
626623

IGC/Compiler/CISACodeGen/EmitVISAPass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8991,9 +8991,9 @@ void EmitPass::EmitGenIntrinsicMessage(llvm::GenIntrinsicInst *inst) {
89918991
emitPredicatedStore(inst);
89928992
break;
89938993
default:
8994-
// we assume that some of gen-intrinsic should always be pattern-matched away,
8995-
// therefore we do not handle them in visa-emission.
8996-
// let us know if you see a case that hits this assertion by those intrinsics
8994+
// we assume that some of gen-intrinsic should always be pattern-matched
8995+
// away, therefore we do not handle them in visa-emission. let us know if
8996+
// you see a case that hits this assertion by those intrinsics
89978997
inst->print(IGC::Debug::ods());
89988998
IGC_ASSERT_MESSAGE(0, "unknown intrinsic");
89998999
break;

IGC/Compiler/CISACodeGen/ShaderCodeGen.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ class CShader {
264264
void CreateConstantBufferOutput(SKernelProgram *pKernelProgram) {
265265
m_State.CreateConstantBufferOutput(pKernelProgram);
266266
}
267-
CVariable *CreateFunctionSymbol(llvm::Function *pFunc, StringRef symbolName = "");
267+
CVariable *CreateFunctionSymbol(llvm::Function *pFunc);
268268
CVariable *CreateGlobalSymbol(llvm::GlobalVariable *pGlobal);
269269

270270
CVariable *GetStructVariable(llvm::Value *v);

IGC/GenISAIntrinsics/GenIntrinsicInst.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1753,7 +1753,6 @@ class GetShaderRecordPtrIntrinsic : public GenIntrinsicInst {
17531753
static inline bool classof(const Value *V) { return isa<GenIntrinsicInst>(V) && classof(cast<GenIntrinsicInst>(V)); }
17541754

17551755
Function *getContinuationFn() const { return cast<Function>(getOperand(0)->stripPointerCasts()); }
1756-
uint32_t getContinuationID() const { return (uint32_t)cast<ConstantInt>(getOperand(1))->getZExtValue(); }
17571756
};
17581757

17591758
class PayloadPtrIntrinsic : public GenIntrinsicInst {

IGC/GenISAIntrinsics/generator/Intrinsic_generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,13 +139,13 @@ def get_argument_entry(cls, arg, is_last):
139139
@classmethod
140140
def get_comment(cls ,comment):
141141
if cls.use_comments:
142-
output = '"{}"'.format(comment.strip())
142+
output = '"{}"'.format(comment)
143143
return output
144144
return '""'
145145

146146
@staticmethod
147147
def get_argument_comment(comment, is_last):
148-
output = IntrinsicFormatter.get_comment(comment.strip())
148+
output = IntrinsicFormatter.get_comment(comment)
149149
if not is_last:
150150
output = "{},".format(output)
151151
return output

IGC/GenISAIntrinsics/generator/input/Intrinsic_definitions.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11094,10 +11094,6 @@ intrinsics:
1109411094
name: Arg0
1109511095
type_definition: *p0_i8_
1109611096
comment: ""
11097-
- !<ArgumentDefinition>
11098-
name: Arg1
11099-
type_definition: *i32
11100-
comment: "continuation index"
1110111097
attributes:
1110211098
- !AttributeID "NoUnwind"
1110311099
- !AttributeID "WillReturn"

0 commit comments

Comments
 (0)