[Beignet] [PATCH 1/3] do not include llvm/clang headers for libgbeinterp
Zhigang Gong
zhigang.gong at linux.intel.com
Mon Jan 5 18:17:56 PST 2015
This patch LGTM, will push latter, thanks.
On Sun, Dec 28, 2014 at 09:21:41PM +0800, Guo Yejun wrote:
> libgbeinterp does not depend on llvm/clange, so remove these header
> files for code clean.
>
> Signed-off-by: Guo Yejun <yejun.guo at intel.com>
> ---
> backend/src/backend/gen_program.cpp | 6 +++++-
> backend/src/backend/program.cpp | 7 +++++++
> 2 files changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/backend/src/backend/gen_program.cpp b/backend/src/backend/gen_program.cpp
> index 46fcb67..2e391e1 100644
> --- a/backend/src/backend/gen_program.cpp
> +++ b/backend/src/backend/gen_program.cpp
> @@ -22,6 +22,7 @@
> * \author Benjamin Segovia <benjamin.segovia at intel.com>
> */
>
> +#ifdef GBE_COMPILER_AVAILABLE
> #include "llvm/Config/llvm-config.h"
> #if LLVM_VERSION_MAJOR == 3 && LLVM_VERSION_MINOR <= 2
> #include "llvm/LLVMContext.h"
> @@ -45,6 +46,7 @@
> #include "llvm/Support/MemoryBuffer.h"
> #include "llvm/Support/SourceMgr.h"
> #include "llvm/IRReader/IRReader.h"
> +#endif
>
> #include "backend/program.h"
> #include "backend/gen_program.h"
> @@ -56,10 +58,12 @@
> #include "backend/gen/gen_mesa_disasm.h"
> #include "backend/gen_reg_allocation.hpp"
> #include "ir/unit.hpp"
> +
> +#ifdef GBE_COMPILER_AVAILABLE
> #include "llvm/llvm_to_gen.hpp"
> #include "llvm/llvm_gen_backend.hpp"
> -
> #include <clang/CodeGen/CodeGenAction.h>
> +#endif
>
> #include <cstring>
> #include <sstream>
> diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
> index 971071e..abdb1e4 100644
> --- a/backend/src/backend/program.cpp
> +++ b/backend/src/backend/program.cpp
> @@ -31,12 +31,16 @@
> #include "ir/value.hpp"
> #include "ir/unit.hpp"
> #include "ir/printf.hpp"
> +
> +#ifdef GBE_COMPILER_AVAILABLE
> #include "llvm/llvm_to_gen.hpp"
> #include "llvm/Config/llvm-config.h"
> #include "llvm/Support/Threading.h"
> #include "llvm/Support/ManagedStatic.h"
> #include "llvm/Transforms/Utils/Cloning.h"
> #include "llvm/IR/LLVMContext.h"
> +#endif
> +
> #include <cstring>
> #include <algorithm>
> #include <fstream>
> @@ -46,6 +50,7 @@
> #include <unistd.h>
> #include <mutex>
>
> +#ifdef GBE_COMPILER_AVAILABLE
> /* Not defined for LLVM 3.0 */
> #if !defined(LLVM_VERSION_MAJOR)
> #define LLVM_VERSION_MAJOR 3
> @@ -75,6 +80,8 @@
> #endif /* LLVM_VERSION_MINOR <= 2 */
> #include <llvm/Bitcode/ReaderWriter.h>
> #include <llvm/Support/raw_ostream.h>
> +#endif
> +
> #include "src/GBEConfig.h"
>
> namespace gbe {
> --
> 1.9.1
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list