summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename VMCore directory to IR.Chandler Carruth2013-01-021-2159/+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-14/+13
| | | | llvm-svn: 171257
* Remove the Function::getFnAttributes method in favor of using the AttributeSetBill Wendling2012-12-301-7/+6
| | | | | | | | | 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
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-7/+7
| | | | | | 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-3/+3
| | | | | | in the near future. llvm-svn: 169651
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-10/+10
| | | | | | | | | | | | | | | | | 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
* Remove the dependent libraries feature.Bill Wendling2012-11-271-15/+0
| | | | | | The dependent libraries feature was never used and has bit-rotted. Remove it. llvm-svn: 168694
* Fast-math flags for LLVM IR parsing and printingMichael Ilseman2012-11-271-0/+16
| | | | | | Added in the ability to read LLVM IR text that contains fast-math flags as a sequence of capital letters separated by spaces in any order. Added in the printing of the fast-math flags in a canonical order, and don't print the other flags when 'fast' is specified, as 'fast' implies all the others. llvm-svn: 168645
* Remove trailing whitespaceMichael Ilseman2012-11-151-2/+2
| | | | llvm-svn: 168103
* Special calling conventions for Intel OpenCL built-in library.Elena Demikhovsky2012-10-241-0/+1
| | | | llvm-svn: 166566
* Use method to query for attributes.Bill Wendling2012-10-041-9/+9
| | | | llvm-svn: 165209
* Make the 'getAsString' function a method of the Attributes class.Bill Wendling2012-09-201-9/+9
| | | | llvm-svn: 164305
* Use LLVM_DELETED_FUNCTION in place of 'DO NOT IMPLEMENT' comments.Craig Topper2012-09-151-4/+4
| | | | llvm-svn: 163974
* Unify the emission of the calling conventions into a single function to ↵Micah Villmow2012-09-131-42/+27
| | | | | | reduce code duplication. llvm-svn: 163805
* When calling print directly on a global (eg from the debugger) itDuncan Sands2012-09-121-3/+3
| | | | | | | | | was printing a newline that doesn't occur when printing other kinds of LLVM values. Move the printing of that newline elsewhere, making globals print the same as other values while leaving the output when printing an entire module unchanged. Patch by Saša Tomić. llvm-svn: 163693
* [ms-inline asm] Enumerate the InlineAsm dialects and rename the nsdialect toChad Rosier2012-09-051-2/+3
| | | | | | inteldialect. llvm-svn: 163231
* [ms-inline asm] Emit the (new) inline asm Non-Standard Dialect attribute.Chad Rosier2012-09-051-0/+2
| | | | llvm-svn: 163181
* Change the `linker_private_weak_def_auto' linkage to `linkonce_odr_auto_hide' toBill Wendling2012-08-171-3/+3
| | | | | | | | | | | | | | | | | | | | 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
* Move the "findUsedStructTypes" functionality outside of the Module class.Bill Wendling2012-08-031-2/+3
| | | | | | | | | The "findUsedStructTypes" method is very expensive to run. It needs to be optimized so that LTO can run faster. Splitting this method out of the Module class will help this occur. For instance, it can keep a list of seen objects so that it doesn't process them over and over again. llvm-svn: 161228
* MSVC's implementation of isalnum will assert on characters > 255, so we need ↵Aaron Ballman2012-07-161-1/+5
| | | | | | to use an unsigned char to ensure the integer promotion happens properly. This fixes an assert in debug builds with CodeGen\X86\utf8.ll llvm-svn: 160286
* Use the DebugInfo's 'print()' method to emit the comments.Bill Wendling2012-07-031-3/+5
| | | | | | | These give quite a bit more information about the DebugInfo and makes it more readable. llvm-svn: 159680
* Use the interface through DIDescriptor to get the tag/version for a debug infoBill Wendling2012-06-281-9/+11
| | | | | | MDNode. llvm-svn: 159317
* Extend the IL for selecting TLS models (PR9788)Hans Wennborg2012-06-231-1/+21
| | | | | | | | | | | | | | | 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
* Add half support to LLVM (for OpenCL)Tobias Grosser2012-05-241-9/+16
| | | | | | | | | | Submitted by: Anton Lokhmotov <Anton.Lokhmotov@arm.com> Approved by: o Anton Korobeynikov o Micah Villmow o David Neto llvm-svn: 157393
* llvm::SwitchInstStepan Dyatkovskiy2012-03-111-1/+1
| | | | | | | Renamed methods caseBegin, caseEnd and caseDefault with case_begin, case_end, and case_default. Added some notes relative to case iterators. llvm-svn: 152532
* Taken into account Duncan's comments for r149481 dated by 2nd Feb 2012:Stepan Dyatkovskiy2012-03-081-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20120130/136146.html Implemented CaseIterator and it solves almost all described issues: we don't need to mix operand/case/successor indexing anymore. Base iterator class is implemented as a template since it may be initialized either from "const SwitchInst*" or from "SwitchInst*". ConstCaseIt is just a read-only iterator. CaseIt is read-write iterator; it allows to change case successor and case value. Usage of iterator allows totally remove resolveXXXX methods. All indexing convertions done automatically inside the iterator's getters. Main way of iterator usage looks like this: SwitchInst *SI = ... // intialize it somehow for (SwitchInst::CaseIt i = SI->caseBegin(), e = SI->caseEnd(); i != e; ++i) { BasicBlock *BB = i.getCaseSuccessor(); ConstantInt *V = i.getCaseValue(); // Do something. } If you want to convert case number to TerminatorInst successor index, just use getSuccessorIndex iterator's method. If you want initialize iterator from TerminatorInst successor index, use CaseIt::fromSuccessorIndex(...) method. There are also related changes in llvm-clients: klee and clang. llvm-svn: 152297
* VMCore/AsmWriter.cpp: Tweak to check #INF and #NAN earlier.NAKAMURA Takumi2012-02-161-1/+3
| | | | | | | With MSVCRT, prior checker missed emission of #INF and #NAN. FIXME: Checking should be simpler. llvm-svn: 150667
* VMCore/AsmWriter.cpp: Use APFloat instead of atof(3).NAKAMURA Takumi2012-02-161-1/+1
| | | | | | atof(3) might behave differently among platforms. llvm-svn: 150661
* reapply the patches reverted in r149470 that reenable ConstantDataArray,Chris Lattner2012-02-051-19/+10
| | | | | | | | | 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
* Update llvm debug version to support new structure and tag for Objective-C ↵Devang Patel2012-02-041-1/+1
| | | | | | property's debug info. llvm-svn: 149736
* SwitchInst refactoring.Stepan Dyatkovskiy2012-02-011-3/+2
| | | | | | | | | | | | | | | | | The purpose of refactoring is to hide operand roles from SwitchInst user (programmer). If you want to play with operands directly, probably you will need lower level methods than SwitchInst ones (TerminatorInst or may be User). After this patch we can reorganize SwitchInst operands and successors as we want. What was done: 1. Changed semantics of index inside the getCaseValue method: getCaseValue(0) means "get first case", not a condition. Use getCondition() if you want to resolve the condition. I propose don't mix SwitchInst case indexing with low level indexing (TI successors indexing, User's operands indexing), since it may be dangerous. 2. By the same reason findCaseValue(ConstantInt*) returns actual number of case value. 0 means first case, not default. If there is no case with given value, ErrorIndex will returned. 3. Added getCaseSuccessor method. I propose to avoid usage of TerminatorInst::getSuccessor if you want to resolve case successor BB. Use getCaseSuccessor instead, since internal SwitchInst organization of operands/successors is hidden and may be changed in any moment. 4. Added resolveSuccessorIndex and resolveCaseIndex. The main purpose of these methods is to see how case successors are really mapped in TerminatorInst. 4.1 "resolveSuccessorIndex" was created if you need to level down from SwitchInst to TerminatorInst. It returns TerminatorInst's successor index for given case successor. 4.2 "resolveCaseIndex" converts low level successors index to case index that curresponds to the given successor. Note: There are also related compatability fix patches for dragonegg, klee, llvm-gcc-4.0, llvm-gcc-4.2, safecode, clang. llvm-svn: 149481
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-011-10/+19
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* with recent changes, ConstantArray is never a "string". Remove the associatedChris Lattner2012-01-311-19/+10
| | | | | | methods and constant fold the clients to false. llvm-svn: 149362
* fix asmwriting of ConstantDataArray to use the right element count, Chris Lattner2012-01-311-22/+18
| | | | | | simplify ConstantArray handling, since they can never be empty. llvm-svn: 149341
* Continue improving support for ConstantDataAggregate, and use theChris Lattner2012-01-261-9/+38
| | | | | | new methods recently added to (sometimes greatly!) simplify code. llvm-svn: 149024
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-101-2/+0
| | | | llvm-svn: 147855
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-171-19/+24
| | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). llvm-svn: 146786
* Add dump method for debugging.Bill Wendling2011-12-091-0/+3
| | | | llvm-svn: 146293
* Don't print two 0x prefixes when printing an address.Benjamin Kramer2011-11-021-1/+1
| | | | llvm-svn: 143549
* Tracing or debug-printing a newly formed instruction should not crash.Andrew Trick2011-09-301-1/+2
| | | | llvm-svn: 140874
* whitespaceAndrew Trick2011-09-301-38/+38
| | | | llvm-svn: 140873
* Clean up uses of switch instructions so they are not dependent on the ↵Eli Friedman2011-09-291-6/+8
| | | | | | operand ordering. Patch by Stepan Dyatkovskiy. llvm-svn: 140803
* Move "atomic" and "volatile" designations on instructions after the opcodeEli Friedman2011-08-121-10/+12
| | | | | | | | | | of the instruction. Note that this change affects the existing non-atomic load and store instructions; the parser now accepts both forms, and the change is noted in the release notes. llvm-svn: 137527
* Initial commit of the 'landingpad' instruction.Bill Wendling2011-08-121-0/+18
| | | | | | | | | | | | 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-3/+3
| | | | llvm-svn: 137481
* Representation of 'atomic load' and 'atomic store' in IR.Eli Friedman2011-08-091-10/+20
| | | | llvm-svn: 137170
* fix PR10286, a problem with the .ll printer handling block addresses that ↵Chris Lattner2011-08-031-11/+20
| | | | | | are out-of-scope. llvm-svn: 136768
* Add braces.Jay Foad2011-08-011-1/+2
| | | | llvm-svn: 136612
* Simplify printAlias.Jay Foad2011-08-011-21/+2
| | | | llvm-svn: 136611
* Revert r136253, r136263, r136269, r136313, r136325, r136326, r136329, r136338,Bill Wendling2011-07-301-30/+0
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
OpenPOWER on IntegriCloud