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

Vinson Lee vlee at freedesktop.org
Sun Apr 1 05:14:48 UTC 2018


On Sat, Mar 31, 2018 at 5:08 PM, Mike Lothian <mike at fireburn.co.uk> wrote:
> On 1 April 2018 at 00:03, Vinson Lee <vlee at freedesktop.org> 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


More information about the mesa-dev mailing list