[mlir] move _mlir_alloc and friends to CRunnerUtils
authorAlex Zinenko <zinenko@google.com>
Mon, 18 Jul 2022 16:28:04 +0000 (18:28 +0200)
committerAlex Zinenko <zinenko@google.com>
Mon, 25 Jul 2022 13:52:53 +0000 (15:52 +0200)
commit9c1d133c3a0256cce7f40e2e06966f84e8b99ffe
treefc6b1739644d6bff57e6c9f3f7be871797d07af9
parenta8601f11fbb753e552197c5aa835fd3c30c29fd3
[mlir] move _mlir_alloc and friends to CRunnerUtils

These functions don't depend on the C++ runtime and therefore belong to
CRunnerUtils. Clean up the macros on the way as `_MSC_VER` indicates the
compiler, not the platform, which is indicated by `_WIN32` and will be
present when, e.g., compiling with minGW.

Reviewed By: rdzhabarov

Differential Revision: https://reviews.llvm.org/D130025
mlir/lib/ExecutionEngine/CRunnerUtils.cpp
mlir/test/mlir-cpu-runner/utils.mlir