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

[NativeAOT-LLVM] Delete the CalendarData workaround #2403

Merged
merged 1 commit into from
Sep 18, 2023
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
2 changes: 1 addition & 1 deletion src/coreclr/jit/llvm.h
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ class Llvm
private:
const unsigned ROOT_FUNC_IDX = 0;

bool initializeFunctions();
void initializeFunctions();
void generateProlog();
void initializeShadowStack();
void initializeLocals();
Expand Down
19 changes: 2 additions & 17 deletions src/coreclr/jit/llvmcodegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
//
void Llvm::Compile()
{
if (initializeFunctions())
{
return;
}

initializeFunctions();
initializeDebugInfo();

JITDUMPEXEC(_compiler->fgDispBasicBlocks());
Expand All @@ -41,7 +37,7 @@ void Llvm::Compile()
verifyGeneratedCode();
}

bool Llvm::initializeFunctions()
void Llvm::initializeFunctions()
{
const char* mangledName = GetMangledMethodName(m_info->compMethodHnd);
Function* rootLlvmFunction = getOrCreateKnownLlvmFunction(mangledName, [=]() { return createFunctionType(); });
Expand All @@ -60,15 +56,6 @@ bool Llvm::initializeFunctions()
rootLlvmFunction->addFnAttr(llvm::Attribute::NoInline);
}

// TODO-LLVM: investigate.
if (!strcmp(mangledName, "S_P_CoreLib_System_Globalization_CalendarData__EnumCalendarInfo"))
{
llvm::BasicBlock* llvmBlock = llvm::BasicBlock::Create(m_context->Context, "", rootLlvmFunction);
_builder.SetInsertPoint(llvmBlock);
_builder.CreateRet(_builder.getInt8(0));
return true;
}

// First function is always the root.
m_functions = std::vector<FunctionInfo>(_compiler->compFuncCount());
m_functions[ROOT_FUNC_IDX] = {rootLlvmFunction};
Expand Down Expand Up @@ -182,8 +169,6 @@ bool Llvm::initializeFunctions()

m_EHUnwindLlvmBlocks[ehIndex] = dispatchLlvmBlock;
}

return false;
}

void Llvm::generateProlog()
Expand Down