[Beignet] [PATCH] GBE: disable GVN pass when optLevel is zero.
Yang, Rong R
rong.r.yang at intel.com
Thu Jun 26 23:19:22 PDT 2014
LGTM, thanks.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Ruiling Song
> Sent: Friday, June 27, 2014 2:18 PM
> To: beignet at lists.freedesktop.org
> Cc: Song, Ruiling
> Subject: [Beignet] [PATCH] GBE: disable GVN pass when optLevel is zero.
>
> GVN pass may generate some i256 data type, which our backend could not
> handle.
> So, only enable it when optLevel > 0.
>
> Signed-off-by: Ruiling Song <ruiling.song at intel.com>
> ---
> backend/src/llvm/llvm_to_gen.cpp | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/backend/src/llvm/llvm_to_gen.cpp
> b/backend/src/llvm/llvm_to_gen.cpp
> index 50b3a19..153b11d 100644
> --- a/backend/src/llvm/llvm_to_gen.cpp
> +++ b/backend/src/llvm/llvm_to_gen.cpp
> @@ -221,7 +221,8 @@ namespace gbe
> passes.add(createConstantPropagationPass());
> passes.add(createLowerSwitchPass());
> passes.add(createPromoteMemoryToRegisterPass());
> - passes.add(createGVNPass()); // Remove
> redundancies
> + if(optLevel > 0)
> + passes.add(createGVNPass()); // Remove
> redundancies
> passes.add(createPrintfParserPass());
> passes.add(createScalarizePass()); // Expand all vector ops
> passes.add(createDeadInstEliminationPass()); // Remove simplified
> instructions
> --
> 1.7.10.4
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list