mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
More CompilerExplorer changes, like OmitDebugHelpers option
This commit is contained in:
parent
c9e0ab6089
commit
75f11b1459
8 changed files with 100 additions and 79 deletions
|
@ -8122,26 +8122,6 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_HotResolve_Finish(BfCompiler* bfCom
|
|||
return outString.c_str();
|
||||
}
|
||||
|
||||
enum BfCompilerOptionFlags
|
||||
{
|
||||
BfCompilerOptionFlag_EmitDebugInfo = 1,
|
||||
BfCompilerOptionFlag_EmitLineInfo = 2,
|
||||
BfCompilerOptionFlag_WriteIR = 4,
|
||||
BfCompilerOptionFlag_GenerateOBJ = 8,
|
||||
BfCompilerOptionFlag_NoFramePointerElim = 0x10,
|
||||
BfCompilerOptionFlag_ClearLocalVars = 0x20,
|
||||
BfCompilerOptionFlag_RuntimeChecks = 0x40,
|
||||
BfCompilerOptionFlag_EmitDynamicCastCheck = 0x80,
|
||||
BfCompilerOptionFlag_EnableObjectDebugFlags = 0x100,
|
||||
BfCompilerOptionFlag_EmitObjectAccessCheck = 0x200,
|
||||
BfCompilerOptionFlag_EnableCustodian = 0x400,
|
||||
BfCompilerOptionFlag_EnableRealtimeLeakCheck = 0x800,
|
||||
BfCompilerOptionFlag_EnableSideStack = 0x1000,
|
||||
BfCompilerOptionFlag_EnableHotSwapping = 0x2000,
|
||||
BfCompilerOptionFlag_IncrementalBuild = 0x4000,
|
||||
BfCompilerOptionFlag_DebugAlloc = 0x8000
|
||||
};
|
||||
|
||||
BF_EXPORT void BF_CALLTYPE BfCompiler_SetOptions(BfCompiler* bfCompiler, BfProject* hotProject, int hotIdx,
|
||||
int machineType, int toolsetType, int simdSetting, int allocStackCount, int maxWorkerThreads,
|
||||
BfCompilerOptionFlags optionFlags, char* mallocLinkName, char* freeLinkName)
|
||||
|
@ -8178,6 +8158,7 @@ BF_EXPORT void BF_CALLTYPE BfCompiler_SetOptions(BfCompiler* bfCompiler, BfProje
|
|||
options->mObjectHasDebugFlags = (optionFlags & BfCompilerOptionFlag_EnableObjectDebugFlags) != 0;
|
||||
options->mEnableRealtimeLeakCheck = ((optionFlags & BfCompilerOptionFlag_EnableRealtimeLeakCheck) != 0) && options->mObjectHasDebugFlags;
|
||||
options->mDebugAlloc = ((optionFlags & BfCompilerOptionFlag_DebugAlloc) != 0) || options->mEnableRealtimeLeakCheck;
|
||||
options->mOmitDebugHelpers = (optionFlags & BfCompilerOptionFlag_OmitDebugHelpers) != 0;
|
||||
|
||||
#ifdef _WINDOWS
|
||||
if (options->mToolsetType == BfToolsetType_GNU)
|
||||
|
|
|
@ -118,6 +118,7 @@ public:
|
|||
bool mEnableSideStack;
|
||||
bool mHasVDataExtender;
|
||||
bool mDebugAlloc;
|
||||
bool mOmitDebugHelpers;
|
||||
|
||||
bool mUseDebugBackingParams;
|
||||
|
||||
|
@ -143,6 +144,7 @@ public:
|
|||
mSIMDSetting = BfSIMDSetting_None;
|
||||
mHotProject = NULL;
|
||||
mDebugAlloc = false;
|
||||
mOmitDebugHelpers = false;
|
||||
mIncrementalBuild = true;
|
||||
mEmitDebugInfo = false;
|
||||
mEmitLineInfo = false;
|
||||
|
@ -163,7 +165,7 @@ public:
|
|||
mUseDebugBackingParams = true;
|
||||
mAllocStackCount = 1;
|
||||
|
||||
mExtraResolveChecks = false;
|
||||
mExtraResolveChecks = false;
|
||||
#ifdef _DEBUG
|
||||
//mExtraResolveChecks = true;
|
||||
#endif
|
||||
|
|
|
@ -8066,23 +8066,12 @@ void BfModule::EmitObjectAccessCheck(BfTypedValue typedVal)
|
|||
mBfIRBuilder->CreateObjectAccessCheck(typedVal.mValue, !IsOptimized());
|
||||
}
|
||||
|
||||
void BfModule::EmitNop()
|
||||
{
|
||||
if (mProject == NULL)
|
||||
return;
|
||||
|
||||
if ((mBfIRBuilder->mIgnoreWrites) || (!mHasFullDebugInfo) || (IsOptimized()))
|
||||
return;
|
||||
|
||||
mBfIRBuilder->CreateNop();
|
||||
}
|
||||
|
||||
void BfModule::EmitEnsureInstructionAt()
|
||||
{
|
||||
if (mProject == NULL)
|
||||
return;
|
||||
|
||||
if ((mBfIRBuilder->mIgnoreWrites) || (!mHasFullDebugInfo) || (IsOptimized()))
|
||||
if ((mBfIRBuilder->mIgnoreWrites) || (!mHasFullDebugInfo) || (IsOptimized()) || (mCompiler->mOptions.mOmitDebugHelpers))
|
||||
return;
|
||||
|
||||
mBfIRBuilder->CreateEnsureInstructionAt();
|
||||
|
|
|
@ -1468,7 +1468,6 @@ public:
|
|||
bool HasCompiledOutput();
|
||||
void SkipObjectAccessCheck(BfTypedValue typedVal);
|
||||
void EmitObjectAccessCheck(BfTypedValue typedVal);
|
||||
void EmitNop();
|
||||
void EmitEnsureInstructionAt();
|
||||
void EmitDynamicCastCheck(const BfTypedValue& targetValue, BfType* targetType, BfIRBlock trueBlock, BfIRBlock falseBlock, bool nullSucceeds = false);
|
||||
void EmitDynamicCastCheck(BfTypedValue typedVal, BfType* type, bool allowNull);
|
||||
|
|
|
@ -137,6 +137,27 @@ struct BfAtomCompositeEquals
|
|||
}
|
||||
};
|
||||
|
||||
enum BfCompilerOptionFlags
|
||||
{
|
||||
BfCompilerOptionFlag_EmitDebugInfo = 1,
|
||||
BfCompilerOptionFlag_EmitLineInfo = 2,
|
||||
BfCompilerOptionFlag_WriteIR = 4,
|
||||
BfCompilerOptionFlag_GenerateOBJ = 8,
|
||||
BfCompilerOptionFlag_NoFramePointerElim = 0x10,
|
||||
BfCompilerOptionFlag_ClearLocalVars = 0x20,
|
||||
BfCompilerOptionFlag_RuntimeChecks = 0x40,
|
||||
BfCompilerOptionFlag_EmitDynamicCastCheck = 0x80,
|
||||
BfCompilerOptionFlag_EnableObjectDebugFlags = 0x100,
|
||||
BfCompilerOptionFlag_EmitObjectAccessCheck = 0x200,
|
||||
BfCompilerOptionFlag_EnableCustodian = 0x400,
|
||||
BfCompilerOptionFlag_EnableRealtimeLeakCheck = 0x800,
|
||||
BfCompilerOptionFlag_EnableSideStack = 0x1000,
|
||||
BfCompilerOptionFlag_EnableHotSwapping = 0x2000,
|
||||
BfCompilerOptionFlag_IncrementalBuild = 0x4000,
|
||||
BfCompilerOptionFlag_DebugAlloc = 0x8000,
|
||||
BfCompilerOptionFlag_OmitDebugHelpers = 0x10000
|
||||
};
|
||||
|
||||
enum BfTypeFlags
|
||||
{
|
||||
BfTypeFlags_UnspecializedGeneric = 0x0001,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue