Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-04-01 Thread Mike Lothian
Thanks for pointing that out

I've sent a 4th patch, I've never compiled swr before, would you mind
testing to see if it fixes things for you, it's using the llvm include
rather than the llvm-c include

On Sun, 1 Apr 2018 at 06:15 Vinson Lee  wrote:

> On Sat, Mar 31, 2018 at 5:08 PM, Mike Lothian  wrote:
> > On 1 April 2018 at 00:03, Vinson Lee  wrote:
> >>
> >> A similar change is needed in
> >> src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp.
> >>
> >> Vinson
> >
> > Hi
> >
> > I'm not convinced that it does
> >
> > Utils.h defines two functions LLVMAddLowerSwitchPass &
> > LLVMAddPromoteMemoryToRegisterPass. Whilst jit_pch.hpp does use
> > Scalar.h, it doesn't use either of the two functions in Utils.h so it
> > doesn't need to be included
> >
> > Cheers
> >
> > Mike
>
> I see this build errors with llvm 7.0.0svn. These errors are fixed if
> Utils.h is added to the list of includes.
>
>   CXX  rasterizer/jitter/libmesaswr_la-blend_jit.lo
> rasterizer/jitter/blend_jit.cpp:796:20: error: use of undeclared
> identifier 'createBreakCriticalEdgesPass'
> passes.add(createBreakCriticalEdgesPass());
>^
> rasterizer/jitter/blend_jit.cpp:799:20: error: use of undeclared
> identifier 'createPromoteMemoryToRegisterPass'
> passes.add(createPromoteMemoryToRegisterPass());
>^
> rasterizer/jitter/blend_jit.cpp:803:20: error: use of undeclared
> identifier 'createInstructionSimplifierPass'; did you mean
>   'createInstructionCombiningPass'?
> passes.add(createInstructionSimplifierPass());
>^~~
>createInstructionCombiningPass
>
> Vinson
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-31 Thread Vinson Lee
On Sat, Mar 31, 2018 at 5:08 PM, Mike Lothian  wrote:
> On 1 April 2018 at 00:03, Vinson Lee  wrote:
>>
>> A similar change is needed in
>> src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp.
>>
>> Vinson
>
> Hi
>
> I'm not convinced that it does
>
> Utils.h defines two functions LLVMAddLowerSwitchPass &
> LLVMAddPromoteMemoryToRegisterPass. Whilst jit_pch.hpp does use
> Scalar.h, it doesn't use either of the two functions in Utils.h so it
> doesn't need to be included
>
> Cheers
>
> Mike

I see this build errors with llvm 7.0.0svn. These errors are fixed if
Utils.h is added to the list of includes.

  CXX  rasterizer/jitter/libmesaswr_la-blend_jit.lo
rasterizer/jitter/blend_jit.cpp:796:20: error: use of undeclared
identifier 'createBreakCriticalEdgesPass'
passes.add(createBreakCriticalEdgesPass());
   ^
rasterizer/jitter/blend_jit.cpp:799:20: error: use of undeclared
identifier 'createPromoteMemoryToRegisterPass'
passes.add(createPromoteMemoryToRegisterPass());
   ^
rasterizer/jitter/blend_jit.cpp:803:20: error: use of undeclared
identifier 'createInstructionSimplifierPass'; did you mean
  'createInstructionCombiningPass'?
passes.add(createInstructionSimplifierPass());
   ^~~
   createInstructionCombiningPass

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


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-31 Thread Mike Lothian
On 1 April 2018 at 00:03, Vinson Lee  wrote:
>
> A similar change is needed in
> src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp.
>
> Vinson

Hi

I'm not convinced that it does

Utils.h defines two functions LLVMAddLowerSwitchPass &
LLVMAddPromoteMemoryToRegisterPass. Whilst jit_pch.hpp does use
Scalar.h, it doesn't use either of the two functions in Utils.h so it
doesn't need to be included

