Re: [Mesa-dev] [PATCH v4 04/20] clover: Remove the TGSI backend as unused

2018-03-08 Thread Karol Herbst
Reviewed-by: Karol Herbst 

On Thu, Mar 8, 2018 at 1:21 AM, Pierre Moreau  wrote:
> Signed-off-by: Pierre Moreau 
> ---
>  src/gallium/state_trackers/clover/Makefile.am  |  11 +-
>  src/gallium/state_trackers/clover/Makefile.sources |   4 -
>  src/gallium/state_trackers/clover/core/program.cpp |  13 +--
>  src/gallium/state_trackers/clover/meson.build  |   9 +-
>  .../state_trackers/clover/tgsi/compiler.cpp| 120 
> -
>  .../state_trackers/clover/tgsi/invocation.hpp  |  37 ---
>  6 files changed, 8 insertions(+), 186 deletions(-)
>  delete mode 100644 src/gallium/state_trackers/clover/tgsi/compiler.cpp
>  delete mode 100644 src/gallium/state_trackers/clover/tgsi/invocation.hpp
>
> diff --git a/src/gallium/state_trackers/clover/Makefile.am 
> b/src/gallium/state_trackers/clover/Makefile.am
> index a7befb4605..35ee092f3f 100644
> --- a/src/gallium/state_trackers/clover/Makefile.am
> +++ b/src/gallium/state_trackers/clover/Makefile.am
> @@ -28,14 +28,7 @@ cl_HEADERS = \
> $(top_srcdir)/include/CL/opencl.h
>  endif
>
> -noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
> -
> -libcltgsi_la_CXXFLAGS = \
> -   $(CXX11_CXXFLAGS) \
> -   $(CLOVER_STD_OVERRIDE) \
> -   $(VISIBILITY_CXXFLAGS)
> -
> -libcltgsi_la_SOURCES = $(TGSI_SOURCES)
> +noinst_LTLIBRARIES = libclover.la libclllvm.la
>
>  libclllvm_la_CXXFLAGS = \
> $(CXX11_CXXFLAGS) \
> @@ -56,7 +49,7 @@ libclover_la_CXXFLAGS = \
> $(VISIBILITY_CXXFLAGS)
>
>  libclover_la_LIBADD = \
> -   libcltgsi.la libclllvm.la
> +   libclllvm.la
>
>  libclover_la_SOURCES = $(CPP_SOURCES)
>
> diff --git a/src/gallium/state_trackers/clover/Makefile.sources 
> b/src/gallium/state_trackers/clover/Makefile.sources
> index e9828b107b..5167ca75af 100644
> --- a/src/gallium/state_trackers/clover/Makefile.sources
> +++ b/src/gallium/state_trackers/clover/Makefile.sources
> @@ -62,7 +62,3 @@ LLVM_SOURCES := \
> llvm/invocation.hpp \
> llvm/metadata.hpp \
> llvm/util.hpp
> -
> -TGSI_SOURCES := \
> -   tgsi/compiler.cpp \
> -   tgsi/invocation.hpp
> diff --git a/src/gallium/state_trackers/clover/core/program.cpp 
> b/src/gallium/state_trackers/clover/core/program.cpp
> index 4e74fccd97..ec71d99b01 100644
> --- a/src/gallium/state_trackers/clover/core/program.cpp
> +++ b/src/gallium/state_trackers/clover/core/program.cpp
> @@ -22,7 +22,6 @@
>
>  #include "core/program.hpp"
>  #include "llvm/invocation.hpp"
> -#include "tgsi/invocation.hpp"
>
>  using namespace clover;
>
> @@ -51,10 +50,9 @@ program::compile(const ref_vector &devs, const 
> std::string &opts,
>   std::string log;
>
>   try {
> -const module m = (dev.ir_format() == PIPE_SHADER_IR_TGSI ?
> -  tgsi::compile_program(_source, log) :
> -  llvm::compile_program(_source, headers, dev,
> -opts, log));
> +assert(dev.ir_format() == PIPE_SHADER_IR_NATIVE);
> +const module m = llvm::compile_program(_source, headers, dev, 
> opts,
> +   log);
>  _builds[&dev] = { m, opts, log };
>   } catch (...) {
>  _builds[&dev] = { module(), opts, log };
> @@ -76,9 +74,8 @@ program::link(const ref_vector &devs, const 
> std::string &opts,
>std::string log = _builds[&dev].log;
>
>try {
> - const module m = (dev.ir_format() == PIPE_SHADER_IR_TGSI ?
> -   tgsi::link_program(ms) :
> -   llvm::link_program(ms, dev, opts, log));
> + assert(dev.ir_format() == PIPE_SHADER_IR_NATIVE);
> + const module m = llvm::link_program(ms, dev, opts, log);
>   _builds[&dev] = { m, opts, log };
>} catch (...) {
>   _builds[&dev] = { module(), opts, log };
> diff --git a/src/gallium/state_trackers/clover/meson.build 
> b/src/gallium/state_trackers/clover/meson.build
> index d1497e657e..c52f0faa40 100644
> --- a/src/gallium/state_trackers/clover/meson.build
> +++ b/src/gallium/state_trackers/clover/meson.build
> @@ -25,13 +25,6 @@ if with_opencl_icd
>clover_cpp_args += '-DHAVE_CLOVER_ICD'
>  endif
>
> -libcltgsi = static_library(
> -  'cltgsi',
> -  files('tgsi/compiler.cpp', 'tgsi/invocation.hpp'),
> -  include_directories : clover_incs,
> -  cpp_args : [cpp_vis_args],
> -)
> -
>  libclllvm = static_library(
>'clllvm',
>files(
> @@ -118,5 +111,5 @@ libclover = static_library(
>clover_files,
>include_directories : clover_incs,
>cpp_args : [clover_cpp_args, cpp_vis_args],
> -  link_with : [libcltgsi, libclllvm],
> +  link_with : [libclllvm],
>  )
> diff --git a/src/gallium/state_trackers/clover/tgsi/compiler.cpp 
> b/src/gallium/state_trackers/clover/tgsi/compiler.cpp
> deleted file mode 100644
> index e165311fa4..00
> --- a/src/gallium/state_trackers/clover/tgsi/compile

[Mesa-dev] [PATCH v4 04/20] clover: Remove the TGSI backend as unused

2018-03-07 Thread Pierre Moreau
Signed-off-by: Pierre Moreau 
---
 src/gallium/state_trackers/clover/Makefile.am  |  11 +-
 src/gallium/state_trackers/clover/Makefile.sources |   4 -
 src/gallium/state_trackers/clover/core/program.cpp |  13 +--
 src/gallium/state_trackers/clover/meson.build  |   9 +-
 .../state_trackers/clover/tgsi/compiler.cpp| 120 -
 .../state_trackers/clover/tgsi/invocation.hpp  |  37 ---
 6 files changed, 8 insertions(+), 186 deletions(-)
 delete mode 100644 src/gallium/state_trackers/clover/tgsi/compiler.cpp
 delete mode 100644 src/gallium/state_trackers/clover/tgsi/invocation.hpp

diff --git a/src/gallium/state_trackers/clover/Makefile.am 
b/src/gallium/state_trackers/clover/Makefile.am
index a7befb4605..35ee092f3f 100644
--- a/src/gallium/state_trackers/clover/Makefile.am
+++ b/src/gallium/state_trackers/clover/Makefile.am
@@ -28,14 +28,7 @@ cl_HEADERS = \
$(top_srcdir)/include/CL/opencl.h
 endif
 
-noinst_LTLIBRARIES = libclover.la libcltgsi.la libclllvm.la
-
-libcltgsi_la_CXXFLAGS = \
-   $(CXX11_CXXFLAGS) \
-   $(CLOVER_STD_OVERRIDE) \
-   $(VISIBILITY_CXXFLAGS)
-
-libcltgsi_la_SOURCES = $(TGSI_SOURCES)
+noinst_LTLIBRARIES = libclover.la libclllvm.la
 
 libclllvm_la_CXXFLAGS = \
$(CXX11_CXXFLAGS) \
@@ -56,7 +49,7 @@ libclover_la_CXXFLAGS = \
$(VISIBILITY_CXXFLAGS)
 
 libclover_la_LIBADD = \
-   libcltgsi.la libclllvm.la
+   libclllvm.la
 
 libclover_la_SOURCES = $(CPP_SOURCES)
 
diff --git a/src/gallium/state_trackers/clover/Makefile.sources 
b/src/gallium/state_trackers/clover/Makefile.sources
index e9828b107b..5167ca75af 100644
--- a/src/gallium/state_trackers/clover/Makefile.sources
+++ b/src/gallium/state_trackers/clover/Makefile.sources
@@ -62,7 +62,3 @@ LLVM_SOURCES := \
llvm/invocation.hpp \
llvm/metadata.hpp \
llvm/util.hpp
-
-TGSI_SOURCES := \
-   tgsi/compiler.cpp \
-   tgsi/invocation.hpp
diff --git a/src/gallium/state_trackers/clover/core/program.cpp 
b/src/gallium/state_trackers/clover/core/program.cpp
index 4e74fccd97..ec71d99b01 100644
--- a/src/gallium/state_trackers/clover/core/program.cpp
+++ b/src/gallium/state_trackers/clover/core/program.cpp
@@ -22,7 +22,6 @@
 
 #include "core/program.hpp"
 #include "llvm/invocation.hpp"
-#include "tgsi/invocation.hpp"
 
 using namespace clover;
 
@@ -51,10 +50,9 @@ program::compile(const ref_vector &devs, const 
std::string &opts,
  std::string log;
 
  try {
-const module m = (dev.ir_format() == PIPE_SHADER_IR_TGSI ?
-  tgsi::compile_program(_source, log) :
-  llvm::compile_program(_source, headers, dev,
-opts, log));
+assert(dev.ir_format() == PIPE_SHADER_IR_NATIVE);
+const module m = llvm::compile_program(_source, headers, dev, opts,
+   log);
 _builds[&dev] = { m, opts, log };
  } catch (...) {
 _builds[&dev] = { module(), opts, log };
@@ -76,9 +74,8 @@ program::link(const ref_vector &devs, const 
std::string &opts,
   std::string log = _builds[&dev].log;
 
   try {
- const module m = (dev.ir_format() == PIPE_SHADER_IR_TGSI ?
-   tgsi::link_program(ms) :
-   llvm::link_program(ms, dev, opts, log));
+ assert(dev.ir_format() == PIPE_SHADER_IR_NATIVE);
+ const module m = llvm::link_program(ms, dev, opts, log);
  _builds[&dev] = { m, opts, log };
   } catch (...) {
  _builds[&dev] = { module(), opts, log };
diff --git a/src/gallium/state_trackers/clover/meson.build 
b/src/gallium/state_trackers/clover/meson.build
index d1497e657e..c52f0faa40 100644
--- a/src/gallium/state_trackers/clover/meson.build
+++ b/src/gallium/state_trackers/clover/meson.build
@@ -25,13 +25,6 @@ if with_opencl_icd
   clover_cpp_args += '-DHAVE_CLOVER_ICD'
 endif
 
-libcltgsi = static_library(
-  'cltgsi',
-  files('tgsi/compiler.cpp', 'tgsi/invocation.hpp'),
-  include_directories : clover_incs,
-  cpp_args : [cpp_vis_args],
-)
-
 libclllvm = static_library(
   'clllvm',
   files(
@@ -118,5 +111,5 @@ libclover = static_library(
   clover_files,
   include_directories : clover_incs,
   cpp_args : [clover_cpp_args, cpp_vis_args],
-  link_with : [libcltgsi, libclllvm],
+  link_with : [libclllvm],
 )
diff --git a/src/gallium/state_trackers/clover/tgsi/compiler.cpp 
b/src/gallium/state_trackers/clover/tgsi/compiler.cpp
deleted file mode 100644
index e165311fa4..00
--- a/src/gallium/state_trackers/clover/tgsi/compiler.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-//
-// Copyright 2012 Francisco Jerez
-//
-// Permission is hereby granted, free of charge, to any person obtaining a
-// copy of this software and associated documentation files (the "Software"),
-// to deal in the Software without restriction, including without limitation
-// t