diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-01-23 19:23:28 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-01-23 19:23:28 +0000 |
commit | 5fe955cb757410c9eee7d2455cf147cc59dbf3c9 (patch) | |
tree | 49f289e9a246a5e7a5cb1cdff0956a391a8cde1a /llvm/include/llvm-c | |
parent | 5d31f6945b21fb462cdcbc08b7c0656281a23835 (diff) | |
download | bcm5719-llvm-5fe955cb757410c9eee7d2455cf147cc59dbf3c9.tar.gz bcm5719-llvm-5fe955cb757410c9eee7d2455cf147cc59dbf3c9.zip |
Add target analysis passes to the codegen pipeline for MCJIT.
This patch adds the target analysis passes (usually TargetTransformInfo) to the
codgen pipeline. We also expose now the AddAnalysisPasses method through the C
API, because the optimizer passes would also benefit from better target-specific
cost models.
Reviewed by Andrew Kaylor
llvm-svn: 199926
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r-- | llvm/include/llvm-c/ExecutionEngine.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm-c/TargetMachine.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/ExecutionEngine.h b/llvm/include/llvm-c/ExecutionEngine.h index 35643122003..7cdf0d78d5b 100644 --- a/llvm/include/llvm-c/ExecutionEngine.h +++ b/llvm/include/llvm-c/ExecutionEngine.h @@ -163,6 +163,8 @@ void *LLVMRecompileAndRelinkFunction(LLVMExecutionEngineRef EE, LLVMValueRef Fn); LLVMTargetDataRef LLVMGetExecutionEngineTargetData(LLVMExecutionEngineRef EE); +LLVMTargetMachineRef +LLVMGetExecutionEngineTargetMachine(LLVMExecutionEngineRef EE); void LLVMAddGlobalMapping(LLVMExecutionEngineRef EE, LLVMValueRef Global, void* Addr); diff --git a/llvm/include/llvm-c/TargetMachine.h b/llvm/include/llvm-c/TargetMachine.h index 46de054e78b..d4993e7e6da 100644 --- a/llvm/include/llvm-c/TargetMachine.h +++ b/llvm/include/llvm-c/TargetMachine.h @@ -137,6 +137,9 @@ LLVMBool LLVMTargetMachineEmitToMemoryBuffer(LLVMTargetMachineRef T, LLVMModuleR disposed with LLVMDisposeMessage. */ char* LLVMGetDefaultTargetTriple(void); +/** Adds the target-specific analysis passes to the pass manager. */ +void LLVMAddAnalysisPasses(LLVMTargetMachineRef T, LLVMPassManagerRef PM); + #ifdef __cplusplus } #endif |