summaryrefslogtreecommitdiff
path: root/lib/AsmParser
Commit message (Collapse)AuthorAge
* Use MemoryBuffer::getBufferIdentifier() in the AsmPrinter insteadDan Gohman2009-09-08
| | | | | | | | of requiring a name be passed in. This makes it use "<stdin>" instead of "-" and makes it more consistent with the Bitcode reader. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81256 91177308-0d34-0410-b5e6-96231b3b80d8
* Reappy r80998, now that the GlobalOpt bug that it exposed on MiniSAT is fixed.Dan Gohman2009-09-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81172 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Include optional subclass flags, such as inbounds, nsw, etc., ...", thisDaniel Dunbar2009-09-06
| | | | | | breaks MiniSAT on x86_64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81098 91177308-0d34-0410-b5e6-96231b3b80d8
* Include optional subclass flags, such as inbounds, nsw, etc., in theDan Gohman2009-09-04
| | | | | | | | | | | | | | | | | | Constant uniquing tables. This allows distinct ConstantExpr objects with the same operation and different flags. Even though a ConstantExpr "a + b" is either always overflowing or never overflowing (due to being a ConstantExpr), it's still necessary to be able to represent it both with and without overflow flags at the same time within the IR, because the safety of the flag may depend on the context of the use. If the constant really does overflow, it wouldn't ever be safe to use with the flag set, however the use may be in code that is never actually executed. This also makes it possible to merge all the flags tests into a single test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80998 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor common code from ParseAssemblyString and ParseAssemblyFile,Dan Gohman2009-09-02
| | | | | | | to expose a low-level interface for parsing from an existing MemoryBuffer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80803 91177308-0d34-0410-b5e6-96231b3b80d8
* plug another leak in LLParser::PerFunctionState::SetInstName()Nuno Lopes2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80792 91177308-0d34-0410-b5e6-96231b3b80d8
* plug memory leak in LLParser::PerFunctionState::SetInstName() by deleting a ↵Nuno Lopes2009-09-02
| | | | | | value after replacing it git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80790 91177308-0d34-0410-b5e6-96231b3b80d8
* Retype from unsigned to CallingConv::ID accordingly. Approved by Bob Wilson.Sandeep Patel2009-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80773 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor logic simplification.Dan Gohman2009-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80453 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 79977.Devang Patel2009-08-28
| | | | | | | Use MDNodes to encode debug info in llvm IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80406 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 79977. It causes llvm-gcc bootstrap failures on some platforms.Devang Patel2009-08-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80073 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an 'inline hint' attribute to represent sourceDale Johannesen2009-08-26
| | | | | | | | | | code hints that it would be a good idea to inline a function ("inline" keyword). No functional change yet; FEs do not emit this and inliner does not use it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80063 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate the unused Context argument on one of the ICmpInst and FCmpInstDan Gohman2009-08-25
| | | | | | | constructors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80049 91177308-0d34-0410-b5e6-96231b3b80d8
* Update DebugInfo interface to use metadata, instead of special named ↵Devang Patel2009-08-25
| | | | | | | | | llvm.dbg.... global variables, to encode debugging information in llvm IR. This is mostly a mechanical change that tests metadata support very well. This change speeds up llvm-gcc by more then 6% at "-O0 -g" (measured by compiling InstructionCombining.cpp!) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79977 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build with gcc-4.4 on linux: header neededDuncan Sands2009-08-24
| | | | | | | for EOF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79908 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrapDan Gohman2009-08-20
| | | | | | | and hasNoSignedWrap, for consistency with the nuw and nsw properties. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79539 91177308-0d34-0410-b5e6-96231b3b80d8
* Actually privatize a IntegerTypes, and fix a few bugs exposed by this.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78955 91177308-0d34-0410-b5e6-96231b3b80d8
* Push LLVMContexts through the IntegerType APIs.Owen Anderson2009-08-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78948 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert APint::{fromString,APInt,getBitsNeeded} to use StringRef.Daniel Dunbar2009-08-13
| | | | | | | - Patch by Erick Tryzelaar, with some edits (and a bug fix) from me. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78885 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend the AsmWriter to print unnamed numbered types as "%0 = type ..."Dan Gohman2009-08-12
| | | | | | | | and unnamed numbered global variables as "@0 = global ...". Extend the AsmParser to recognize these forms. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78859 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LLVMContext and LLVMContextImpl classes instead of structs.Benjamin Kramer2009-08-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
* Privatize the StructType table, which unfortunately involves routing ↵Owen Anderson2009-08-05
| | | | | | contexts through a number of APIs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78258 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor some of the constants+context related code out into a separate ↵Owen Anderson2009-08-04
| | | | | | | | | header, to make LLVMContextImpl.h not hideous. Also, fix some MSVC compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the metadata constructors back to 2.5 syntax.Owen Anderson2009-07-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77733 91177308-0d34-0410-b5e6-96231b3b80d8
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-31
| | | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77721 91177308-0d34-0410-b5e6-96231b3b80d8
* Move getTrue() and getFalse() to 2.5-like APIs.Owen Anderson2009-07-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77685 91177308-0d34-0410-b5e6-96231b3b80d8
* Move more code back to 2.5 APIs.Owen Anderson2009-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77635 91177308-0d34-0410-b5e6-96231b3b80d8
* Move types back to the 2.5 API.Owen Anderson2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77516 91177308-0d34-0410-b5e6-96231b3b80d8
* There is no need to keep name ref in NamedMDNode.Devang Patel2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77511 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor code simplification.Dan Gohman2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77459 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse named metadata.Devang Patel2009-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77410 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename MDNode.h header. It defines MDnode and other metadata classes.Devang Patel2009-07-28
| | | | | | | | New name is Metadata.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77370 91177308-0d34-0410-b5e6-96231b3b80d8
* Return ConstantVector to 2.5 API.Owen Anderson2009-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77366 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ConstantArray to 2.5 API.Owen Anderson2009-07-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77347 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ConstantStruct back to 2.5 API.Owen Anderson2009-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77266 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new keyword 'inbounds' for use with getelementptr. See theDan Gohman2009-07-27
| | | | | | | LangRef.html changes for details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77259 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ConstantFP construction back to the 2.5-ish API.Owen Anderson2009-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77247 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the assembly syntax for nsw, nuw, and exact, putting themDan Gohman2009-07-27
| | | | | | | | after their associated opcodes rather than before. This makes them a little easier to read. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77194 91177308-0d34-0410-b5e6-96231b3b80d8
* Test commit: fix typoBenjamin Kramer2009-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77187 91177308-0d34-0410-b5e6-96231b3b80d8
* Finish migrating VMCore to StringRef/Twine based APIs.Daniel Dunbar2009-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77051 91177308-0d34-0410-b5e6-96231b3b80d8
* Move ExtractElementInst to ::Create instead of new. Update all uses.Eric Christopher2009-07-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77044 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert the ConstantInt constructors back to their 2.5 forms where possible, ↵Owen Anderson2009-07-24
| | | | | | thanks to contexts-on-types. More to come. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77011 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix assert assembling zero-argument constant GEP.Eli Friedman2009-07-24
| | | | | | | | | There's still a strict-aliasing violation here, but I don't feel like dealing with that right now... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77005 91177308-0d34-0410-b5e6-96231b3b80d8
* MDStringDevang Patel2009-07-23
| | | | | | | | | - Rename member function size(). New name is length(). - Store string beginning and length. Earlier it used to store string end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76841 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence "uninitialized use" warning.Devang Patel2009-07-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76836 91177308-0d34-0410-b5e6-96231b3b80d8
* Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into ↵Devang Patel2009-07-23
| | | | | | METADATA_BLOCK in bitcode file. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76834 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix error message for correct opcode.Eric Christopher2009-07-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76829 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the new unsigned and signed keywords to nuw and nsw,Dan Gohman2009-07-22
| | | | | | | which stand for no-unsigned-wrap and no-signed-wrap. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76810 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-22
| | | | | | | | | | Derive MDString directly from MetadataBase. Introduce new bitcode block to hold metadata. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76759 91177308-0d34-0410-b5e6-96231b3b80d8