Cheers

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


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-31 Thread Vinson Lee
On Thu, Mar 29, 2018 at 4:56 PM, Mike Lothian  wrote:
> Include llvm-c/Transforms/Utils.h with the newest LLVM 7
>
> Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h
> Signed-of-by: Mike Lothian 
>
> ---
>
> I don't have git commit rights
>
> If you're happy with this patch please can you commit it
>
> Cheers
>
> Mike
> ---
>  src/amd/vulkan/radv_nir_to_llvm.c   | 3 +++
>  src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 +++
>  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 3 +++
>  3 files changed, 9 insertions(+)
>
> diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
> b/src/amd/vulkan/radv_nir_to_llvm.c
> index c6b4e8b532..2f0864da46 100644
> --- a/src/amd/vulkan/radv_nir_to_llvm.c
> +++ b/src/amd/vulkan/radv_nir_to_llvm.c
> @@ -32,6 +32,9 @@
>  #include 
>  #include 
>  #include 
> +#if HAVE_LLVM >= 0x0700
> +#include 
> +#endif
>
>  #include "sid.h"
>  #include "gfx9d.h"
> diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c 
> b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> index 6ddc509a81..dae9d01552 100644
> --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
> +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
> @@ -40,6 +40,9 @@
>
>  #include 
>  #include 
> +#if HAVE_LLVM >= 0x0700
> +#include 
> +#endif
>  #include 
>
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c 
> b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> index 79fdebe838..622fd26950 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
> @@ -40,6 +40,9 @@
>  #include 
>  #include 
>  #include 
> +#if HAVE_LLVM >= 0x0700
> +#include 
> +#endif
>
>  enum si_llvm_calling_convention {
> RADEON_LLVM_AMDGPU_VS = 87,
> --
> 2.16.3
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev

A similar change is needed in
src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp.

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


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-31 Thread Mike Lothian
On Sat, 31 Mar 2018 at 00:54 Dylan Baker  wrote:
>
> Quoting Mike Lothian (2018-03-29 17:49:30)
> >
> >
> > On Fri, 30 Mar 2018, 01:42 Dylan Baker,  wrote:
> >
> > Quoting Mike Lothian (2018-03-29 16:56:28)
> > > Include llvm-c/Transforms/Utils.h with the newest LLVM 7
> > >
> > > Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h
> >
> > I have no comment on the patch itself.
> >
> > JFYI, this tag ("Fixes") has specific meaning in mesa and should only 
> > refer
> > to
> > mesa commits (we have scripts for stable releases that parse that
> > information).
> >
> > Dylan
> >
> >
> > Ah sorry about that
>
> No worries, these are mesa specific so a lot people don't know what they're 
> for.
>
> Dylan


Hi

Would you like me to make a v2 with another prefix and with the fixes
line removed? Or would you prefer I split it into 3 patches with the
correct prefix for each one?

Equally if you're happy as is could someone commit this to master? I
don't have git commit rights

Thanks

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


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-30 Thread Dylan Baker
Quoting Mike Lothian (2018-03-29 17:49:30)
> 
> 
> On Fri, 30 Mar 2018, 01:42 Dylan Baker,  wrote:
> 
> Quoting Mike Lothian (2018-03-29 16:56:28)
> > Include llvm-c/Transforms/Utils.h with the newest LLVM 7
> >
> > Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h
> 
> I have no comment on the patch itself.
> 
> JFYI, this tag ("Fixes") has specific meaning in mesa and should only 
> refer
> to
> mesa commits (we have scripts for stable releases that parse that
> information).
> 
> Dylan
> 
> 
> Ah sorry about that

No worries, these are mesa specific so a lot people don't know what they're for.

Dylan


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


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-30 Thread Dieter Nützel

Samuel,

go for it.

Tested-by: Dieter Nützel 

Thanks Mike!

Dieter

Am 30.03.2018 11:32, schrieb Samuel Pitoiset:

With the Fixes tag removed, this is:

Reviewed-by: Samuel Pitoiset 

On 03/30/2018 01:56 AM, Mike Lothian wrote:

Include llvm-c/Transforms/Utils.h with the newest LLVM 7

Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h
Signed-of-by: Mike Lothian 

---

I don't have git commit rights

If you're happy with this patch please can you commit it

Cheers

Mike
---
  src/amd/vulkan/radv_nir_to_llvm.c   | 3 +++
  src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 +++
  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 3 +++
  3 files changed, 9 insertions(+)

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
b/src/amd/vulkan/radv_nir_to_llvm.c

index c6b4e8b532..2f0864da46 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -32,6 +32,9 @@
  #include 
  #include 
  #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
#include "sid.h"
  #include "gfx9d.h"
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c 
b/src/gallium/auxiliary/gallivm/lp_bld_init.c

index 6ddc509a81..dae9d01552 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -40,6 +40,9 @@
#include 
  #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
  #include 
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c 
b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c

index 79fdebe838..622fd26950 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -40,6 +40,9 @@
  #include 
  #include 
  #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
enum si_llvm_calling_convention {
RADEON_LLVM_AMDGPU_VS = 87,


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

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


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-30 Thread Samuel Pitoiset

With the Fixes tag removed, this is:

Reviewed-by: Samuel Pitoiset 

On 03/30/2018 01:56 AM, Mike Lothian wrote:

Include llvm-c/Transforms/Utils.h with the newest LLVM 7

Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h
Signed-of-by: Mike Lothian 

---

I don't have git commit rights

If you're happy with this patch please can you commit it

Cheers

Mike
---
  src/amd/vulkan/radv_nir_to_llvm.c   | 3 +++
  src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 +++
  src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 3 +++
  3 files changed, 9 insertions(+)

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
b/src/amd/vulkan/radv_nir_to_llvm.c
index c6b4e8b532..2f0864da46 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -32,6 +32,9 @@
  #include 
  #include 
  #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
  
  #include "sid.h"

  #include "gfx9d.h"
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c 
b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 6ddc509a81..dae9d01552 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -40,6 +40,9 @@
  
  #include 

  #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
  #include 
  
  
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c

index 79fdebe838..622fd26950 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -40,6 +40,9 @@
  #include 
  #include 
  #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
  
  enum si_llvm_calling_convention {

RADEON_LLVM_AMDGPU_VS = 87,


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


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-29 Thread Mike Lothian
On Fri, 30 Mar 2018, 01:42 Dylan Baker,  wrote:

> Quoting Mike Lothian (2018-03-29 16:56:28)
> > Include llvm-c/Transforms/Utils.h with the newest LLVM 7
> >
> > Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h
>
> I have no comment on the patch itself.
>
> JFYI, this tag ("Fixes") has specific meaning in mesa and should only
> refer to
> mesa commits (we have scripts for stable releases that parse that
> information).
>
> Dylan
>

Ah sorry about that

I also think ac/nir only covers the first file and not the other two, which
are gallivm and radeonsi respectively I think

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


Re: [Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-29 Thread Dylan Baker
Quoting Mike Lothian (2018-03-29 16:56:28)
> Include llvm-c/Transforms/Utils.h with the newest LLVM 7
> 
> Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h

I have no comment on the patch itself.

JFYI, this tag ("Fixes") has specific meaning in mesa and should only refer to
mesa commits (we have scripts for stable releases that parse that information).

Dylan


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


[Mesa-dev] [PATCH] ac/nir: Fix include for LLVMAddPromoteMemoryToRegisterPass

2018-03-29 Thread Mike Lothian
Include llvm-c/Transforms/Utils.h with the newest LLVM 7

Fixes: 2dd4f35c7fc llvm-c: Split Utils out of Scalar.h
Signed-of-by: Mike Lothian 

---

I don't have git commit rights

If you're happy with this patch please can you commit it

Cheers

Mike
---
 src/amd/vulkan/radv_nir_to_llvm.c   | 3 +++
 src/gallium/auxiliary/gallivm/lp_bld_init.c | 3 +++
 src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
b/src/amd/vulkan/radv_nir_to_llvm.c
index c6b4e8b532..2f0864da46 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -32,6 +32,9 @@
 #include 
 #include 
 #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
 
 #include "sid.h"
 #include "gfx9d.h"
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c 
b/src/gallium/auxiliary/gallivm/lp_bld_init.c
index 6ddc509a81..dae9d01552 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_init.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c
@@ -40,6 +40,9 @@
 
 #include 
 #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
 #include 
 
 
diff --git a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c 
b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
index 79fdebe838..622fd26950 100644
--- a/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
+++ b/src/gallium/drivers/radeonsi/si_shader_tgsi_setup.c
@@ -40,6 +40,9 @@
 #include 
 #include 
 #include 
+#if HAVE_LLVM >= 0x0700
+#include 
+#endif
 
 enum si_llvm_calling_convention {
RADEON_LLVM_AMDGPU_VS = 87,
-- 
2.16.3

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