mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Allow inlining of functions with returns_twice calls, if they have the
attribute themselve. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146851 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -120,10 +120,12 @@ class MachineFunction {
|
||||
/// Alignment - The alignment of the function.
|
||||
unsigned Alignment;
|
||||
|
||||
/// CallsSetJmp - True if the function calls setjmp or sigsetjmp. This is used
|
||||
/// to limit optimizations which cannot reason about the control flow of
|
||||
/// setjmp.
|
||||
bool CallsSetJmp;
|
||||
/// ExposesReturnsTwice - True if the function calls setjmp or related
|
||||
/// functions with attribute "returns twice", but doesn't have
|
||||
/// the attribute itself.
|
||||
/// This is used to limit optimizations which cannot reason
|
||||
/// about the control flow of such functions.
|
||||
bool ExposesReturnsTwice;
|
||||
|
||||
MachineFunction(const MachineFunction &); // DO NOT IMPLEMENT
|
||||
void operator=(const MachineFunction&); // DO NOT IMPLEMENT
|
||||
@ -192,15 +194,17 @@ public:
|
||||
if (Alignment < A) Alignment = A;
|
||||
}
|
||||
|
||||
/// callsSetJmp - Returns true if the function calls setjmp or sigsetjmp.
|
||||
bool callsSetJmp() const {
|
||||
return CallsSetJmp;
|
||||
/// exposesReturnsTwice - Returns true if the function calls setjmp or
|
||||
/// any other similar functions with attribute "returns twice" without
|
||||
/// having the attribute itself.
|
||||
bool exposesReturnsTwice() const {
|
||||
return ExposesReturnsTwice;
|
||||
}
|
||||
|
||||
/// setCallsSetJmp - Set a flag that indicates if there's a call to setjmp or
|
||||
/// sigsetjmp.
|
||||
void setCallsSetJmp(bool B) {
|
||||
CallsSetJmp = B;
|
||||
/// setCallsSetJmp - Set a flag that indicates if there's a call to
|
||||
/// a "returns twice" function.
|
||||
void setExposesReturnsTwice(bool B) {
|
||||
ExposesReturnsTwice = B;
|
||||
}
|
||||
|
||||
/// getInfo - Keep track of various per-function pieces of information for
|
||||
|
Reference in New Issue
Block a user