summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add checks for the landingpad instruction's clause values to make sure thatBill Wendling2011-08-121-0/+10
| | | | | | they're the correct type. llvm-svn: 137511
* Initial commit of the 'landingpad' instruction.Bill Wendling2011-08-121-0/+42
| | | | | | | | | | | | 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 use the new api for structtypes.Chris Lattner2011-08-121-4/+4
| | | | llvm-svn: 137480
* Representation of 'atomic load' and 'atomic store' in IR.Eli Friedman2011-08-091-9/+34
| | | | llvm-svn: 137170
* Remove unused variables.Benjamin Kramer2011-08-031-1/+0
| | | | llvm-svn: 136803
* Add the 'resume' instruction for the new EH rewrite.Bill Wendling2011-07-311-0/+12
| | | | | | | | | 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-65/+0
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
* LangRef and basic memory-representation/reading/writing for 'cmpxchg' andEli Friedman2011-07-281-0/+97
| | | | | | | | | | | | | | | | | | | | | 'atomicrmw' instructions, which allow representing all the current atomic rmw intrinsics. The allowed operands for these instructions are heavily restricted at the moment; we can probably loosen it a bit, but supporting general first-class types (where it makes sense) might get a bit complicated, given how SelectionDAG works. As an initial cut, these operations do not support specifying an alignment, but it would be possible to add if we think it's useful. Specifying an alignment lower than the natural alignment would be essentially impossible to support on anything other than x86, but specifying a greater alignment would be possible. I can't think of any useful optimizations which would use that information, but maybe someone else has ideas. Optimizer/codegen support coming soon. llvm-svn: 136404
* The personality function should be a Function* and not just a Value*.Bill Wendling2011-07-281-1/+2
| | | | llvm-svn: 136392
* Make sure that the landingpad instruction takes a Constant* as the clause's ↵Bill Wendling2011-07-281-3/+4
| | | | | | value. llvm-svn: 136326
* Merge the contents from exception-handling-rewrite to the mainline.Bill Wendling2011-07-271-0/+63
| | | | | | This adds the new instructions 'landingpad' and 'resume'. llvm-svn: 136253
* Initial implementation of 'fence' instruction, the new C++0x-style ↵Eli Friedman2011-07-251-0/+44
| | | | | | | | replacement for llvm.memory.barrier. This is just a LangRef entry and reading/writing/memory representation; optimizer+codegen support coming soon. llvm-svn: 136009
* Convert GetElementPtrInst to use ArrayRef.Jay Foad2011-07-251-6/+3
| | | | llvm-svn: 135904
* Make better use of ConstantExpr::getGetElementPtr's InBounds parameter.Jay Foad2011-07-211-3/+2
| | | | llvm-svn: 135676
* Convert ConstantExpr::getGetElementPtr andJay Foad2011-07-211-5/+3
| | | | | | ConstantExpr::getInBoundsGetElementPtr to use ArrayRef. llvm-svn: 135673
* Migrate LLVM and Clang to use the new makeArrayRef(...) functions where ↵Frits van Bommel2011-07-181-2/+2
| | | | | | | | previously explicit non-default constructors were used. Mostly mechanical with some manual reformatting. llvm-svn: 135390
* land David Blaikie's patch to de-constify Type, with a few tweaks.Chris Lattner2011-07-181-23/+23
| | | | llvm-svn: 135375
* Convert CallInst and InvokeInst APIs to use ArrayRef.Jay Foad2011-07-151-3/+2
| | | | llvm-svn: 135265
* Convert InsertValueInst and ExtractValueInst APIs to use ArrayRef.Jay Foad2011-07-131-14/+8
| | | | llvm-svn: 135040
* Second attempt at de-constifying LLVM Types in FunctionType::get(),Jay Foad2011-07-121-4/+4
| | | | | | StructType::get() and TargetData::getIntPtrType(). llvm-svn: 134982
* Revert r134893 and r134888 (and related patches in other trees). It was causingBill Wendling2011-07-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an assert on Darwin llvm-gcc builds. Assertion failed: (castIsValid(op, S, Ty) && "Invalid cast!"), function Create, file /Users/buildslave/zorg/buildbot/smooshlab/slave-0.8/build.llvm-gcc-i386-darwin9-RA/llvm.src/lib/VMCore/Instructions.cpp, li\ ne 2067. etc. http://smooshlab.apple.com:8013/builders/llvm-gcc-i386-darwin9-RA/builds/2354 --- Reverse-merging r134893 into '.': U include/llvm/Target/TargetData.h U include/llvm/DerivedTypes.h U tools/bugpoint/ExtractFunction.cpp U unittests/Support/TypeBuilderTest.cpp U lib/Target/ARM/ARMGlobalMerge.cpp U lib/Target/TargetData.cpp U lib/VMCore/Constants.cpp U lib/VMCore/Type.cpp U lib/VMCore/Core.cpp U lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Instrumentation/ProfilingUtils.cpp U lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/CodeGen/SjLjEHPrepare.cpp --- Reverse-merging r134888 into '.': G include/llvm/DerivedTypes.h U include/llvm/Support/TypeBuilder.h U include/llvm/Intrinsics.h U unittests/Analysis/ScalarEvolutionTest.cpp U unittests/ExecutionEngine/JIT/JITTest.cpp U unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp U unittests/VMCore/PassManagerTest.cpp G unittests/Support/TypeBuilderTest.cpp U lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp U lib/Target/Blackfin/BlackfinIntrinsicInfo.cpp U lib/VMCore/IRBuilder.cpp G lib/VMCore/Type.cpp U lib/VMCore/Function.cpp G lib/VMCore/Core.cpp U lib/VMCore/Module.cpp U lib/AsmParser/LLParser.cpp U lib/Transforms/Utils/CloneFunction.cpp G lib/Transforms/Utils/CodeExtractor.cpp U lib/Transforms/Utils/InlineFunction.cpp U lib/Transforms/Instrumentation/GCOVProfiling.cpp U lib/Transforms/Scalar/ObjCARC.cpp U lib/Transforms/Scalar/SimplifyLibCalls.cpp U lib/Transforms/Scalar/MemCpyOptimizer.cpp G lib/Transforms/IPO/DeadArgumentElimination.cpp U lib/Transforms/IPO/ArgumentPromotion.cpp U lib/Transforms/InstCombine/InstCombineCompares.cpp U lib/Transforms/InstCombine/InstCombineAndOrXor.cpp U lib/Transforms/InstCombine/InstCombineCalls.cpp U lib/CodeGen/DwarfEHPrepare.cpp U lib/CodeGen/IntrinsicLowering.cpp U lib/Bitcode/Reader/BitcodeReader.cpp llvm-svn: 134949
* 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-091-313/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-20/+0
| | | | | | subsumed by extractvalue. llvm-svn: 133247
* remove parser support for the obsolete "multiple return values" syntax, whichChris Lattner2011-06-171-34/+2
| | | | | | 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-171-4/+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-171-100/+11
| | | | | | | | | | | 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-151-0/+1
| | | | | | | | | | | | | | | | 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
* Replace the -unwind-tables option with a per function flag. This is moreRafael Espindola2011-05-251-0/+1
| | | | | | | 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-101-5/+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-101-0/+5
| | | | | | | | | | | | | * 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-031-2/+0
| | | | llvm-svn: 126934
* Add Win64 thiscall calling convention.Tilmann Scheller2011-03-021-0/+2
| | | | 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
OpenPOWER on IntegriCloud