summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-c][Disassembler] Add an option to reproduce in disassembled output theQuentin Colombet2013-10-011-0/+2
| | | | | | | | | | | | | | comments issued with verbose assembly. E.g., on a vector shuffle operation, disassembled output are: * Without the option: vpshufd $-0x79, (%rsp), %xmm0 * With the option: vpshufd $-0x79, (%rsp), %xmm0 ## xmm0 = mem[3,1,0,2] This part of <rdar://problem/14687488>. llvm-svn: 191799
* llvm-c: use typedef for function pointersAnders Waldenborg2013-09-301-8/+13
| | | | | | | | This makes it consistent with other function pointers used in llvm-c Differential Revision: http://llvm-reviews.chandlerc.com/D1712 llvm-svn: 191693
* Try again to fix the MSVC build.Peter Collingbourne2013-09-251-1/+1
| | | | llvm-svn: 191359
* Wrap the #include of <stdbool.h> in an #ifndef __cplusplus.Peter Collingbourne2013-09-251-0/+2
| | | | | | This should fix the MSVC build. llvm-svn: 191357
* Revert "llvm-c: Add LLVMGetPointerToFunction"Anders Waldenborg2013-09-201-2/+0
| | | | | | This reverts r191030 llvm-svn: 191075
* llvm-c: Add LLVMGetPointerToFunctionAnders Waldenborg2013-09-191-0/+2
| | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1715 llvm-svn: 191030
* 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
* Revert 189297, the original commit message is following. Shuxin Yang2013-08-271-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ---- Add new API lto_codegen_compile_parallel(). This API is proposed by Nick Kledzik. The semantic is: -------------------------------------------------------------------------- Generate code for merged module into an array of native object files. On success returns a pointer to an array of NativeObjectFile. The count parameter returns the number of elements in the array. Each element is a pointer/length for a generated mach-o/ELF buffer. The buffer is owned by the lto_code_gen_t and will be freed when lto_codegen_dispose() is called, or lto_codegen_compile() is called again. On failure, returns NULL (check lto_get_error_message() for details). extern const struct NativeObjectFile* lto_codegen_compile_parallel(lto_code_gen_t cg, size_t *count); --------------------------------------------------------------------------- This API is currently only called on OSX platform. Linux or other Unixes using GNU gold are not supposed to call this function, because on these systems, object files are fed back to linker via disk file instead of memory buffer. In this commit, lto_codegen_compile_parallel() simply calls lto_codegen_compile() to return a single object file. In the near future, this function is the entry point for compilation with partition. Linker can blindly call this function even if partition is turned off; in this case, compiler will return only one object file. llvm-svn: 189386
* Add new API lto_codegen_compile_parallel().Shuxin Yang2013-08-271-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This API is proposed by Nick Kledzik. The semantic is: -------------------------------------------------------------------------- Generate code for merged module into an array of native object files. On success returns a pointer to an array of NativeObjectFile. The count parameter returns the number of elements in the array. Each element is a pointer/length for a generated mach-o/ELF buffer. The buffer is owned by the lto_code_gen_t and will be freed when lto_codegen_dispose() is called, or lto_codegen_compile() is called again. On failure, returns NULL (check lto_get_error_message() for details). extern const struct NativeObjectFile* lto_codegen_compile_parallel(lto_code_gen_t cg, size_t *count); --------------------------------------------------------------------------- This API is currently only called on OSX platform. Linux or other Unixes using GNU gold are not supposed to call this function, because on these systems, object files are fed back to linker via disk file instead of memory buffer. In this commit, lto_codegen_compile_parallel() simply calls lto_codegen_compile() to return a single object file. In the near future, this function is the entry point for compilation with partition. Linker can blindly call this function even if partition is turned off; in this case, compiler will return only one object file. llvm-svn: 189297
* Add function attribute 'optnone'.Andrea Di Biagio2013-08-231-2/+3
| | | | | | | | This function attribute indicates that the function is not optimized by any optimization or code generator passes with the exception of interprocedural optimization passes. llvm-svn: 189101
* Turn MipsOptimizeMathLibCalls into a target-independent scalar transformRichard Sandiford2013-08-231-0/+3
| | | | | | | | | | ...so that it can be used for z too. Most of the code is the same. The only real change is to use TargetTransformInfo to test when a sqrt instruction is available. The pass is opt-in because at the moment it only handles sqrt. llvm-svn: 189097
* [typo] An LLVM.Daniel Dunbar2013-08-161-11/+11
| | | | llvm-svn: 188589
* Revert r188188 and r188200.Shuxin Yang2013-08-121-12/+0
| | | | | | | | In order to appease people (in Apple) who accuse me for committing "huge change" (?) without proper review. Thank Eric for fixing a compile-warning. llvm-svn: 188204
* Misc enhancements to LTO:Shuxin Yang2013-08-121-0/+12
| | | | | | | | | | | | | | | | | | | | | 1. Add some helper classes for partitions. They are designed in a way such that the top-level LTO driver will not see much difference with or without partitioning. 2. Introduce work-dir. Now all intermediate files generated during LTO phases will be saved under work-dir. User can specify the workdir via -lto-workdir=/path/to/dir. By default the work-dir will be erased before linker exit. To keep the workdir, do -lto-keep, or -lto-keep=1. TODO: Erase the workdir, if the linker exit prematurely. We are currently not able to remove directory on signal. The support routines simply ignore directory. 3. Add one new API lto_codegen_get_files_need_remove(). Linker and LTO plugin will communicate via this API about which files (including directories) need to removed before linker exit. llvm-svn: 188188
* Add a new function attribute 'cold' to functions.Diego Novillo2013-05-241-0/+1
| | | | | | | | | | | Other than recognizing the attribute, the patch does little else. It changes the branch probability analyzer so that edges into blocks postdominated by a cold function are given low weight. Added analysis and code generation tests. Added documentation for the new attribute. llvm-svn: 182638
* Expose the RTDyldMemoryManager through the C API. This allows clients of Filip Pizlo2013-05-222-0/+29
| | | | | | | | the C API to provide their own way of allocating JIT memory (both code and data) and finalizing memory permissions (page protections, cache flush). llvm-svn: 182448
* Roll out r182407 and r182408 because they broke builds.Filip Pizlo2013-05-212-29/+0
| | | | llvm-svn: 182409
* Expose the RTDyldMemoryManager through the C API. This allows clients of Filip Pizlo2013-05-212-0/+29
| | | | | | | | the C API to provide their own way of allocating JIT memory (both code and data) and finalizing memory permissions (page protections, cache flush). llvm-svn: 182408
* Fix formatting. Patch by o11c.Duncan Sands2013-05-061-18/+18
| | | | llvm-svn: 181189
* This exposes more MCJIT options via the C API:Filip Pizlo2013-05-011-11/+18
| | | | | | | | | | | | | | | | | | | | | CodeModel: It's now possible to create an MCJIT instance with any CodeModel you like. Previously it was only possible to create an MCJIT that used CodeModel::JITDefault. EnableFastISel: It's now possible to turn on the fast instruction selector. The CodeModel option required some trickery. The problem is that previously, we were ensuring future binary compatibility in the MCJITCompilerOptions by mandating that the user bzero's the options struct and passes the sizeof() that he saw; the bindings then bzero the remaining bits. This works great but assumes that the bitwise zero equivalent of any field is a sensible default value. But this is not the case for LLVMCodeModel, or its internal equivalent, llvm::CodeModel::Model. In both of those, the default for a JIT is CodeModel::JITDefault (or LLVMCodeModelJITDefault), which is not bitwise zero. Hence this change introduces LLVMInitializeMCJITCompilerOptions(), which will initialize the user's options struct with defaults. The user will use this in the same way that they would have previously used memset() or bzero(). MCJITCAPITest.cpp illustrates the change, as does the comment in ExecutionEngine.h. llvm-svn: 180893
* Rename 'struct LLVMTargetMachine' to 'struct LLVMOpaqueTargetMachine'. Filip Pizlo2013-05-011-1/+1
| | | | | | This avoids namespace collisions with llvm::LLVMTargetMachine. llvm-svn: 180891
* Exposing MCJIT through C APIAndrew Kaylor2013-04-291-0/+28
| | | | | | | | Re-submitting with fix for OCaml dependency problems (removing dependency on SectionMemoryManager when it isn't used). Patch by Fili Pizlo llvm-svn: 180720
* Revert "Exposing MCJIT through C API"Rafael Espindola2013-04-251-28/+0
| | | | | | | | | | This reverts commit 8c31b298149ca3c3f2bbd9e8aa9a01c4d91f3d74. It looks like this commit broke some bots: http://lab.llvm.org:8011/builders/llvm-ppc64-linux2/builds/5209 llvm-svn: 180248
* Exposing MCJIT through C APIAndrew Kaylor2013-04-241-0/+28
| | | | | | Patch by Filip Pizlo llvm-svn: 180229
* c vs c++ mistake in header file typedef for AtomicRMW fix in rev 180100.Carlo Kok2013-04-231-4/+4
| | | | llvm-svn: 180104
* Expose IRBuilder::CreateAtomicRMW as LLVMBuildAtomicRMW in llvm-c.Carlo Kok2013-04-231-0/+53
| | | | llvm-svn: 180100
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-226-228/+1
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. llvm-svn: 180063
* C API: Fix coding styleTom Stellard2013-04-181-1/+1
| | | | llvm-svn: 179785
* C API: Add LLVMTargetMachineEmitToMemoryBuffer()Tom Stellard2013-04-161-0/+3
| | | | llvm-svn: 179648
* C API: Add LLVMGetBufferSize()Tom Stellard2013-04-161-0/+1
| | | | llvm-svn: 179647
* C API: Add LLVMGetBufferStart()Tom Stellard2013-04-161-0/+1
| | | | llvm-svn: 179646
* C API: Add LLVMAddTargetDependentFunctionAttr()Tom Stellard2013-04-161-0/+7
| | | | llvm-svn: 179645
* Add four new functions and one new enum to the C API:Hans Wennborg2013-04-161-0/+12
| | | | | | | | | | | | LLVMGetThreadLocalMode - exposes GlobalVariable::getThreadLocalMode LLVMSetThreadLocalMode - exposes GlobalVariable::setThreadLocalMode LLVMIsExternallyInitialized - exposes GlobalVariable::isExternallyInitialized LLVMSetExternallyInitialized - exposes GlobalVariable::setExternallyInitialized LLVMThreadLocalMode - maps to GlobalVariable::ThreadLocalMode Patch by Moritz Maxeiner! llvm-svn: 179588
* Rename the C function to create a SLPVectorizerPass to something sane and ↵Benjamin Kramer2013-04-111-0/+3
| | | | | | expose it in the header file. llvm-svn: 179272
* Revert r178713Evan Cheng2013-04-046-29/+13
| | | | llvm-svn: 178769
* Make it possible to include llvm-c without including C++ headers. Patch by ↵Evan Cheng2013-04-036-13/+29
| | | | | | Filip Pizlo. llvm-svn: 178713
* Use LLVMBool instead of 'bool' in the C API. Based on a patch by Peter Zotov!Nick Lewycky2013-03-101-2/+2
| | | | llvm-svn: 176793
* Add multithreading functions and shutdown to the C API. Patch by MoritzDuncan Sands2013-02-171-0/+33
| | | | | | Maxeiner. llvm-svn: 175398
* s/bool/LLVMBool/Bill Wendling2013-02-141-1/+1
| | | | llvm-svn: 175203
* Add two new functions to the C API:Bill Wendling2013-02-141-0/+7
| | | | | | | | | LLVMCreateMemoryBufferWithMemoryRange - exposes MemoryBuffer::getMemBuffer LLVMCreateMemoryBufferWithMemoryRangeCopy - exposes MemoryBuffer::getMemBufferCopy Patch by Moritz Maxeiner! llvm-svn: 175199
* Extracted ObjCARC.cpp into its own library libLLVMObjCARCOpts in preparation ↵Michael Gottesman2013-01-281-0/+1
| | | | | | for refactoring the ARC Optimizer. llvm-svn: 173647
* Add the IR attribute 'sspstrong'.Bill Wendling2013-01-231-2/+3
| | | | | | | | | | | | | | | | | | | | | SSPStrong applies a heuristic to insert stack protectors in these situations: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) This patch implements the SSPString attribute to be equivalent to SSPRequired. This will change in a subsequent patch. llvm-svn: 173230
* Fix include guards so they exactly match file names.Jakub Staszak2013-01-103-6/+6
| | | | llvm-svn: 172025
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-2/+2
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. llvm-svn: 171366
* Remove edis - the enhanced disassembler. Fixes PR14654.Roman Divacky2012-12-191-530/+0
| | | | llvm-svn: 170578
* Add to the disassembler C API an option to print the disassembledKevin Enderby2012-12-181-0/+2
| | | | | | | | | | | | | | | | instructions in the assembly code variant if one exists. The intended use for this is so tools like lldb and darwin's otool(1) can be switched to print Intel-flavored disassembly. I discussed extensively this API with Jim Grosbach and we feel while it may not be fully general, in reality there is only one syntax for each assembly with the exception of X86 which has exactly two for historical reasons. rdar://10989182 llvm-svn: 170477
* Revert r169656.Bill Wendling2012-12-101-7/+0
| | | | | | | | The linker will call `lto_codegen_add_must_preserve_symbol' on all globals that should be kept around. The linker will pretend that a dylib is being created. <rdar://problem/12528059> llvm-svn: 169770
* Add the `lto_codegen_set_export_dynamic' function.Bill Wendling2012-12-081-0/+7
| | | | | | | | | | | | | | | | | | | | | This function sets the `_exportDynamic' ivar. When that's set, we export all symbols (e.g. we don't run the internalize pass). This is equivalent to the `--export-dynamic' linker flag in GNU land: --export-dynamic When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. If you do not use this option, the dynamic symbol table will normally contain only those symbols which are referenced by some dynamic object mentioned in the link. If you use dlopen to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the program itself. The Darwin linker will support this via the `-export_dynamic' flag. We should modify clang to support this via the `-rdynamic' flag. llvm-svn: 169656
* Add C API for specifying CPU to the disassembler.Jim Grosbach2012-12-071-1/+14
| | | | | | | | | It was a nasty oversight that we didn't include this when we added this API in the first place. Blech. rdar://12839439 llvm-svn: 169653
* Added a option to the disassembler to print immediates as hex.Kevin Enderby2012-12-051-0/+2
| | | | | | | | | | | | | | | | | | | | This is for the lldb team so most of but not all of the values are to be printed as hex with this option. Some small values like the scale in an X86 address were requested to printed in decimal without the leading 0x. There may be some tweaks need to places that may still be in decimal that they want in hex. Specially for arm. I made my best guess. Any tweaks from here should be simple. I also did the best I know now with help from the C++ gurus creating the cleanest formatImm() utility function and containing the changes. But if someone has a better idea to make something cleaner I'm all ears and game for changing the implementation. rdar://8109283 llvm-svn: 169393
OpenPOWER on IntegriCloud