1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 12:32:20 +02:00

O(1) EnumParser

This commit is contained in:
Brian Fiete 2024-03-22 07:46:59 -04:00
parent 757d6e09aa
commit 45035c69e9
3 changed files with 147 additions and 39 deletions

View file

@ -17003,7 +17003,8 @@ void BeMCContext::Generate(BeFunction* function)
auto castedInst = (BeValueScopeRetainInst*)inst;
auto mcValue = GetOperand(castedInst->mValue, false, true);
auto vregInfo = GetVRegInfo(mcValue);
vregInfo->mValueScopeRetainedKind = BeMCValueScopeRetainKind_Soft;
if (vregInfo != NULL)
vregInfo->mValueScopeRetainedKind = BeMCValueScopeRetainKind_Soft;
}
break;
case BeValueScopeEndInst::TypeId:

View file

@ -3098,7 +3098,7 @@ void BfIRCodeGen::HandleNextCmd()
else
FatalError("Value is not ConstantExpr");
}
static int symbolCount = 0;
symbolCount++;
@ -3108,7 +3108,7 @@ void BfIRCodeGen::HandleNextCmd()
{
chars[i] = llvm::ConstantInt::get(charType, strContent[0][i]);;
}
chars.push_back(llvm::ConstantInt::get(charType, 0));
auto stringType = llvm::ArrayType::get(charType, chars.size());
@ -3121,7 +3121,7 @@ void BfIRCodeGen::HandleNextCmd()
globalVar->setConstant(true);
globalVar->setLinkage(llvm::GlobalValue::LinkageTypes::ExternalLinkage);
globalVar->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
SetResult(curId, llvm::ConstantExpr::getBitCast(globalVar, charType->getPointerTo()));
break;
}
@ -3421,7 +3421,7 @@ void BfIRCodeGen::HandleNextCmd()
}
auto func = mLLVMModule->getOrInsertFunction(funcName, vecType, vecType, vecType);
// Call intrinsic
llvm::SmallVector<llvm::Value*, 2> args;
args.push_back(val0);