summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Core.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename VMCore directory to IR.Chandler Carruth2013-01-021-2408/+0
| | | | | | | | | | | | | | | | | | 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) llvm-svn: 171359
* Use the predicate methods off of AttributeSet instead of Attribute.Bill Wendling2012-12-301-3/+2
| | | | llvm-svn: 171257
* Remove the Function::getFnAttributes method in favor of using the AttributeSetBill Wendling2012-12-301-2/+1
| | | | | | | | | directly. This is in preparation for removing the use of the 'Attribute' class as a collection of attributes. That will shift to the AttributeSet class instead. llvm-svn: 171253
* s/Raw/getBitMask/g to be more in line with current naming conventions. This ↵Bill Wendling2012-12-301-2/+2
| | | | | | method won't be sticking around. llvm-svn: 171244
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-10/+10
| | | | | | single attribute in the future. llvm-svn: 170502
* s/AttrListPtr/AttributeSet/g to better label what this class is going to be ↵Bill Wendling2012-12-071-7/+7
| | | | | | in the near future. llvm-svn: 169651
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-2/+2
| | | | | | | | | | | | | | | | | 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 the Attributes::Builder outside of the Attributes class and into its ↵Bill Wendling2012-10-151-8/+8
| | | | | | own class named AttrBuilder. No functionality change. llvm-svn: 165960
* Add an enum for the return and function indexes into the AttrListPtr object. ↵Bill Wendling2012-10-151-2/+2
| | | | | | This gets rid of some magic numbers. llvm-svn: 165924
* Attributes RewriteBill Wendling2012-10-151-10/+23
| | | | | | | | | | Convert the internal representation of the Attributes class into a pointer to an opaque object that's uniqued by and stored in the LLVMContext object. The Attributes class then becomes a thin wrapper around this opaque object. Eventually, the internal representation will be expanded to include attributes that represent code generation options, etc. llvm-svn: 165917
* Remove the bitwise assignment OR operator from the Attributes class. Replace ↵Bill Wendling2012-10-141-3/+5
| | | | | | it with the equivalent from the builder class. llvm-svn: 165895
* Remove the bitwise NOT operator from the Attributes class. Replace it with ↵Bill Wendling2012-10-141-2/+3
| | | | | | the equivalent from the builder class. llvm-svn: 165892
* Use builder to create alignment attributes. Remove dead function.Bill Wendling2012-10-141-5/+6
| | | | llvm-svn: 165890
* Encapsulate the "construct*AlignmentFromInt" functions.Bill Wendling2012-09-211-2/+2
| | | | llvm-svn: 164373
* Add support for accessing an MDNode's operands via the C binding. Patch byDuncan Sands2012-09-191-0/+13
| | | | | | Anthony Bryant. llvm-svn: 164247
* c bindings: revert LLVMConstInlineAsm to always use the default asm dialect.Benjamin Kramer2012-09-101-4/+2
| | | | | | | | - The C API should be stable - InlineAsm::AsmDialect is not exposed to C - The function didn't match the prototype so this was unreachable code llvm-svn: 163502
* [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect toChad Rosier2012-09-051-1/+1
| | | | | | inteldialect. llvm-svn: 163231
* [ms-inline asm] Add the inline assembly dialect, AsmDialect, to the InlineAsmChad Rosier2012-09-041-2/+4
| | | | | | class. llvm-svn: 163175
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-171-5/+5
| | | | | | | | | | | | | | | | | | | | make it more consistent with its intended semantics. The `linker_private_weak_def_auto' linkage type was meant to automatically hide globals which never had their addresses taken. It has nothing to do with the `linker_private' linkage type, which outputs the symbols with a `l' (ell) prefix among other things. The intended semantic is more like the `linkonce_odr' linkage type. Change the name of the linkage type to `linkonce_odr_auto_hide'. And therefore changing the semantics so that it produces the correct output for the linker. Note: The old linkage name `linker_private_weak_def_auto' will still parse but is not a synonym for `linkonce_odr_auto_hide'. This should be removed in 4.0. <rdar://problem/11754934> llvm-svn: 162114
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-231-1/+1
| | | | | | | | | | | | | | | This allows the user/front-end to specify a model that is better than what LLVM would choose by default. For example, a variable might be declared as @x = thread_local(initialexec) global i32 42 if it will not be used in a shared library that is dlopen'ed. If the specified model isn't supported by the target, or if LLVM can make a better choice, a different model may be used. llvm-svn: 159077
* Introduce llvm-c function LLVMPrintModuleToFile.Hans Wennborg2012-05-091-0/+19
| | | | | | | | | This lets you save the textual representation of the LLVM IR to a file. Before this patch it could only be printed to STDERR from llvm-c. Patch by Carlo Kok! llvm-svn: 156479
* add load/store volatility control to the C API, patch by Yiannis Tsiouris!Chris Lattner2012-03-221-0/+14
| | | | llvm-svn: 153238
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-051-4/+2
| | | | llvm-svn: 149849
* reapply the patches reverted in r149470 that reenable ConstantDataArray,Chris Lattner2012-02-051-2/+2
| | | | | | | | | but with a critical fix to the SelectionDAG code that optimizes copies from strings into immediate stores: the previous code was stopping reading string data at the first nul. Address this by adding a new argument to llvm::getConstantStringInfo, preserving the behavior before the patch. llvm-svn: 149800
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-011-2/+2
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* eliminate the "string" form of ConstantArray::get, usingChris Lattner2012-01-311-2/+2
| | | | | | ConstantDataArray::getString instead. llvm-svn: 149365
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-2/+1
| | | | llvm-svn: 148578
* Extend Attributes to 64 bitsKostya Serebryany2012-01-201-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc). Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit. Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2. This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it. llvm-svn: 148553
* Provide better messages in llvm_unreachable.David Blaikie2012-01-171-1/+1
| | | | llvm-svn: 148293
* Remove unreachable code. (replace with llvm_unreachable to help GCC where ↵David Blaikie2012-01-171-2/+1
| | | | | | necessary) llvm-svn: 148284
* Removing unused default switch cases in switches over enums that already ↵David Blaikie2012-01-161-2/+1
| | | | | | | | account for all enumeration values explicitly. (This time I believe I've checked all the -Wreturn-type warnings from GCC & added the couple of llvm_unreachables necessary to silence them. If I've missed any, I'll happily fix them as soon as I know about them) llvm-svn: 148262
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-101-4/+0
| | | | llvm-svn: 147855
* Add support to add named metadata operand.Devang Patel2011-12-201-0/+11
| | | | | | Patch by Andrew Wilkins! llvm-svn: 146984
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-171-0/+8
| | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). llvm-svn: 146786
* ocaml bindings: add getopcode for constant and instruction, and int64_of_const.Torok Edwin2011-10-141-0/+6
| | | | llvm-svn: 141990
* bindings: tab and indentation fixes of my previous commitsTorok Edwin2011-10-141-25/+25
| | | | llvm-svn: 141989
* Move default to top of switchMatt Beaumont-Gay2011-10-071-6/+4
| | | | llvm-svn: 141366
* Fix -asserts buildMatt Beaumont-Gay2011-10-061-0/+2
| | | | llvm-svn: 141313
* Don't require C bindings opcode numbers to be kept in sync.Torok Edwin2011-10-061-3/+28
| | | | | | | | They are not in sync now, for example Bitcast would show up as LLVMCall. So instead introduce 2 functions that map to and from the opcodes in the C bindings. llvm-svn: 141290
* ocaml/C bindings: type->isSized()Torok Edwin2011-10-061-0/+5
| | | | llvm-svn: 141288
* add binding to read icmp predicateTorok Edwin2011-10-061-0/+9
| | | | llvm-svn: 141287
* ocaml/C bindings: getmdstring, add num_op, get_op should work on metadata tooTorok Edwin2011-10-061-2/+34
| | | | llvm-svn: 141286
* C/OCaml API to retrieve struct name.Torok Edwin2011-10-061-0/+8
| | | | llvm-svn: 141285
* Add C api for Instruction->eraseFromParent().Devang Patel2011-10-031-0/+4
| | | | llvm-svn: 141023
* Add some useful accessors to c++ api that appear to be missing from the c apiNate Begeman2011-08-231-0/+14
| | | | llvm-svn: 138371
* Initial commit of the 'landingpad' instruction.Bill Wendling2011-08-121-0/+17
| | | | | | | | | | | | This implements the 'landingpad' instruction. It's used to indicate that a basic block is a landing pad. There are several restrictions on its use (see LangRef.html for more detail). These restrictions allow the exception handling code to gather the information it needs in a much more sane way. This patch has the definition, implementation, C interface, parsing, and bitcode support in it. llvm-svn: 137501
* switch to the new struct apis.Chris Lattner2011-08-121-1/+1
| | | | llvm-svn: 137481
* Remove the LLVMBuildUnwind C API function.Bill Wendling2011-08-021-4/+0
| | | | | | | The 'unwind' function is going away with the new EH rewrite. This is step 0 in keeping front-ends from using it. llvm-svn: 136683
* Add the 'resume' instruction for the new EH rewrite.Bill Wendling2011-07-311-0/+4
| | | | | | | | | This adds the 'resume' instruction class, IR parsing, and bitcode reading and writing. The 'resume' instruction resumes propagation of an existing (in-flight) exception whose unwinding was interrupted with a 'landingpad' instruction (to be added later). llvm-svn: 136589
* Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,Bill Wendling2011-07-301-23/+0
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
OpenPOWER on IntegriCloud