Skip to content

Commit

Permalink
Making ref_cc.h an implementation detail of iree/vm/ref.h. (iree-org#…
Browse files Browse the repository at this point in the history
  • Loading branch information
benvanik authored Oct 28, 2022
1 parent 7a9b84c commit 3072817
Show file tree
Hide file tree
Showing 29 changed files with 16 additions and 40 deletions.
1 change: 0 additions & 1 deletion compiler/src/iree/compiler/ConstEval/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ iree_compiler_cc_library(
"//runtime/src/iree/tooling:vm_util",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:bytecode_module",
"//runtime/src/iree/vm:cc",
"@llvm-project//mlir:IR",
],
)
1 change: 0 additions & 1 deletion compiler/src/iree/compiler/ConstEval/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ iree_cc_library(
iree::tooling::vm_util
iree::vm
iree::vm::bytecode_module
iree::vm::cc
PUBLIC
)

Expand Down
1 change: 0 additions & 1 deletion compiler/src/iree/compiler/ConstEval/Runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "iree/hal/api.h"
#include "iree/vm/api.h"
#include "iree/vm/bytecode_module.h"
#include "iree/vm/ref_cc.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinOps.h"

Expand Down
1 change: 0 additions & 1 deletion runtime/src/iree/modules/check/check_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "iree/testing/status_matchers.h"
#include "iree/tooling/device_util.h"
#include "iree/vm/api.h"
#include "iree/vm/ref_cc.h"

namespace iree {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree/modules/check/module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "iree/hal/api.h"
#include "iree/modules/hal/module.h"
#include "iree/testing/gtest.h"
#include "iree/vm/api.h"
#include "iree/vm/native_module_cc.h"
#include "iree/vm/ref_cc.h"

//===----------------------------------------------------------------------===//
// VM module interface implementation
Expand Down
5 changes: 1 addition & 4 deletions runtime/src/iree/tooling/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ cc_library(
"//runtime/src/iree/hal",
"//runtime/src/iree/modules/hal",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:cc",
],
)

Expand All @@ -68,7 +67,6 @@ cc_test(
"//runtime/src/iree/testing:gtest",
"//runtime/src/iree/testing:gtest_main",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:cc",
],
)

Expand Down Expand Up @@ -158,7 +156,7 @@ cc_library(
"//runtime/src/iree/base",
"//runtime/src/iree/base:tracing",
"//runtime/src/iree/base/internal:span",
"//runtime/src/iree/vm:cc",
"//runtime/src/iree/vm",
],
)

Expand All @@ -174,7 +172,6 @@ cc_test(
"//runtime/src/iree/testing:gtest",
"//runtime/src/iree/testing:gtest_main",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:cc",
],
)

Expand Down
5 changes: 1 addition & 4 deletions runtime/src/iree/tooling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ iree_cc_library(
iree::hal
iree::modules::hal
iree::vm
iree::vm::cc
PUBLIC
)

Expand All @@ -75,7 +74,6 @@ iree_cc_test(
iree::testing::gtest
iree::testing::gtest_main
iree::vm
iree::vm::cc
)

