summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/TargetMachine.h
Commit message (Collapse)AuthorAgeFilesLines
* [LLVM-C] Add target triple normalization to the C API.whitequark2018-07-171-0/+4
| | | | | | | | | | | | | | | | | | rL333307 was introduced to remove automatic target triple normalization when calling sys::getDefaultTargetTriple(), arguing that users of the latter already called Triple::normalize() if necessary. However, users of the C API currently have no way of doing target triple normalization. This patch introduces an LLVMNormalizeTargetTriple function to the C API which wraps Triple::normalize() and can be used on the result of LLVMGetDefaultTargetTriple to achieve the same effect. Differential Revision: https://reviews.llvm.org/D49414 Reviewed By: whitequark llvm-svn: 337263
* [LLVM-C] Add LLVMGetHostCPU{Name,Features}.whitequark2018-04-111-0/+8
| | | | | | | | | | | | | | Without these functions it's hard to create a TargetMachine for Orc JIT that creates efficient native code. It's not sufficient to just expose LLVMGetHostCPUName(), because for some CPUs there's fewer features actually available than the CPU name indicates (e.g. AVX might be missing on some CPUs identified as Skylake). Differential Revision: https://reviews.llvm.org/D44861 llvm-svn: 329856
* Sort the remaining #include lines in include/... and lib/....Chandler Carruth2017-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | I did this a long time ago with a janky python script, but now clang-format has built-in support for this. I fed clang-format every line with a #include and let it re-sort things according to the precise LLVM rules for include ordering baked into clang-format these days. I've reverted a number of files where the results of sorting includes isn't healthy. Either places where we have legacy code relying on particular include ordering (where possible, I'll fix these separately) or where we have particular formatting around #include lines that I didn't want to disturb in this patch. This patch is *entirely* mechanical. If you get merge conflicts or anything, just ignore the changes in this patch and run clang-format over your #include lines in the files. Sorry for any noise here, but it is important to keep these things stable. I was seeing an increasing number of patches with irrelevant re-ordering of #include lines because clang-format was used. This patch at least isolates that churn, makes it easy to skip when resolving conflicts, and gets us to a clean baseline (again). llvm-svn: 304787
* Restore the capability to manipulate datalayout from the C APIAmaury Sechet2016-02-161-0/+3
| | | | | | | | | | | | | | | | | Summary: This consist in variosu addition to the C API: LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M); void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL); LLVMTargetDataRef LLVMCreateTargetMachineData(LLVMTargetMachineRef T); Reviewers: joker.eph, Wallbraker, echristo Subscribers: axw Differential Revision: http://reviews.llvm.org/D17255 llvm-svn: 260936
* Remove LLVMGetTargetMachineData leftovers.Benjamin Kramer2016-02-121-3/+0
| | | | llvm-svn: 260720
* Reorganize the C API headers to improve build times.Eric Christopher2015-12-181-1/+1
| | | | | | | | | Type specific declarations have been moved to Type.h and error handling routines have been moved to ErrorHandling.h. Both are included in Core.h so nothing should change for projects directly including the headers, but transitive dependencies may be affected. llvm-svn: 255965
* Add target analysis passes to the codegen pipeline for MCJIT.Juergen Ributzka2014-01-231-0/+3
| | | | | | | | | | | 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
* Whitespace.NAKAMURA Takumi2014-01-101-1/+1
| | | | llvm-svn: 198934
* [llvm-c] Add missing const qualifiers to LLVMCreateTargetMachinePeter Zotov2013-11-151-3/+3
| | | | llvm-svn: 194770
* [llvm-c] Simplify signature of LLVMGetTargetFromNamePeter Zotov2013-11-151-1/+1
| | | | | | | LLVMGetTargetFromName was not yet present in an LLVM release, so this does not break compatibility. llvm-svn: 194769
* [llvm-c] Improve TargetMachine bindingsPeter Zotov2013-11-061-0/+20
| | | | | | Original patch by Chris Wailes llvm-svn: 194143
* llvm-c: Make LLVMGetFirstTarget a proper prototypeAnders Waldenborg2013-09-191-1/+1
| | | | | | | | | This avoids warnings when included in a application that uses -Wstrict-prototypes. Differential Revision: http://llvm-reviews.chandlerc.com/D1713 llvm-svn: 191029
* Rename 'struct LLVMTargetMachine' to 'struct LLVMOpaqueTargetMachine'. Filip Pizlo2013-05-011-1/+1
| | | | | | This avoids namespace collisions with llvm::LLVMTargetMachine. llvm-svn: 180891
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-221-22/+0
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
* C API: Add LLVMTargetMachineEmitToMemoryBuffer()Tom Stellard2013-04-161-0/+3
| | | | llvm-svn: 179648
* Revert r178713Evan Cheng2013-04-041-3/+1
| | | | llvm-svn: 178769
* Make it possible to include llvm-c without including C++ headers. Patch by ↵Evan Cheng2013-04-031-1/+3
| | | | | | Filip Pizlo. llvm-svn: 178713
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-0/+1
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Move TargetData to DataLayout.Micah Villmow2012-10-081-1/+1
| | | | llvm-svn: 165402
* Add a C binding to the Target and TargetMachine classes to allow for emittingDuncan Sands2012-04-111-0/+142
binary and assembly. Patch by Carlo Kok. Emitting was inspired by but not based on the D llvm bindings. llvm-svn: 154493
OpenPOWER on IntegriCloud