Skip to content

Commit 3a6618f

Browse files
sys-igcigcbot
authored andcommitted
Changes in code.
1 parent 68872ab commit 3a6618f

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

IGC/VectorCompiler/lib/GenXCodeGen/GenXPrologEpilogInsertion.cpp

+2-10
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,6 @@ SPDX-License-Identifier: MIT
7474
using namespace llvm;
7575
using namespace genx;
7676

77-
static cl::opt<unsigned> ArgRegSizeInGRFsOpt(
78-
"vc-arg-reg-size", cl::init(visa::ArgRegSizeInGRFs), cl::Hidden,
79-
cl::desc("Set max ARG size in registers to use for arguments passing"));
80-
81-
static cl::opt<unsigned> RetRegSizeInGRFsOpt(
82-
"vc-ret-reg-size", cl::init(visa::RetRegSizeInGRFs), cl::Hidden,
83-
cl::desc("Set max RET size in registers to use for return value passing"));
84-
8577
namespace {
8678

8779
inline unsigned calcPadding(uint64_t Val, unsigned Align) {
@@ -414,8 +406,8 @@ bool GenXPrologEpilogInsertion::runOnFunction(Function &F) {
414406
ST = &getAnalysis<TargetPassConfig>()
415407
.getTM<GenXTargetMachine>()
416408
.getGenXSubtarget();
417-
ArgRegByteSize = ArgRegSizeInGRFsOpt * ST->getGRFByteSize();
418-
RetRegByteSize = RetRegSizeInGRFsOpt * ST->getGRFByteSize();
409+
ArgRegByteSize = visa::ArgRegSizeInGRFs * ST->getGRFByteSize();
410+
RetRegByteSize = visa::RetRegSizeInGRFs * ST->getGRFByteSize();
419411
LLVM_DEBUG(dbgs() << "ArgReg size is " << ArgRegByteSize << "\n");
420412
LLVM_DEBUG(dbgs() << "RetReg size is " << RetRegByteSize << "\n");
421413
if (!(BEConf->useNewStackBuilder() && ST->isOCLRuntime())) {

IGC/VectorCompiler/lib/GenXCodeGen/GenXVisa.h

+2-4
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,8 @@ namespace llvm {
5959
RSI_Stateless = 255 // 255 is stateless, which is T5 in vISA
6060
};
6161

62-
// In vISA spec max ARG size is 32 registers and RET is 12. But IGC calling
63-
// convention limits them to 12 and 4.
64-
constexpr static unsigned ArgRegSizeInGRFs = 12;
65-
constexpr static unsigned RetRegSizeInGRFs = 4;
62+
constexpr static unsigned ArgRegSizeInGRFs = 32;
63+
constexpr static unsigned RetRegSizeInGRFs = 12;
6664
constexpr static unsigned BytesPerSVMPtr = 8;
6765
constexpr static unsigned BytesPerOword = 16;
6866
constexpr static unsigned StackPerThreadScratch = 256;

0 commit comments

Comments
 (0)