[Mlir-commits] [mlir] [mlir] Add `mlir_arm_runner_utils` library for use in integration tests (PR #78583)
Cullen Rhodes
llvmlistbot at llvm.org
Thu Jan 18 10:39:08 PST 2024
================
@@ -0,0 +1,60 @@
+//===- ArmRunnerUtils.cpp - Utilities for configuring architecture properties //
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include <iostream>
+#include <stdint.h>
+#include <string_view>
+
+#if (defined(_WIN32) || defined(__CYGWIN__))
+#define MLIR_ARMRUNNERUTILS_EXPORTED __declspec(dllexport)
+#else
+#define MLIR_ARMRUNNERUTILS_EXPORTED __attribute__((visibility("default")))
+#endif
+
+#ifdef __linux__
+#include <sys/prctl.h>
+#endif
+
+extern "C" {
+
+#define PR_VL_LEN_MASK 0xffff
----------------
c-rhodes wrote:
I was going to ask why not use `PR_SME_VL_LEN_MASK` from `sys/prctl.h` but realised after look at the rest of the patch it's probably because it's used for SVE as well and they have the same mask? Perhaps just add a comment along the lines of `equivalent to PR_SME_VL_LEN_MASK or PR_SVE_VL_LEN_MASK` since this def name isn't documented anywhere but those two are and can be found from a search.
https://github.com/llvm/llvm-project/pull/78583
More information about the Mlir-commits
mailing list