1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Alloc allign attributes, lambda captures

This commit is contained in:
Brian Fiete 2019-11-26 13:11:17 -08:00
parent 79ccb33586
commit 12e5b525ad
23 changed files with 540 additions and 219 deletions

View file

@ -258,6 +258,9 @@ void BeInliner::Visit(BeAllocaInst* allocaInst)
auto destAllocInst = AllocInst(allocaInst);
destAllocInst->mType = allocaInst->mType;
destAllocInst->mArraySize = Remap(allocaInst->mArraySize);
destAllocInst->mAlign = allocaInst->mAlign;
destAllocInst->mNoChkStk = allocaInst->mNoChkStk;
destAllocInst->mForceMem = allocaInst->mForceMem;
}
void BeInliner::Visit(BeAliasValueInst* aliasValueInst)
@ -1525,7 +1528,9 @@ String BeDumpContext::ToString(BeDbgFunction* dbgFunction)
void BeDumpContext::ToString(StringImpl& str, int val)
{
str += StrFormat("%d", val);
char iStr[32];
sprintf(iStr, "%d", val);
str += iStr;
}
String BeDumpContext::ToString(int val)
@ -2146,6 +2151,8 @@ String BeModule::ToString(BeFunction* wantFunc)
str += ", ";
dc.ToString(str, castedInst->mArraySize);
}
str += ", align ";
dc.ToString(str, castedInst->mAlign);
}
break;
DISPLAY_INST1(BeAliasValueInst, "aliasvalue", mPtr);
@ -2672,6 +2679,9 @@ void BeModule::DoInlining(BeFunction* func)
auto destAlloca = mAlloc.Alloc<BeAllocaInst>();
destAlloca->mType = allocaInst->mType;
destAlloca->mArraySize = allocaInst->mArraySize;
destAlloca->mAlign = allocaInst->mAlign;
destAlloca->mNoChkStk = allocaInst->mNoChkStk;
destAlloca->mForceMem = allocaInst->mForceMem;
destAlloca->mName = allocaInst->mName;
auto destBlock = func->mBlocks[0];