From 1d93a7df4b2fd4faaa025d8a69c1f7e9a1dd0651 Mon Sep 17 00:00:00 2001 From: "Tung D. Le" Date: Tue, 12 Nov 2024 00:26:02 -0500 Subject: [PATCH] Remove the check Signed-off-by: Tung D. Le --- src/Conversion/KrnlToLLVM/KrnlToLLVMHelper.cpp | 1 - src/Runtime/OMExternalConstant.inc | 15 ++------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/Conversion/KrnlToLLVM/KrnlToLLVMHelper.cpp b/src/Conversion/KrnlToLLVM/KrnlToLLVMHelper.cpp index 444fec2a3f..a3f12a59c5 100644 --- a/src/Conversion/KrnlToLLVM/KrnlToLLVMHelper.cpp +++ b/src/Conversion/KrnlToLLVM/KrnlToLLVMHelper.cpp @@ -370,7 +370,6 @@ void equalOrFailed(ModuleOp &module, OpBuilder &rewriter, Location loc, void equalOrReturn(ModuleOp &module, OpBuilder &rewriter, Location loc, Value lhs, Value rhs, Value retVal, std::string errorMsg) { - MLIRContext *context = rewriter.getContext(); MultiDialectBuilder create(rewriter, loc); create.llvm.ifThenElse(/*cond=*/ [&](const LLVMBuilder &createLLVM) { diff --git a/src/Runtime/OMExternalConstant.inc b/src/Runtime/OMExternalConstant.inc index 86e304a713..769924e788 100644 --- a/src/Runtime/OMExternalConstant.inc +++ b/src/Runtime/OMExternalConstant.inc @@ -135,15 +135,11 @@ bool omMMapBinaryFile( */ #ifdef __MVS__ void *expected = NULL; - if (cds((cds_t *)&expected, (cds_t *)&constAddr[0], *(cds_t *)&tempAddr)) { + if (cds((cds_t *)&expected, (cds_t *)&constAddr[0], *(cds_t *)&tempAddr)) munmap(tempAddr, size); - tempAddr = NULL; - } #else - if (!__sync_bool_compare_and_swap(&constAddr[0], NULL, tempAddr)) { + if (!__sync_bool_compare_and_swap(&constAddr[0], NULL, tempAddr)) munmap(tempAddr, size); - tempAddr = NULL; - } #endif /* Either we succeeded in setting constAddr or someone else did it. @@ -156,13 +152,6 @@ bool omMMapBinaryFile( #ifdef __MVS__ free(tPath); #endif - /* Make sure constAddr is the same as the mmap address. - */ - if (tempAddr && (constAddr[0] != tempAddr)) { - fprintf(stderr, - "Error while updating the buffer address for constants.\n"); - return false; - } return true; }