aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_llvm_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/amd/common/ac_llvm_util.h')
-rw-r--r--src/amd/common/ac_llvm_util.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/amd/common/ac_llvm_util.h b/src/amd/common/ac_llvm_util.h
index d4dea4dfde6..eaf5f21876b 100644
--- a/src/amd/common/ac_llvm_util.h
+++ b/src/amd/common/ac_llvm_util.h
@@ -64,6 +64,7 @@ enum ac_target_machine_options {
AC_TM_PROMOTE_ALLOCA_TO_SCRATCH = (1 << 4),
AC_TM_CHECK_IR = (1 << 5),
AC_TM_ENABLE_GLOBAL_ISEL = (1 << 6),
+ AC_TM_CREATE_LOW_OPT = (1 << 7),
};
enum ac_float_mode {
@@ -74,10 +75,18 @@ enum ac_float_mode {
/* Per-thread persistent LLVM objects. */
struct ac_llvm_compiler {
- LLVMTargetMachineRef tm;
LLVMTargetLibraryInfoRef target_library_info;
LLVMPassManagerRef passmgr;
+
+ /* Default compiler. */
+ LLVMTargetMachineRef tm;
struct ac_compiler_passes *passes;
+
+ /* Optional compiler for faster compilation with fewer optimizations.
+ * LLVM modules can be created with "tm" too. There is no difference.
+ */
+ LLVMTargetMachineRef low_opt_tm; /* uses -O1 instead of -O2 */
+ struct ac_compiler_passes *low_opt_passes;
};
const char *ac_get_llvm_processor_name(enum radeon_family family);