[Mesa-dev] [PATCH] clover: Fix build after llvm 1dfede3122eec

2019-11-14 Thread Jan Vesely
CodeGenFileType enum was moved to Support/CodeGen.h
Signed-off-by: Jan Vesely 
---
Tested by building and running CLOVER_DEBUG=llvm,native clinfo using
both llvm-git (10) and llvm-9

 .../state_trackers/clover/llvm/codegen/native.cpp| 10 --
 src/gallium/state_trackers/clover/llvm/compat.hpp| 12 
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/src/gallium/state_trackers/clover/llvm/codegen/native.cpp 
b/src/gallium/state_trackers/clover/llvm/codegen/native.cpp
index b8ed01c7289..a9809549927 100644
--- a/src/gallium/state_trackers/clover/llvm/codegen/native.cpp
+++ b/src/gallium/state_trackers/clover/llvm/codegen/native.cpp
@@ -105,7 +105,7 @@ namespace {
 
std::vector
emit_code(::llvm::Module , const target ,
- TargetMachine::CodeGenFileType ft,
+ compat::CodeGenFileType ft,
  std::string _log) {
   std::string err;
   auto t = ::llvm::TargetRegistry::lookupTarget(target.triple, err);
@@ -128,7 +128,7 @@ namespace {
 
  mod.setDataLayout(tm->createDataLayout());
  tm->Options.MCOptions.AsmVerbose =
-(ft == TargetMachine::CGFT_AssemblyFile);
+(ft == compat::CGFT_AssemblyFile);
 
  if (compat::add_passes_to_emit_file(*tm, pm, os, ft))
 fail(r_log, build_error(), "TargetMachine can't emit this file");
@@ -144,8 +144,7 @@ module
 clover::llvm::build_module_native(::llvm::Module , const target ,
   const clang::CompilerInstance ,
   std::string _log) {
-   const auto code = emit_code(mod, target,
-   TargetMachine::CGFT_ObjectFile, r_log);
+   const auto code = emit_code(mod, target, compat::CGFT_ObjectFile, r_log);
return build_module_common(mod, code, get_symbol_offsets(code, r_log), c);
 }
 
@@ -155,8 +154,7 @@ clover::llvm::print_module_native(const ::llvm::Module ,
std::string log;
try {
   std::unique_ptr< ::llvm::Module> cmod { compat::clone_module(mod) };
-  return as_string(emit_code(*cmod, target,
- TargetMachine::CGFT_AssemblyFile, log));
+  return as_string(emit_code(*cmod, target, compat::CGFT_AssemblyFile, 
log));
} catch (...) {
   return "Couldn't output native disassembly: " + log;
}
diff --git a/src/gallium/state_trackers/clover/llvm/compat.hpp 
b/src/gallium/state_trackers/clover/llvm/compat.hpp
index 2015fccaf8c..4b3ac860bf1 100644
--- a/src/gallium/state_trackers/clover/llvm/compat.hpp
+++ b/src/gallium/state_trackers/clover/llvm/compat.hpp
@@ -70,6 +70,18 @@
 namespace clover {
namespace llvm {
   namespace compat {
+#if LLVM_VERSION_MAJOR >= 10
+using CodeGenFileType = ::llvm::CodeGenFileType;
+ const CodeGenFileType CGFT_AssemblyFile = CGFT_AssemblyFile;
+ const CodeGenFileType CGFT_ObjectFile = CGFT_ObjectFile;
+#else
+using CodeGenFileType = ::llvm::TargetMachine::CodeGenFileType;
+const CodeGenFileType CGFT_AssemblyFile =
+::llvm::TargetMachine::CGFT_AssemblyFile;
+const CodeGenFileType CGFT_ObjectFile =
+::llvm::TargetMachine::CGFT_ObjectFile;
+#endif
+
  template
  unsigned target_address_space(const T , const AS lang_as) {
 const auto  = target.getAddressSpaceMap();
-- 
2.23.0

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] LLVM + SPIRV-LLVM-Translator - compilation errors

2019-11-14 Thread Dieter Nützel

Am 15.11.2019 03:27, schrieb Karol Herbst:

might be that those definitions moved elsewhere or the headers were
never directly included.

In llvm 9 there are in llvm/InitializePasses.h, but maybe that's
changed? And if not, maybe that file needs to be included in
SPIRVLowerSPIRBlocks.cpp?


Thank you Karol for your fast reply.
I'll try tomorrow or one day after. - If no one beat me.
I need badly some sleep and on Saturday our brave daughter has her first 
end-of-course dance with us...;-)


Greetings,
Dieter

On Fri, Nov 15, 2019 at 2:34 AM Dieter Nützel  
wrote:


Hello Karol and Ilya,

do you have any hints/pointers for me to solve these LLVM +
SPIRV-LLVM-Translator - compilation errors.

llvm-project git taken 'today'.

[-]
commit 95c770fbfb14b07e1af7c2d427c16745617d9f1f (HEAD -> master,
origin/master, origin/HEAD)
Author: Davide Italiano 
Date:   Thu Nov 14 15:29:28 2019 -0800

 [Utility] Remove a dead header [PPC64LE_ehframe_Registers.h]
[-]

opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:617:1:
note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’
   617 | INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
   | ^~
/opt/llvm-project/llvm/include/llvm/PassSupport.h:50:45: error:
‘initializeAssumptionCacheTrackerPass’ was not declared in this scope
50 | #define INITIALIZE_PASS_DEPENDENCY(
initialize##depName##Pass(Registry);
   | ^~
/opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:618:1:
note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’
   618 | INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
   | ^~
/opt/llvm-project/llvm/include/llvm/PassSupport.h:50:45: error:
‘initializeAAResultsWrapperPassPass’ was not declared in this scope
50 | #define INITIALIZE_PASS_DEPENDENCY(depName)
initialize##depName##Pass(Registry);
   | ^~
/opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:619:1:
note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’
   619 | INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
   | ^~


Thank you very much in advance.
Dieter


___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] LLVM + SPIRV-LLVM-Translator - compilation errors

2019-11-14 Thread Karol Herbst
might be that those definitions moved elsewhere or the headers were
never directly included.

In llvm 9 there are in llvm/InitializePasses.h, but maybe that's
changed? And if not, maybe that file needs to be included in
SPIRVLowerSPIRBlocks.cpp?

On Fri, Nov 15, 2019 at 2:34 AM Dieter Nützel  wrote:
>
> Hello Karol and Ilya,
>
> do you have any hints/pointers for me to solve these LLVM +
> SPIRV-LLVM-Translator - compilation errors.
>
> llvm-project git taken 'today'.
>
> [-]
> commit 95c770fbfb14b07e1af7c2d427c16745617d9f1f (HEAD -> master,
> origin/master, origin/HEAD)
> Author: Davide Italiano 
> Date:   Thu Nov 14 15:29:28 2019 -0800
>
>  [Utility] Remove a dead header [PPC64LE_ehframe_Registers.h]
> [-]
>
> opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:617:1:
> note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’
>617 | INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
>| ^~
> /opt/llvm-project/llvm/include/llvm/PassSupport.h:50:45: error:
> ‘initializeAssumptionCacheTrackerPass’ was not declared in this scope
> 50 | #define INITIALIZE_PASS_DEPENDENCY(
> initialize##depName##Pass(Registry);
>| ^~
> /opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:618:1:
> note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’
>618 | INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
>| ^~
> /opt/llvm-project/llvm/include/llvm/PassSupport.h:50:45: error:
> ‘initializeAAResultsWrapperPassPass’ was not declared in this scope
> 50 | #define INITIALIZE_PASS_DEPENDENCY(depName)
> initialize##depName##Pass(Registry);
>| ^~
> /opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:619:1:
> note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’
>619 | INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
>| ^~
>
>
> Thank you very much in advance.
> Dieter
>

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] LLVM + SPIRV-LLVM-Translator - compilation errors

2019-11-14 Thread Dieter Nützel

Hello Karol and Ilya,

do you have any hints/pointers for me to solve these LLVM + 
SPIRV-LLVM-Translator - compilation errors.


llvm-project git taken 'today'.

[-]
commit 95c770fbfb14b07e1af7c2d427c16745617d9f1f (HEAD -> master, 
origin/master, origin/HEAD)

Author: Davide Italiano 
Date:   Thu Nov 14 15:29:28 2019 -0800

[Utility] Remove a dead header [PPC64LE_ehframe_Registers.h]
[-]

opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:617:1: 
note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’

  617 | INITIALIZE_PASS_DEPENDENCY(CallGraphWrapperPass)
  | ^~
/opt/llvm-project/llvm/include/llvm/PassSupport.h:50:45: error: 
‘initializeAssumptionCacheTrackerPass’ was not declared in this scope
   50 | #define INITIALIZE_PASS_DEPENDENCY(depName) 
initialize##depName##Pass(Registry);

  | ^~
/opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:618:1: 
note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’

  618 | INITIALIZE_PASS_DEPENDENCY(AssumptionCacheTracker)
  | ^~
/opt/llvm-project/llvm/include/llvm/PassSupport.h:50:45: error: 
‘initializeAAResultsWrapperPassPass’ was not declared in this scope
   50 | #define INITIALIZE_PASS_DEPENDENCY(depName) 
initialize##depName##Pass(Registry);

  | ^~
/opt/llvm-project/llvm/projects/SPIRV-LLVM-Translator/lib/SPIRV/SPIRVLowerSPIRBlocks.cpp:619:1: 
note: in expansion of macro ‘INITIALIZE_PASS_DEPENDENCY’

  619 | INITIALIZE_PASS_DEPENDENCY(AAResultsWrapperPass)
  | ^~


Thank you very much in advance.
Dieter
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Re: [Mesa-dev] mesa 20.0.0-devel fails to build

2019-11-14 Thread Daniel Schürmann
The repository of mesa-aco-git is 
https://github.com/daniel-schuermann/mesa .
In case, this issue cannot be reproduced upstream, please open a bug 
request there.
Otherwise, I'd appreciate if you could open a bug report at the upstream 
gitlab.
(Although, I highly doubt it is an issue in mesa, but rather some 
incompatible package in Arch.)


Please make sure to provide sufficient details to reproduce the issue:
- system information, build options and the complete error message

Kind regards,
Daniel


I recently tried to install the mesa-aco-git package from the Arch User
Repository, and I kept getting an error, and the package failed to build.
The error I was getting was a bunch of tracebacks and then "TypeError:
expected string or bytes-like object." I figured that there was an issue
with the AUR packaging, as is sometimes the case, so I went directly to the
source, the gitlab repository. I cloned the repo, cd'd into the repo
directory, made a directory called build, cd'd into it, ran the command
meson .. and sure enough it gave the same error. So in fact, the error is
with the source itself it seems.

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

[Mesa-dev] mesa 20.0.0-devel fails to build

2019-11-14 Thread matt M
I recently tried to install the mesa-aco-git package from the Arch User
Repository, and I kept getting an error, and the package failed to build.
The error I was getting was a bunch of tracebacks and then "TypeError:
expected string or bytes-like object." I figured that there was an issue
with the AUR packaging, as is sometimes the case, so I went directly to the
source, the gitlab repository. I cloned the repo, cd'd into the repo
directory, made a directory called build, cd'd into it, ran the command
meson .. and sure enough it gave the same error. So in fact, the error is
with the source itself it seems.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev