mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 10:18:05 +02:00
radeon: Move radeon_llvm_emit.cpp declarations into their own header
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6e238bf27c
commit
509ddb0a04
5 changed files with 58 additions and 19 deletions
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#include "radeon_llvm.h"
|
||||
#include "radeon_llvm_emit.h"
|
||||
|
||||
#include <llvm/Support/CommandLine.h>
|
||||
#include <llvm/Support/IRReader.h>
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#ifndef LLVM_GPU_H
|
||||
#define LLVM_GPU_H
|
||||
#ifndef RADEON_LLVM_H
|
||||
#define RADEON_LLVM_H
|
||||
|
||||
#include <llvm-c/Core.h>
|
||||
#include "gallivm/lp_bld_init.h"
|
||||
|
|
@ -36,10 +36,6 @@
|
|||
#define RADEON_LLVM_MAX_BRANCH_DEPTH 16
|
||||
#define RADEON_LLVM_MAX_LOOP_DEPTH 16
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct radeon_llvm_branch {
|
||||
LLVMBasicBlockRef endif_block;
|
||||
LLVMBasicBlockRef if_block;
|
||||
|
|
@ -109,13 +105,6 @@ struct radeon_llvm_context {
|
|||
struct gallivm_state gallivm;
|
||||
};
|
||||
|
||||
unsigned radeon_llvm_compile(
|
||||
LLVMModuleRef M,
|
||||
unsigned char ** bytes,
|
||||
unsigned * byte_count,
|
||||
const char * gpu_family,
|
||||
unsigned dump);
|
||||
|
||||
void radeon_llvm_context_init(struct radeon_llvm_context * ctx);
|
||||
|
||||
void radeon_llvm_dispose(struct radeon_llvm_context * ctx);
|
||||
|
|
@ -130,7 +119,4 @@ unsigned radeon_llvm_reg_index_soa(unsigned index, unsigned chan);
|
|||
|
||||
void radeon_llvm_finalize_module(struct radeon_llvm_context * ctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif /* LLVM_GPU_H */
|
||||
#endif /* RADEON_LLVM_H */
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* Authors: Tom Stellard <thomas.stellard@amd.com>
|
||||
*
|
||||
*/
|
||||
#include "radeon_llvm.h"
|
||||
#include "radeon_llvm_emit.h"
|
||||
|
||||
#include <llvm/LLVMContext.h>
|
||||
#include <llvm/Module.h>
|
||||
|
|
|
|||
52
src/gallium/drivers/radeon/radeon_llvm_emit.h
Normal file
52
src/gallium/drivers/radeon/radeon_llvm_emit.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
/*
|
||||
* Copyright 2012 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
* SOFTWARE.
|
||||
*
|
||||
* Authors: Tom Stellard <thomas.stellard@amd.com>
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef RADEON_LLVM_EMIT_H
|
||||
#define RADEON_LLVM_EMIT_H
|
||||
|
||||
#include <llvm-c/Core.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
unsigned radeon_llvm_bitcode_compile(
|
||||
unsigned char * bitcode, unsigned bitcode_len,
|
||||
unsigned char ** bytes, unsigned * byte_count,
|
||||
const char * gpu_family, unsigned dump);
|
||||
|
||||
unsigned radeon_llvm_compile(
|
||||
LLVMModuleRef M,
|
||||
unsigned char ** bytes,
|
||||
unsigned * byte_count,
|
||||
const char * gpu_family,
|
||||
unsigned dump);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* Extern "C" */
|
||||
#endif
|
||||
|
||||
#endif /* RADEON_LLVM_EMIT_H */
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
#include "gallivm/lp_bld_intr.h"
|
||||
#include "gallivm/lp_bld_tgsi.h"
|
||||
#include "radeon_llvm.h"
|
||||
#include "radeon_llvm_emit.h"
|
||||
#include "tgsi/tgsi_info.h"
|
||||
#include "tgsi/tgsi_parse.h"
|
||||
#include "tgsi/tgsi_scan.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue