ac/radv: change api to create target machine

This just modifies the API to make it easier to add other flags
to target machine creation.

Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Dave Airlie
2017-07-06 02:56:21 +01:00
parent 076faf8764
commit 9d9f051390
3 changed files with 14 additions and 7 deletions

View File

@@ -118,11 +118,11 @@ static const char *ac_get_llvm_processor_name(enum radeon_family family)
}
}
LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family, bool supports_spill)
LLVMTargetMachineRef ac_create_target_machine(enum radeon_family family, enum ac_target_machine_options tm_options)
{
assert(family >= CHIP_TAHITI);
const char *triple = supports_spill ? "amdgcn-mesa-mesa3d" : "amdgcn--";
const char *triple = (tm_options & AC_TM_SUPPORTS_SPILL) ? "amdgcn-mesa-mesa3d" : "amdgcn--";
LLVMTargetRef target = ac_get_llvm_target(triple);
LLVMTargetMachineRef tm = LLVMCreateTargetMachine(
target,