summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* De-constify Types in FunctionType::get().Jay Foad2011-07-111-4/+4
| | | | llvm-svn: 134888
* Land the long talked about "type system rewrite" patch. ThisChris Lattner2011-07-093-359/+307
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | patch brings numerous advantages to LLVM. One way to look at it is through diffstat: 109 files changed, 3005 insertions(+), 5906 deletions(-) Removing almost 3K lines of code is a good thing. Other advantages include: 1. Value::getType() is a simple load that can be CSE'd, not a mutating union-find operation. 2. Types a uniqued and never move once created, defining away PATypeHolder. 3. Structs can be "named" now, and their name is part of the identity that uniques them. This means that the compiler doesn't merge them structurally which makes the IR much less confusing. 4. Now that there is no way to get a cycle in a type graph without a named struct type, "upreferences" go away. 5. Type refinement is completely gone, which should make LTO much MUCH faster in some common cases with C++ code. 6. Types are now generally immutable, so we can use "Type *" instead "const Type *" everywhere. Downsides of this patch are that it removes some functions from the C API, so people using those will have to upgrade to (not yet added) new API. "LLVM 3.0" is the right time to do this. There are still some cleanups pending after this, this patch is large enough as-is. llvm-svn: 134829
* Replace the existing forms of ConstantArray::get() with a single formJay Foad2011-06-221-1/+1
| | | | | | that takes an ArrayRef. llvm-svn: 133615
* Revamp the "ConstantStruct::get" methods. Previously, these were scatteredChris Lattner2011-06-201-4/+4
| | | | | | | | | | | | | | | all over the place in different styles and variants. Standardize on two preferred entrypoints: one that takes a StructType and ArrayRef, and one that takes StructType and varargs. In cases where there isn't a struct type convenient, we now add a ConstantStruct::getAnon method (whose name will make more sense after a few more patches land). It would be "really really nice" if the ConstantStruct::get and ConstantVector::get methods didn't make temporary std::vectors. llvm-svn: 133412
* Remove support for parsing the "type i32" syntax for defining a numberedChris Lattner2011-06-191-15/+8
| | | | | | | top level type without a specified number. This syntax isn't documented and blocks forward progress. llvm-svn: 133371
* revert r133368, apparently I missed the tests to be updated.Chris Lattner2011-06-181-8/+15
| | | | llvm-svn: 133369
* Remove support for parsing the "type i32" syntax for defining a numberedChris Lattner2011-06-181-15/+8
| | | | | | | | top level type without a specified number. This asmprinter has never generated this, as you can tell by no tests being updated. It also isn't documented. llvm-svn: 133368
* eliminate the Type::getDescription() method, using "<<" instead. This Chris Lattner2011-06-181-20/+27
| | | | | | removes some gunk from LLVMContext. llvm-svn: 133360
* Fix -Asserts buildMatt Beaumont-Gay2011-06-171-2/+1
| | | | llvm-svn: 133305
* remove another old and dead hunk of code.Chris Lattner2011-06-171-4/+0
| | | | llvm-svn: 133267
* Stop accepting and ignoring attributes in function types. Attributes are ↵Chris Lattner2011-06-171-10/+4
| | | | | | | | applied to functions and call/invokes, not to types. llvm-svn: 133266
* make the asmparser reject function and type redefinitions. 'Merging' hasn't ↵Chris Lattner2011-06-171-21/+5
| | | | | | | | been needed since llvm-gcc 3.4 days. llvm-svn: 133248
* remove asmparser support for the old getresult instruction, which has been ↵Chris Lattner2011-06-174-23/+1
| | | | | | subsumed by extractvalue. llvm-svn: 133247
* remove parser support for the obsolete "multiple return values" syntax, whichChris Lattner2011-06-172-35/+3
| | | | | | was replaced with return of a "first class aggregate". llvm-svn: 133245
* stop accepting begin/end around function bodies in the .ll parser, this ↵Chris Lattner2011-06-173-6/+3
| | | | | | isn't pascal anymore. llvm-svn: 133244
* Remove support for using "foo" as symbols instead of %"foo". This is ancientChris Lattner2011-06-171-10/+3
| | | | | | | syntax and has been long obsolete. As usual, updating the tests is the nasty part of this. llvm-svn: 133242
* Remove old backwards compatibility support from the parser for autoupgradingChris Lattner2011-06-174-145/+14
| | | | | | | | | | | the old malloc/free instructions, and for 'sext' and 'zext' as function attributes (they are spelled signext/zeroext now), and support for result value attributes being specified after a function. Additionally, diagnose invalid attributes on functions with an error message instead of an abort in the verifier. llvm-svn: 133229
* Add a new function attribute, nonlazybind, which inhibits lazy-loadingJohn McCall2011-06-153-0/+3
| | | | | | | | | | | | | | | | optimizations when emitting calls to the function; instead those calls may use faster relocations which require the function to be immediately resolved upon loading the dynamic object featuring the call. This is useful when it is known that the function will be called frequently and pervasively and therefore there is no merit in delaying binding of the function. Currently only implemented for x86-64, where it turns into a call through the global offset table. Patch by Dan Gohman, who assures me that he's going to add LangRef documentation for this once it's committed. llvm-svn: 133080
* Teach the .ll parser to handle named metadata with non-simple names.Nick Lewycky2011-06-151-2/+4
| | | | | | | | Unfortunately we can't follow what the rest of the language does (wrapping it in double-quotes) because that would cause an ambiguity with metadata strings, so instead we escape any unusual characters with \xx escaping. llvm-svn: 133050
* Refactor parsing of variable names (ie., %foo and @foo) since they have the sameNick Lewycky2011-06-042-50/+46
| | | | | | | rules. Also refactor "read string until quote" into its own function. No functionality change! llvm-svn: 132645
* Replace the -unwind-tables option with a per function flag. This is moreRafael Espindola2011-05-253-0/+3
| | | | | | | LTO friendly as we can now correctly merge files compiled with or without -fasynchronous-unwind-tables. llvm-svn: 132033
* Remove unused variables caught by GCC's -Wunused-but-set-variable.Benjamin Kramer2011-05-031-1/+0
| | | | llvm-svn: 130755
* PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-211-3/+3
| | | | llvm-svn: 129932
* Revert r129235 pending a vetting of the EH rewrite.Bill Wendling2011-04-103-10/+0
| | | | | | | | | | | | | | | | --- Reverse-merging r129235 into '.': D test/Feature/bb_attrs.ll U include/llvm/BasicBlock.h U include/llvm/Bitcode/LLVMBitCodes.h U lib/VMCore/AsmWriter.cpp U lib/VMCore/BasicBlock.cpp U lib/AsmParser/LLParser.cpp U lib/AsmParser/LLLexer.cpp U lib/AsmParser/LLToken.h U lib/Bitcode/Reader/BitcodeReader.cpp U lib/Bitcode/Writer/BitcodeWriter.cpp llvm-svn: 129259
* Beginning of the Great Exception Handling Rewrite.Bill Wendling2011-04-103-0/+10
| | | | | | | | | | | | | * Add a "landing pad" attribute to the BasicBlock. * Modify the bitcode reader and writer to handle said attribute. Later: The verifier will ensure that the landing pad attribute is used in the appropriate manner. I.e., not applied to the entry block, and applied only to basic blocks that are branched to via a `dispatch' instruction. (This is a work-in-progress.) llvm-svn: 129235
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-301-2/+1
| | | | | | PHINode::Create() giving the (known or expected) number of operands. llvm-svn: 128537
* Use X86_thiscall calling convention for Win64 as well.Tilmann Scheller2011-03-033-4/+0
| | | | llvm-svn: 126934
* Add Win64 thiscall calling convention.Tilmann Scheller2011-03-023-0/+4
| | | | llvm-svn: 126862
* Add a special streamer to libLTO that just records symbols definitions andRafael Espindola2011-03-021-5/+1
| | | | | | | | | | | uses. The result produced by the streamer is used to give the linker more accurate information and to add to llvm.compiler.used. The second improvement removes the need for the user to add __attribute__((used)) to functions only used in inline asm. The first one lets us build firefox with LTO on Darwin :-) llvm-svn: 126830
* convert ConstantVector::get to use ArrayRef.Chris Lattner2011-02-151-1/+1
| | | | llvm-svn: 125537
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-141-1/+1
| | | | | | builders unhappy. llvm-svn: 125504
* Switch ConstantVector::get to use ArrayRef instead of a pointer+sizeChris Lattner2011-02-141-1/+1
| | | | | | idiom. Change various clients to simplify their code. llvm-svn: 125487
* implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.Chris Lattner2011-02-071-44/+30
| | | | | | Factor some code better. llvm-svn: 125006
* enhance vmcore to know that udiv's can be exact, and add a trivialChris Lattner2011-02-061-4/+4
| | | | | | | | instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 llvm-svn: 124992
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-251-4/+4
| | | | llvm-svn: 124209
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-151-6/+0
| | | | llvm-svn: 123529
* Reject uses of unnamed_addr in declarations.Rafael Espindola2011-01-132-3/+15
| | | | llvm-svn: 123358
* First step in fixing PR8927:Rafael Espindola2011-01-083-5/+13
| | | | | | | | | | | | | | | | | | | Add a unnamed_addr bit to global variables and functions. This will be used to indicate that the address is not significant and therefore the constant or function can be merged with others. If an optimization pass can show that an address is not used, it can set this. Examples of things that can have this set by the FE are globals created to hold string literals and C++ constructors. Adding unnamed_addr to a non-const global should have no effect unless an optimization can transform that global into a constant. Aliases are not allowed to have unnamed_addr since I couldn't figure out any use for it. llvm-svn: 123063
* Add missing standard headers. Patch by Joerg Sonnenberger!Nick Lewycky2010-12-191-0/+1
| | | | llvm-svn: 122193
* Add missing std:: prefixes to some calls. C++ doesn't require that <cfoo>Nick Lewycky2010-12-191-2/+2
| | | | | | | headers provide symbols outside namespace std and the LLVM coding standards state that we should prefix all of them. llvm-svn: 122192
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-161-4/+3
| | | | | | via an out parm. llvm-svn: 121958
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-091-3/+4
| | | | | | error_code &ec. And fix clients. llvm-svn: 121379
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-072-4/+4
| | | | | | | | zextOrTrunc(), and APSInt methods extend(), extOrTrunc() and new method trunc(), to be const and to return a new value instead of modifying the object in place. llvm-svn: 121120
* Add a new 'hotpatch' attribute. This attribute will insert a two-byte no-opCharles Davis2010-10-253-0/+3
| | | | | | | instruction at the beginning of each function that has the attribute, allowing the function to be easily hooked and/or patched. llvm-svn: 117264
* AlignLoc is never used for anything - zap it (gcc-4.6 warning).Duncan Sands2010-10-211-2/+1
| | | | llvm-svn: 117025
* Eliminate some calls to Value::getNameStr.Benjamin Kramer2010-10-161-3/+3
| | | | llvm-svn: 116670
* Pacify a noisy compiler, and sink this variable declaration closer to its uses.Nick Lewycky2010-09-301-1/+1
| | | | llvm-svn: 115206
* Silence compiler warning.Nick Lewycky2010-09-291-1/+1
| | | | llvm-svn: 115107
* Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer2010-09-274-22/+22
| | | | llvm-svn: 114847
* Add ret instruction to PTX backendChe-Liang Chiou2010-09-253-0/+7
| | | | llvm-svn: 114788
OpenPOWER on IntegriCloud