-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CIR][ABI][NFC] Add CC lowering for void CallOps (#668)
This patch implements the lowering of function calls that receive and return void. In practice, nothing has to be done (at least for the x86 ABI), so this case is used as a primer for the target lowering library since it helps populate the base logic for handling calling convention lowering of function calls.
- Loading branch information
1 parent
5e9148f
commit 66bb15b
Showing
31 changed files
with
850 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#ifndef CIR_FNINFOOPTS_H | ||
#define CIR_FNINFOOPTS_H | ||
|
||
#include "llvm/ADT/STLForwardCompat.h" | ||
|
||
namespace cir { | ||
|
||
enum class FnInfoOpts { | ||
None = 0, | ||
IsInstanceMethod = 1 << 0, | ||
IsChainCall = 1 << 1, | ||
IsDelegateCall = 1 << 2, | ||
}; | ||
|
||
inline FnInfoOpts operator|(FnInfoOpts A, FnInfoOpts B) { | ||
return static_cast<FnInfoOpts>(llvm::to_underlying(A) | | ||
llvm::to_underlying(B)); | ||
} | ||
|
||
inline FnInfoOpts operator&(FnInfoOpts A, FnInfoOpts B) { | ||
return static_cast<FnInfoOpts>(llvm::to_underlying(A) & | ||
llvm::to_underlying(B)); | ||
} | ||
|
||
inline FnInfoOpts operator|=(FnInfoOpts A, FnInfoOpts B) { | ||
A = A | B; | ||
return A; | ||
} | ||
|
||
inline FnInfoOpts operator&=(FnInfoOpts A, FnInfoOpts B) { | ||
A = A & B; | ||
return A; | ||
} | ||
|
||
} // namespace cir | ||
|
||
#endif // CIR_FNINFOOPTS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//==-- x86.h - Definitions common to all x86 ABI variants ------------------==// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// Definitions common to any X86 ABI implementation. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef CIR_X86_H | ||
#define CIR_X86_H | ||
|
||
namespace cir { | ||
|
||
// Possible argument classifications according to the x86 ABI documentation. | ||
enum X86ArgClass { | ||
Integer = 0, | ||
SSE, | ||
SSEUp, | ||
X87, | ||
X87Up, | ||
ComplexX87, | ||
NoClass, | ||
Memory | ||
}; | ||
|
||
} // namespace cir | ||
|
||
#endif // CIR_X86_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.