!2647 Do not align spill slots count for Irtoc Fastpath

Merge pull request !2647 from Sidorov Aleksei/fix_fastpath_spills
This commit is contained in:
openharmony_ci 2024-10-16 15:40:23 +00:00 committed by Gitee
commit b3e635129a
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 4 additions and 4 deletions

View File

@ -147,7 +147,7 @@ Codegen::Codegen(Graph *graph)
codeBuilder_(allocator_->New<CodeInfoBuilder>(graph->GetArch(), allocator_)),
slowPaths_(graph->GetLocalAllocator()->Adapter()),
slowPathsMap_(graph->GetLocalAllocator()->Adapter()),
frameLayout_(CFrameLayout(graph->GetArch(), graph->GetStackSlotsCount())),
frameLayout_(CFrameLayout(graph->GetArch(), graph->GetStackSlotsCount(), !graph->GetMode().IsFastPath())),
osrEntries_(graph->GetLocalAllocator()->Adapter()),
vregIndices_(GetAllocator()->Adapter()),
runtime_(graph->GetRuntime()),

View File

@ -181,7 +181,7 @@ void CodegenFastPath::CreateFrameInfo()
FrameInfo::CallersRelativeFp::Encode(true) | FrameInfo::CalleesRelativeFp::Encode(false) |
FrameInfo::PushCallers::Encode(true));
frame->SetSpillsCount(GetGraph()->GetStackSlotsCount());
CFrameLayout fl(GetGraph()->GetArch(), GetGraph()->GetStackSlotsCount());
CFrameLayout fl(GetGraph()->GetArch(), GetGraph()->GetStackSlotsCount(), false);
frame->SetCallersOffset(fl.GetOffset<CFrameLayout::OffsetOrigin::SP, CFrameLayout::OffsetUnit::SLOTS>(
fl.GetStackStartSlot() + fl.GetCallerLastSlot(false)));

View File

@ -63,8 +63,8 @@ private:
class CFrameLayout {
public:
constexpr CFrameLayout(Arch arch, size_t spillsCount)
: arch_(arch), spillsCount_(AlignSpillCount(arch, spillsCount))
constexpr CFrameLayout(Arch arch, size_t spillsCount, bool alignSpills = true)
: arch_(arch), spillsCount_(alignSpills ? AlignSpillCount(arch, spillsCount) : spillsCount)
{
}
~CFrameLayout() = default;