[mlir] NFC - Format ExecutionEngine.cpp

This commit is contained in:
Nicolas Vasilache 2022-01-03 17:17:11 -05:00
parent 1188f241ac
commit f1f5a85af8
1 changed files with 6 additions and 6 deletions

View File

@ -180,10 +180,10 @@ static void packFunctionArguments(Module *module) {
for (auto &indexedArg : llvm::enumerate(func.args())) { for (auto &indexedArg : llvm::enumerate(func.args())) {
llvm::Value *argIndex = llvm::Constant::getIntegerValue( llvm::Value *argIndex = llvm::Constant::getIntegerValue(
builder.getInt64Ty(), APInt(64, indexedArg.index())); builder.getInt64Ty(), APInt(64, indexedArg.index()));
llvm::Value *argPtrPtr = builder.CreateGEP( llvm::Value *argPtrPtr =
builder.getInt8PtrTy(), argList, argIndex); builder.CreateGEP(builder.getInt8PtrTy(), argList, argIndex);
llvm::Value *argPtr = builder.CreateLoad(builder.getInt8PtrTy(), llvm::Value *argPtr =
argPtrPtr); builder.CreateLoad(builder.getInt8PtrTy(), argPtrPtr);
llvm::Type *argTy = indexedArg.value().getType(); llvm::Type *argTy = indexedArg.value().getType();
argPtr = builder.CreateBitCast(argPtr, argTy->getPointerTo()); argPtr = builder.CreateBitCast(argPtr, argTy->getPointerTo());
llvm::Value *arg = builder.CreateLoad(argTy, argPtr); llvm::Value *arg = builder.CreateLoad(argTy, argPtr);
@ -199,8 +199,8 @@ static void packFunctionArguments(Module *module) {
builder.getInt64Ty(), APInt(64, llvm::size(func.args()))); builder.getInt64Ty(), APInt(64, llvm::size(func.args())));
llvm::Value *retPtrPtr = llvm::Value *retPtrPtr =
builder.CreateGEP(builder.getInt8PtrTy(), argList, retIndex); builder.CreateGEP(builder.getInt8PtrTy(), argList, retIndex);
llvm::Value *retPtr = builder.CreateLoad(builder.getInt8PtrTy(), llvm::Value *retPtr =
retPtrPtr); builder.CreateLoad(builder.getInt8PtrTy(), retPtrPtr);
retPtr = builder.CreateBitCast(retPtr, result->getType()->getPointerTo()); retPtr = builder.CreateBitCast(retPtr, result->getType()->getPointerTo());
builder.CreateStore(result, retPtr); builder.CreateStore(result, retPtr);
} }