Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JIT: Avoid check for returns in methods with pinvokes in LSRA #103559

Merged
merged 2 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions src/coreclr/jit/lsrabuild.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,16 +620,6 @@ RefPosition* LinearScan::newRefPosition(Interval* theInterval,
// Spill info
newRP->isFixedRegRef = isFixedRegister;

#ifndef TARGET_AMD64
// We don't need this for AMD because the PInvoke method epilog code is explicit
// at register allocation time.
if (theInterval != nullptr && theInterval->isLocalVar && compiler->compMethodRequiresPInvokeFrame() &&
theInterval->varNum == compiler->genReturnLocal)
{
mask &= ~(RBM_PINVOKE_TCB | RBM_PINVOKE_FRAME).GetRegSetForType(theInterval->registerType);
noway_assert(mask != RBM_NONE);
}
#endif // !TARGET_AMD64
newRP->registerAssignment = mask;

newRP->setMultiRegIdx(multiRegIdx);
Expand Down
8 changes: 0 additions & 8 deletions src/coreclr/jit/targetamd64.h
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,6 @@
#define REG_SECRET_STUB_PARAM REG_R10
#define RBM_SECRET_STUB_PARAM RBM_R10

// Registers used by PInvoke frame setup
#define REG_PINVOKE_FRAME REG_EDI
#define RBM_PINVOKE_FRAME RBM_EDI
#define REG_PINVOKE_TCB REG_EAX
#define RBM_PINVOKE_TCB RBM_EAX
#define REG_PINVOKE_SCRATCH REG_EAX
#define RBM_PINVOKE_SCRATCH RBM_EAX

// The following defines are useful for iterating a regNumber
#define REG_FIRST REG_EAX
#define REG_INT_FIRST REG_EAX
Expand Down
8 changes: 0 additions & 8 deletions src/coreclr/jit/targetarm64.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,6 @@
// JMP Indirect call register
#define REG_INDIRECT_CALL_TARGET_REG REG_IP0

// Registers used by PInvoke frame setup
#define REG_PINVOKE_FRAME REG_R9
#define RBM_PINVOKE_FRAME RBM_R9
#define REG_PINVOKE_TCB REG_R10
#define RBM_PINVOKE_TCB RBM_R10
#define REG_PINVOKE_SCRATCH REG_R10
#define RBM_PINVOKE_SCRATCH RBM_R10

// The following defines are useful for iterating a regNumber
#define REG_FIRST REG_R0
#define REG_INT_FIRST REG_R0
Expand Down
8 changes: 0 additions & 8 deletions src/coreclr/jit/targetloongarch64.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,14 +195,6 @@

#define REG_INDIRECT_CALL_TARGET_REG REG_T6

// Registers used by PInvoke frame setup
#define REG_PINVOKE_FRAME REG_T0
#define RBM_PINVOKE_FRAME RBM_T0
#define REG_PINVOKE_TCB REG_T1
#define RBM_PINVOKE_TCB RBM_T1
#define REG_PINVOKE_SCRATCH REG_T1
#define RBM_PINVOKE_SCRATCH RBM_T1

// The following defines are useful for iterating a regNumber
#define REG_FIRST REG_R0
#define REG_INT_FIRST REG_R0
Expand Down
8 changes: 0 additions & 8 deletions src/coreclr/jit/targetriscv64.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,6 @@
// JMP Indirect call register
#define REG_INDIRECT_CALL_TARGET_REG REG_T5

// Registers used by PInvoke frame setup
#define REG_PINVOKE_FRAME REG_T0
#define RBM_PINVOKE_FRAME RBM_T0
#define REG_PINVOKE_TCB REG_T1
#define RBM_PINVOKE_TCB RBM_T1
#define REG_PINVOKE_SCRATCH REG_T1
#define RBM_PINVOKE_SCRATCH RBM_T1

// The following defines are useful for iterating a regNumber
#define REG_FIRST REG_R0
#define REG_INT_FIRST REG_R0
Expand Down
Loading