iree_cc_library(
Expand Down Expand Up @@ -180,7 +178,7 @@ iree_cc_library(
iree::base
iree::base::internal::span
iree::base::tracing
iree::vm::cc
iree::vm
PUBLIC
)

Expand All @@ -198,7 +196,6 @@ iree_cc_test(
iree::testing::gtest
iree::testing::gtest_main
iree::vm
iree::vm::cc
)

# libyaml does not build cleanly on bare-metal systems
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree/tooling/comparison.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include "iree/modules/hal/module.h"
#include "iree/tooling/buffer_view_matchers.h"
#include "iree/tooling/vm_util.h"
#include "iree/vm/ref_cc.h"
#include "iree/vm/api.h"

using namespace iree;

Expand Down
1 change: 0 additions & 1 deletion runtime/src/iree/tooling/comparison_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "iree/testing/status_matchers.h"
#include "iree/tooling/vm_util_cc.h"
#include "iree/vm/api.h"
#include "iree/vm/ref_cc.h"

namespace iree {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree/tooling/vm_util_cc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#include <vector>

#include "iree/vm/ref_cc.h"
#include "iree/vm/api.h"

namespace iree {

Expand Down
1 change: 0 additions & 1 deletion runtime/src/iree/tooling/vm_util_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "iree/tooling/device_util.h"
#include "iree/tooling/vm_util_cc.h"
#include "iree/vm/api.h"
#include "iree/vm/ref_cc.h"

namespace iree {
namespace {
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree/vm/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ iree_runtime_cc_library(
hdrs = [
"native_module_cc.h",
"native_module_packing.h",
"ref_cc.h",
],
deps = [
":vm",
Expand All @@ -61,6 +60,7 @@ iree_runtime_cc_library(
"module.c",
"native_module.c",
"ref.c",
"ref_cc.h",
"shims.c",
"stack.c",
],
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree/vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ iree_cc_library(
HDRS
"native_module_cc.h"
"native_module_packing.h"
"ref_cc.h"
DEPS
::vm
iree::base
Expand Down Expand Up @@ -61,6 +60,7 @@ iree_cc_library(
"module.c"
"native_module.c"
"ref.c"
"ref_cc.h"
"shims.c"
"stack.c"
DEPS
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree/vm/list_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "iree/testing/gtest.h"
#include "iree/testing/status_matchers.h"
#include "iree/vm/instance.h"
#include "iree/vm/ref_cc.h"
#include "iree/vm/ref.h"

class A : public iree::vm::RefObject<A> {
public:
Expand Down
1 change: 0 additions & 1 deletion runtime/src/iree/vm/native_module_packing.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "iree/base/internal/span.h"
#include "iree/vm/module.h"
#include "iree/vm/ref.h"
#include "iree/vm/ref_cc.h"
#include "iree/vm/stack.h"

// std::string_view is available starting in C++17.
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree/vm/native_module_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include "iree/vm/instance.h"
#include "iree/vm/invocation.h"
#include "iree/vm/list.h"
#include "iree/vm/ref_cc.h"
#include "iree/vm/ref.h"
#include "iree/vm/value.h"

namespace iree {
Expand Down
5 changes: 5 additions & 0 deletions runtime/src/iree/vm/ref.h
Original file line number Diff line number Diff line change
Expand Up @@ -327,4 +327,9 @@ struct ref_type_descriptor {
return name##_descriptor.type; \
}

// Optional C++ iree::vm::ref<T> wrapper.
#ifdef __cplusplus
#include "iree/vm/ref_cc.h"
#endif // __cplusplus

#endif // IREE_VM_REF_H_
2 changes: 1 addition & 1 deletion runtime/src/iree/vm/ref_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "iree/base/api.h"
#include "iree/testing/gtest.h"
#include "iree/testing/status_matchers.h"
#include "iree/vm/ref_cc.h"
#include "iree/vm/ref.h"

namespace {

Expand Down
2 changes: 1 addition & 1 deletion samples/custom_module/module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include <cstdio>

#include "iree/base/api.h"
#include "iree/vm/api.h"
#include "iree/vm/native_module_cc.h"
#include "iree/vm/ref_cc.h"

// NOTE: this module is written in C++ using the native module wrapper and uses
// template magic to handle marshaling arguments. For a lot of uses this is a
Expand Down
2 changes: 0 additions & 2 deletions samples/emitc_modules/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ iree_runtime_cc_test(
"//runtime/src/iree/testing:gtest",
"//runtime/src/iree/testing:gtest_main",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:cc",
],
)

Expand Down Expand Up @@ -63,6 +62,5 @@ iree_runtime_cc_test(
"//runtime/src/iree/testing:gtest",
"//runtime/src/iree/testing:gtest_main",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:cc",
],
)
2 changes: 0 additions & 2 deletions samples/emitc_modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ iree_cc_test(
iree::testing::gtest
iree::testing::gtest_main
iree::vm
iree::vm::cc
)

iree_cc_test(
Expand All @@ -45,7 +44,6 @@ iree_cc_test(
iree::testing::gtest
iree::testing::gtest_main
iree::vm
iree::vm::cc
)

iree_c_module(
Expand Down
1 change: 0 additions & 1 deletion samples/emitc_modules/add_module_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "iree/testing/gtest.h"
#include "iree/testing/status_matchers.h"
#include "iree/vm/api.h"
#include "iree/vm/ref_cc.h"

namespace iree {
namespace {
Expand Down
1 change: 0 additions & 1 deletion samples/emitc_modules/import_module_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "iree/testing/gtest.h"
#include "iree/testing/status_matchers.h"
#include "iree/vm/api.h"
#include "iree/vm/ref_cc.h"
#include "samples/emitc_modules/import_module_a.h"
#include "samples/emitc_modules/import_module_b.h"

Expand Down
3 changes: 0 additions & 3 deletions tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ cc_binary(
"//runtime/src/iree/tooling:device_util",
"//runtime/src/iree/tooling:vm_util_cc",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:cc",
"@com_google_benchmark//:benchmark",
],
)
Expand Down Expand Up @@ -138,7 +137,6 @@ cc_binary(
"//runtime/src/iree/tooling:vm_util_cc",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:bytecode_module",
"//runtime/src/iree/vm:cc",
"@llvm-project//llvm:Support",
"@llvm-project//mlir:IR",
"@llvm-project//mlir:LLVMToLLVMIRTranslation",
Expand All @@ -163,7 +161,6 @@ cc_binary(
"//runtime/src/iree/tooling:device_util",
"//runtime/src/iree/tooling:vm_util_cc",
"//runtime/src/iree/vm",
"//runtime/src/iree/vm:cc",
],
)

Expand Down
3 changes: 0 additions & 3 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ iree_cc_binary(
iree::tooling::device_util
iree::tooling::vm_util_cc
iree::vm
iree::vm::cc
)

iree_cc_binary(
Expand Down Expand Up @@ -131,7 +130,6 @@ iree_cc_binary(
iree::tooling::device_util
iree::tooling::vm_util_cc
iree::vm
iree::vm::cc
)

iree_cc_binary(
Expand Down Expand Up @@ -262,7 +260,6 @@ if(IREE_BUILD_COMPILER)
iree::tooling::vm_util_cc
iree::vm
iree::vm::bytecode_module
iree::vm::cc
DATA
${IREE_LLD_TARGET}
HOSTONLY
Expand Down
1 change: 0 additions & 1 deletion tools/android/run_module_app/src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "iree/tooling/vm_util_cc.h"
#include "iree/vm/api.h"
#include "iree/vm/bytecode_module.h"
#include "iree/vm/ref_cc.h"

namespace iree {
namespace {
Expand Down
1 change: 0 additions & 1 deletion tools/iree-benchmark-module-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@
#include "iree/tooling/device_util.h"
#include "iree/tooling/vm_util_cc.h"
#include "iree/vm/api.h"
#include "iree/vm/ref_cc.h"

constexpr char kNanosecondsUnitString[] = "ns";
constexpr char kMicrosecondsUnitString[] = "us";
Expand Down
1 change: 0 additions & 1 deletion tools/iree-run-mlir-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
#include "iree/tooling/vm_util_cc.h"
#include "iree/vm/api.h"
#include "iree/vm/bytecode_module.h"
#include "iree/vm/ref_cc.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
Expand Down
1 change: 0 additions & 1 deletion tools/iree-run-module-main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "iree/tooling/device_util.h"
#include "iree/tooling/vm_util_cc.h"
#include "iree/vm/api.h"
#include "iree/vm/ref_cc.h"

IREE_FLAG(string, entry_function, "",
"Name of a function contained in the module specified by module_file "
Expand Down

0 comments on commit 3072817

Please sign in to comment.