Skip to content

Commit

Permalink
Remove the check
Browse files Browse the repository at this point in the history
Signed-off-by: Tung D. Le <[email protected]>
  • Loading branch information
tungld committed Nov 12, 2024
1 parent d0f8bcb commit 1d93a7d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion src/Conversion/KrnlToLLVM/KrnlToLLVMHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<LLVMBuilder, KrnlBuilder> create(rewriter, loc);
create.llvm.ifThenElse(/*cond=*/
[&](const LLVMBuilder &createLLVM) {
Expand Down
15 changes: 2 additions & 13 deletions src/Runtime/OMExternalConstant.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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;
}

Expand Down

0 comments on commit 1d93a7d

Please sign in to comment.