aboutsummaryrefslogtreecommitdiffstats
path: root/lib/IR/Core.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update aosp/master LLVM for rebase to r235153Pirama Arumuga Nainar2015-05-181-8/+8
| | | | | Change-Id: I9bf53792f9fc30570e81a8d80d296c681d005ea7 (cherry picked from commit 0c7f116bb6950ef819323d855415b2f2b0aad987)
* Update aosp/master llvm for rebase to r233350Pirama Arumuga Nainar2015-04-091-1/+1
| | | | Change-Id: I07d935f8793ee8ec6b7da003f6483046594bca49
* Update aosp/master LLVM for rebase to r230699.Stephen Hines2015-03-231-33/+123
| | | | Change-Id: I2b5be30509658cb8266be782de0ab24f9099f9b9
* Update aosp/master LLVM for rebase to r222494.Stephen Hines2014-12-021-17/+103
| | | | Change-Id: Ic787f5e0124df789bd26f3f24680f45e678eef2d
* Update LLVM for rebase to r212749.Stephen Hines2014-07-211-23/+26
| | | | | | | Includes a cherry-pick of: r212948 - fixes a small issue with atomic calls Change-Id: Ib97bd980b59f18142a69506400911a6009d9df18
* Update LLVM for 3.5 rebase (r209712).Stephen Hines2014-05-291-41/+99
| | | | Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
* Update to LLVM 3.5a.Stephen Hines2014-04-241-45/+71
| | | | Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
* Add addrspacecast instruction.Matt Arsenault2013-11-151-0/+11
| | | | | | Patch by Michele Scandale! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-c] Implement LLVMPrintValueToStringPeter Zotov2013-11-061-0/+10
| | | | | | Original patch by Chris Wailes git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194135 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove linkonce_odr_auto_hide.Rafael Espindola2013-11-011-3/+2
| | | | | | | | | | | | | | | linkonce_odr_auto_hide was in incomplete attempt to implement a way for the linker to hide symbols that are known to be available in every TU and whose addresses are not relevant for a particular DSO. It was redundant in that it all its uses are equivalent to linkonce_odr+unnamed_addr. Unlike those, it has never been connected to clang or llvm's optimizers, so it was effectively dead. Given that nothing produces it, this patch just nukes it (other than the llvm-c enum value). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193865 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix misapplied patch in r193597Anders Waldenborg2013-10-291-2/+2
| | | | | | | Sorry Peter Zotov, entirely my fault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193598 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-c: Make LLVM{Get,Set}Alignment work on {Load,Store}Inst tooAnders Waldenborg2013-10-291-4/+22
| | | | | | | | | | Patch by Peter Zotov Differential Revision: http://llvm-reviews.chandlerc.com/D1910 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193597 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-c: Add LLVMPrintTypeToStringAnders Waldenborg2013-10-221-0/+10
| | | | | | | | Differential Revision: http://llvm-reviews.chandlerc.com/D1963 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193149 91177308-0d34-0410-b5e6-96231b3b80d8
* llvm-c: Add LLVMDumpTypeAnders Waldenborg2013-10-161-0/+4
| | | | | | | | | | | | The C API currently allows to dump values (LLVMDumpValue), but a similar method for types was not exported. Patch by Peter Zotov Differential Revision: http://llvm-reviews.chandlerc.com/D1911 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192852 91177308-0d34-0410-b5e6-96231b3b80d8
* [llvm-c] Add LLVMPrintModuleToString.Anders Waldenborg2013-10-161-0/+10
| | | | | | | | | | | Like LLVMDumpModule but returns the string (that needs to be freed with LLVMDisposeMessage) instead of printing it to stderr. Differential Revision: http://llvm-reviews.chandlerc.com/D1941 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192821 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."Andrew Trick2013-09-191-1/+0
| | | | | | | | Working on a better solution to this. This reverts commit 7d4e9934e7ca83094c5cf41346966c8350179ff2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190990 91177308-0d34-0410-b5e6-96231b3b80d8
* Encapsulate PassManager debug flags to avoid static init and cxa_exit.Andrew Trick2013-09-181-0/+1
| | | | | | | | | | | | | | This puts all the global PassManager debugging flags, like -print-after-all and -time-passes, behind a managed static. This eliminates their static initializers and, more importantly, exit-time destructors. The only behavioral change I anticipate is that tools need to initialize the PassManager before parsing the command line in order to export these options, which makes sense. Tools that already initialize the standard passes (opt/llc) don't need to do anything new. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190974 91177308-0d34-0410-b5e6-96231b3b80d8
* whitespaceAndrew Trick2013-09-181-19/+19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190973 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose the RTDyldMemoryManager through the C API. This allows clients of Filip Pizlo2013-05-221-0/+4
| | | | | | | | | | the C API to provide their own way of allocating JIT memory (both code and data) and finalizing memory permissions (page protections, cache flush). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182448 91177308-0d34-0410-b5e6-96231b3b80d8
* Roll out r182407 and r182408 because they broke builds.Filip Pizlo2013-05-211-4/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182409 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose the RTDyldMemoryManager through the C API. This allows clients of Filip Pizlo2013-05-211-0/+4
| | | | | | | | | | the C API to provide their own way of allocating JIT memory (both code and data) and finalizing memory permissions (page protections, cache flush). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182408 91177308-0d34-0410-b5e6-96231b3b80d8
* This patch breaks up Wrap.h so that it does not have to include all of Filip Pizlo2013-05-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | the things, and renames it to CBindingWrapping.h. I also moved CBindingWrapping.h into Support/. This new file just contains the macros for defining different wrap/unwrap methods. The calls to those macros, as well as any custom wrap/unwrap definitions (like for array of Values for example), are put into corresponding C++ headers. Doing this required some #include surgery, since some .cpp files relied on the fact that including Wrap.h implicitly caused the inclusion of a bunch of other things. This also now means that the C++ headers will include their corresponding C API headers; for example Value.h must include llvm-c/Core.h. I think this is harmless, since the C API headers contain just external function declarations and some C types, so I don't believe there should be any nasty dependency issues here. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180881 91177308-0d34-0410-b5e6-96231b3b80d8
* Expose IRBuilder::CreateAtomicRMW as LLVMBuildAtomicRMW in llvm-c.Carlo Kok2013-04-231-0/+36
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180100 91177308-0d34-0410-b5e6-96231b3b80d8
* Move C++ code out of the C headers and into either C++ headersEric Christopher2013-04-221-0/+1
| | | | | | | or the C++ files themselves. This enables people to use just a C compiler to interoperate with LLVM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180063 91177308-0d34-0410-b5e6-96231b3b80d8
* C API: Fix coding styleTom Stellard2013-04-181-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179785 91177308-0d34-0410-b5e6-96231b3b80d8
* Appease a gcc warning about an overflow in a constant conversion.Bill Wendling2013-04-171-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179703 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't store AttributeSet::FunctionIndex as an int.Benjamin Kramer2013-04-171-1/+1
| | | | | | | | GCC complains: Core.cpp:1449:27: warning: overflow in implicit constant conversion [-Woverflow] I'm not sure if that's really a problem here, but using the enum type is better style anyways. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179696 91177308-0d34-0410-b5e6-96231b3b80d8
* C API: Add LLVMGetBufferSize()Tom Stellard2013-04-161-0/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179647 91177308-0d34-0410-b5e6-96231b3b80d8
* C API: Add LLVMGetBufferStart()Tom Stellard2013-04-161-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179646 91177308-0d34-0410-b5e6-96231b3b80d8
* C API: Add LLVMAddTargetDependentFunctionAttr()Tom Stellard2013-04-161-0/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179645 91177308-0d34-0410-b5e6-96231b3b80d8
* Add four new functions and one new enum to the C API:Hans Wennborg2013-04-161-0/+47
| | | | | | | | | | | | 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! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179588 91177308-0d34-0410-b5e6-96231b3b80d8
* Add multithreading functions and shutdown to the C API. Patch by MoritzDuncan Sands2013-02-171-0/+20
| | | | | | | Maxeiner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175398 91177308-0d34-0410-b5e6-96231b3b80d8
* s/bool/LLVMBool/Bill Wendling2013-02-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175204 91177308-0d34-0410-b5e6-96231b3b80d8
* Add two new functions to the C API:Bill Wendling2013-02-141-0/+23
| | | | | | | | | | LLVMCreateMemoryBufferWithMemoryRange - exposes MemoryBuffer::getMemBuffer LLVMCreateMemoryBufferWithMemoryRangeCopy - exposes MemoryBuffer::getMemBufferCopy Patch by Moritz Maxeiner! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175199 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable *BasicBlockPass::createPrinterPass()Sergei Larin2013-02-081-0/+1
| | | | | | | | Enables raw_ostream I/O for BasicBlockPass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174776 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.Bill Wendling2013-01-301-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173992 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the last of uses that use the Attribute object as a collection of ↵Bill Wendling2013-01-231-4/+4
| | | | | | | | | | attributes. Collections of attributes are handled via the AttributeSet class now. This finally frees us up to make significant changes to how attributes are structured. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173228 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the AttributeSet when removing multiple attributes. Use Attribute::AttrKindBill Wendling2013-01-231-5/+7
| | | | | | | when removing one attribute. This further encapsulates the use of the attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173214 91177308-0d34-0410-b5e6-96231b3b80d8
* More encapsulation work.Bill Wendling2013-01-221-6/+10
| | | | | | | | Use the AttributeSet when we're talking about more than one attribute. Add a function that adds a single attribute. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173196 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert s/Raw/getBitMask/g name change. This is possibly causing LTO test ↵Bill Wendling2013-01-091-2/+2
| | | | | | hangings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172020 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the initialization to the Analysis library as well as the pass.Chandler Carruth2013-01-071-1/+0
| | | | | | | This was (somewhat distressingly) only caught be the ocaml bindings tests... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171690 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert the TargetTransformInfo from an immutable pass with dynamicChandler Carruth2013-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | interfaces which could be extracted from it, and must be provided on construction, to a chained analysis group. The end goal here is that TTI works much like AA -- there is a baseline "no-op" and target independent pass which is in the group, and each target can expose a target-specific pass in the group. These passes will naturally chain allowing each target-specific pass to delegate to the generic pass as needed. In particular, this will allow a much simpler interface for passes that would like to use TTI -- they can have a hard dependency on TTI and it will just be satisfied by the stub implementation when that is all that is available. This patch is a WIP however. In particular, the "stub" pass is actually the one and only pass, and everything there is implemented by delegating to the target-provided interfaces. As a consequence the tools still have to explicitly construct the pass. Switching targets to provide custom passes and sinking the stub behavior into the NoTTI pass is the next step. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171621 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-10/+10
| | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename VMCore directory to IR.Chandler Carruth2013-01-021-0/+2408
Aside from moving the actual files, this patch only updates the build system and the source file comments under lib/... that are relevant. I'll be updating other docs and other files in smaller subsequnet commits. While I've tried to test this, but it is entirely possible that there will still be some build system fallout. Also, note that I've not changed the library name itself: libLLVMCore.a is still the library name. I'd be interested in others' opinions about whether we should rename this as well (I think we should, just not sure what it might break) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171359 91177308-0d34-0410-b5e6-96231b3b80d8