<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
It would be nice to avoid the extra #if LLVM_VERSION_MAJOR and include InstCombine.h into the same #if below, as follows:
<div class=""><br class="">
</div>
<div class="">--- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp<br class="">
+++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp<br class="">
@@ -69,6 +69,7 @@ using PassManager = llvm::legacy::PassManager;<br class="">
#include "llvm/Transforms/Scalar.h"<br class="">
#if LLVM_VERSION_MAJOR >= 7<br class="">
#include "llvm/Transforms/Utils.h"<br class="">
+#include "llvm/Transforms/InstCombine/InstCombine.h"<br class="">
#endif<br class="">
#include "llvm/Support/Host.h"<br class="">
#include "llvm/Support/DynamicLibrary.h”</div>
<div class=""><br class="">
</div>
<div class="">With the above change</div>
<div class=""><br class="">
</div>
<div class="">Reviewed-By: George Kyriazis <<a href="mailto:george.kyriazis@intel.com" class="">george.kyriazis@intel.com</a>></div>
<div class=""><br class="">
</div>
<div class="">Thanks</div>
<div class=""><br class="">
</div>
<div class="">George</div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Apr 29, 2018, at 1:40 AM, Vinson Lee <<a href="mailto:vlee@freedesktop.org" class="">vlee@freedesktop.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">Fix build error after llvm-7.0.0svn r330669 ("InstCombine: Fix layering<br class="">
by not including Scalar.h in InstCombine").<br class="">
<br class="">
 CXX      rasterizer/jitter/libmesaswr_la-blend_jit.lo<br class="">
rasterizer/jitter/blend_jit.cpp:816:20: error: use of undeclared identifier 'createInstructionCombiningPass'; did you mean 'createInstructionSimplifierPass'?<br class="">
       passes.add(createInstructionCombiningPass());<br class="">
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br class="">
                  createInstructionSimplifierPass<br class="">
<br class="">
Signed-off-by: Vinson Lee <<a href="mailto:vlee@freedesktop.org" class="">vlee@freedesktop.org</a>><br class="">
---<br class="">
src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp | 3 +++<br class="">
1 file changed, 3 insertions(+)<br class="">
<br class="">
diff --git a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp<br class="">
index 216938fa7b07..6e4d24dde8fa 100644<br class="">
--- a/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp<br class="">
+++ b/src/gallium/drivers/swr/rasterizer/jitter/jit_pch.hpp<br class="">
@@ -66,6 +66,9 @@ using PassManager = llvm::legacy::PassManager;<br class="">
#include "llvm/Support/TargetSelect.h"<br class="">
#include "llvm/Support/DynamicLibrary.h"<br class="">
#include "llvm/Transforms/IPO.h"<br class="">
+#if LLVM_VERSION_MAJOR >= 7<br class="">
+#include "llvm/Transforms/InstCombine/InstCombine.h"<br class="">
+#endif<br class="">
#include "llvm/Transforms/Scalar.h"<br class="">
#if LLVM_VERSION_MAJOR >= 7<br class="">
#include "llvm/Transforms/Utils.h"<br class="">
-- <br class="">
2.17.0<br class="">
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>