[Mesa-dev] [PATCH] swr/rast: Rename createInstructionSimplifierPass with llvm-7.0.
Juan A. Suarez Romero
jasuarez at igalia.com
Fri Aug 31 09:35:39 UTC 2018
Tested-by: Juan A. Suarez <jasuarez at igalia.com>
J.A.
On Sat, 2018-06-30 at 15:10 +0000, Vinson Lee wrote:
> Fix build error after llvm-7.0svn r336028 ("[instsimplify] Move the
> instsimplify pass to use more obvious file names and diretory.").
>
> rasterizer/jitter/blend_jit.cpp:873:20: error: use of undeclared identifier 'createInstructionSimplifierPass'
> passes.add(createInstructionSimplifierPass());
> ^
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
> src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp | 4 ++++
> src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp | 4 ++++
> src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp | 1 +
> src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp | 4 ++++
> 4 files changed, 13 insertions(+)
>
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
> index f89c502db7d7..1d6fb405dd6b 100644
> --- a/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/blend_jit.cpp
> @@ -870,7 +870,11 @@ struct BlendJit : public Builder
> passes.add(createCFGSimplificationPass());
> passes.add(createEarlyCSEPass());
> passes.add(createInstructionCombiningPass());
> +#if LLVM_VERSION_MAJOR >= 7
> + passes.add(createInstSimplifyLegacyPass());
> +#else
> passes.add(createInstructionSimplifierPass());
> +#endif
> passes.add(createConstantPropagationPass());
> passes.add(createSCCPPass());
> passes.add(createAggressiveDCEPass());
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
> index b4d326ebdcc2..26972cddc251 100644
> --- a/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/fetch_jit.cpp
> @@ -294,7 +294,11 @@ Function* FetchJit::Create(const FETCH_COMPILE_STATE& fetchState)
> optPasses.add(createCFGSimplificationPass());
> optPasses.add(createEarlyCSEPass());
> optPasses.add(createInstructionCombiningPass());
> +#if LLVM_VERSION_MAJOR >= 7
> + optPasses.add(createInstSimplifyLegacyPass());
> +#else
> optPasses.add(createInstructionSimplifierPass());
> +#endif
> optPasses.add(createConstantPropagationPass());
> optPasses.add(createSCCPPass());
> optPasses.add(createAggressiveDCEPass());
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
> index 47f717bfc2a1..760d1dab80ee 100644
> --- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp
> @@ -70,6 +70,7 @@ using PassManager = llvm::legacy::PassManager;
> #if LLVM_VERSION_MAJOR >= 7
> #include "llvm/Transforms/Utils.h"
> #include "llvm/Transforms/InstCombine/InstCombine.h"
> +#include "llvm/Transforms/Scalar/InstSimplifyPass.h"
> #endif
> #include "llvm/Support/Host.h"
> #include "llvm/Support/DynamicLibrary.h"
> diff --git a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
> index 8f86af2a4b41..5c1555280fce 100644
> --- a/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
> +++ b/src/gallium/drivers/swr/rasterizer/jitter/streamout_jit.cpp
> @@ -306,7 +306,11 @@ struct StreamOutJit : public Builder
> passes.add(createCFGSimplificationPass());
> passes.add(createEarlyCSEPass());
> passes.add(createInstructionCombiningPass());
> +#if LLVM_VERSION_MAJOR >= 7
> + passes.add(createInstSimplifyLegacyPass());
> +#else
> passes.add(createInstructionSimplifierPass());
> +#endif
> passes.add(createConstantPropagationPass());
> passes.add(createSCCPPass());
> passes.add(createAggressiveDCEPass());
More information about the mesa-dev
mailing list