[PATCH] D130479: [ORC_RT][COFF] Initial platform support for COFF/x86_64.

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Aug 14 12:31:16 PDT 2022


mstorsjo added a comment.

FYI, this commit broke cross compilation with mingw, due to using the mixed-case `Windows.h` header, but I fixed that in 156136502b73a53192f21fc0477263e76a17a9b9 <https://reviews.llvm.org/rG156136502b73a53192f21fc0477263e76a17a9b9>.

However after that, this new file still produces a bunch of warnings:

  [1/2] Building CXX object lib/orc/CMak...RTOrc.x86_64.dir/coff_platform.cpp.obj
  In file included from ../lib/orc/coff_platform.cpp:20:
  ../lib/orc/wrapper_function_utils.h:299:27: warning: address of '__orc_rt_jit_dispatch_ctx' will always evaluate to 'true' [-Wpointer-bool-conversion]
      if (ORC_RT_UNLIKELY(!&__orc_rt_jit_dispatch_ctx))
                          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/orc/compiler.h:60:55: note: expanded from macro 'ORC_RT_UNLIKELY'
  #define ORC_RT_UNLIKELY(EXPR) __builtin_expect((bool)(EXPR), false)
                                                        ^~~~
  ../lib/orc/coff_platform.cpp:506:9: warning: unused variable 'JDState' [-Wunused-variable]
    auto &JDState = I->second;
          ^
  ../lib/orc/coff_platform.cpp:671:44: warning: multi-character character constant [-Wmultichar]
    constexpr uint32_t EH_EXCEPTION_NUMBER = 'msc' | 0xE0000000;
                                             ^
  In file included from ../lib/orc/coff_platform.cpp:20: 
  ../lib/orc/wrapper_function_utils.h:299:27: warning: address of '__orc_rt_jit_dispatch_ctx' will always evaluate to 'true' [-Wpointer-bool-conversion]
      if (ORC_RT_UNLIKELY(!&__orc_rt_jit_dispatch_ctx)) 
                          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/orc/compiler.h:60:55: note: expanded from macro 'ORC_RT_UNLIKELY'
  #define ORC_RT_UNLIKELY(EXPR) __builtin_expect((bool)(EXPR), false)
                                                        ^~~~
  ../lib/orc/coff_platform.cpp:314:30: note: in instantiation of function template specialization '__orc_rt::WrapperFunction<__orc_rt::SPSExpected<__orc_rt::SPSSequence<__orc_rt::SPSTuple<__orc_rt::SPSExecutorAddr, __orc_rt::SPSSequence<__orc_rt::SPSExecutorAddr>>>> (__orc_rt::SPSExecutorAddr)>::call<__orc_rt::Expected<std::unordered_map<__orc_rt::ExecutorAddr, std::vector<__orc_rt::ExecutorAddr>>>, __orc_rt::ExecutorAddr>' requested here
            SPSExecutorAddr)>::call(&__orc_rt_coff_push_initializers_tag,
                               ^
  In file included from ../lib/orc/coff_platform.cpp:20:
  ../lib/orc/wrapper_function_utils.h:299:27: warning: address of '__orc_rt_jit_dispatch_ctx' will always evaluate to 'true' [-Wpointer-bool-conversion]
      if (ORC_RT_UNLIKELY(!&__orc_rt_jit_dispatch_ctx))
                          ~ ^~~~~~~~~~~~~~~~~~~~~~~~~
  ../lib/orc/compiler.h:60:55: note: expanded from macro 'ORC_RT_UNLIKELY'
  #define ORC_RT_UNLIKELY(EXPR) __builtin_expect((bool)(EXPR), false) 
                                                        ^~~~
  ../lib/orc/coff_platform.cpp:441:41: note: in instantiation of function template specialization '__orc_rt::WrapperFunction<__orc_rt::SPSExpected<__orc_rt::SPSExecutorAddr> (__orc_rt::SPSExecutorAddr, __orc_rt::SPSSequence<char>)>::call<__orc_rt::Expected<__orc_rt::ExecutorAddr>, __orc_rt::ExecutorAddr, std::string_view>' requested here
            SPSExecutorAddr, SPSString)>::call(&__orc_rt_coff_symbol_lookup_tag,
                                          ^ 
  5 warnings generated.

It'd be nice if this could build without warnings.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130479/new/

https://reviews.llvm.org/D130479



More information about the llvm-commits mailing list