summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser/LLParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Derive MDNode from MetadataBase instead of Constant. Emit MDNodes into ↵Devang Patel2009-07-231-12/+21
| | | | | | METADATA_BLOCK in bitcode file. llvm-svn: 76834
* Fix error message for correct opcode.Eric Christopher2009-07-231-1/+1
| | | | llvm-svn: 76829
* Rename the new unsigned and signed keywords to nuw and nsw,Dan Gohman2009-07-221-20/+20
| | | | | | which stand for no-unsigned-wrap and no-signed-wrap. llvm-svn: 76810
* Introduce MetadataBase, a base class for MDString and MDNode.Devang Patel2009-07-221-7/+28
| | | | | | | Derive MDString directly from MetadataBase. Introduce new bitcode block to hold metadata. llvm-svn: 76759
* Rename getConstantInt{True|False} to get{True|False} at Chris' behest.Owen Anderson2009-07-211-2/+2
| | | | llvm-svn: 76598
* Assembly and Bitcode support for unsigned/signed overflow flags andDan Gohman2009-07-201-0/+88
| | | | | | exact sdiv flags. llvm-svn: 76475
* Refactor metadata parsing routines into separate functions.Devang Patel2009-07-201-27/+44
| | | | llvm-svn: 76455
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-26/+31
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* Add support for naked functionsAnton Korobeynikov2009-07-171-0/+1
| | | | llvm-svn: 76198
* Revert yesterday's change by removing the LLVMContext parameter to ↵Owen Anderson2009-07-151-2/+2
| | | | | | AllocaInst and MallocInst. llvm-svn: 75863
* Move EVER MORE stuff over to LLVMContext.Owen Anderson2009-07-141-2/+2
| | | | llvm-svn: 75703
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-2/+2
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-2/+3
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* This started as a small change, I swear. Unfortunately, lots of things call ↵Owen Anderson2009-07-091-2/+2
| | | | | | the [I|F]CmpInst constructors. Who knew!? llvm-svn: 75200
* Fix thinko.Devang Patel2009-07-081-1/+1
| | | | llvm-svn: 75061
* Drop "constant" from Devang Patel2009-07-081-3/+1
| | | | | | !0 = constant metadata !{...} llvm-svn: 75057
* Support MDNode forward reference.Devang Patel2009-07-081-3/+32
| | | | llvm-svn: 75031
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-081-7/+6
| | | | | | module is required. llvm-svn: 75025
* Remove the vicmp and vfcmp instructions. Because we never had a release withNick Lewycky2009-07-081-32/+7
| | | | | | | these instructions, no autoupgrade or backwards compatibility support is provided. llvm-svn: 74991
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-081-3/+4
| | | | llvm-svn: 74985
* switch the .ll parser to use SourceMgr.Chris Lattner2009-07-021-4/+4
| | | | llvm-svn: 74735
* Use LLVMContext for generating MDStrings too.Owen Anderson2009-07-021-1/+1
| | | | llvm-svn: 74710
* Use LLVMContext to generate metadata constants.Owen Anderson2009-07-021-1/+1
| | | | llvm-svn: 74708
* Use LLVMContext for generating UndefValue constants too!Owen Anderson2009-07-021-7/+7
| | | | llvm-svn: 74703
* Try again at converting the LLParser to use LLVMContext, without massive ↵Owen Anderson2009-07-011-45/+51
| | | | | | breakage this time. llvm-svn: 74671
* --- Reverse-merging (from foreign repository) r74648 into '.':Bill Wendling2009-07-011-4/+3
| | | | | | | | | | | U include/llvm/LLVMContext.h U lib/VMCore/LLVMContext.cpp U lib/AsmParser/LLParser.cpp U lib/AsmParser/LLParser.h Temporarily reverting r74648. It was causing massive failures in release mode. llvm-svn: 74653
* Convert LLParser to use LLVMContext for creating constants.Owen Anderson2009-07-011-3/+4
| | | | llvm-svn: 74648
* Support stand alone metadata syntax.Devang Patel2009-07-011-0/+40
| | | | | | | !0 = constant metadata !{i32 21, i32 22} @llvm.blah = constant metadata !{i32 1000, i16 200, metadata !0} llvm-svn: 74630
* improve the APIs for creating struct and function types with no ↵Chris Lattner2009-07-011-1/+1
| | | | | | | | arguments/elements to not have to create a temporary vector (in the API at least). Patch by Jay Foad! llvm-svn: 74584
* Address review comments: add 3 ARM calling conventions.Anton Korobeynikov2009-06-161-1/+7
| | | | | | | Dispatch C calling conv. to one of these conventions based on target triple and subtarget features. llvm-svn: 73530
* Fix a typo in a diagnostic.Dan Gohman2009-06-151-1/+1
| | | | llvm-svn: 73429
* Fix old-style type names in comments.Dan Gohman2009-06-141-3/+3
| | | | llvm-svn: 73362
* Create FunctionType::isValidArgumentType to go along with isValidReturnType.Nick Lewycky2009-06-071-5/+11
| | | | | | | | | | | | | | | Also create isValidElementType for ArrayType, PointerType, StructType and VectorType. Make LLParser use them. This closes up some holes like an assertion failure on: %x = type {label} but largely doesn't change any semantics. The only thing we accept now which we didn't before is vectors of opaque type such as "<4 x opaque>". The opaque can be resolved to an int or float when linking. llvm-svn: 73016
* Refuse metadata* type for function arguments.Nick Lewycky2009-06-071-1/+3
| | | | llvm-svn: 73010
* Add new function attribute - noimplicitfloatDevang Patel2009-06-051-19/+20
| | | | | | | Update code generator to use this attribute and remove NoImplicitFloat target option. Update llc to set this attribute when -no-implicit-float command line option is used. llvm-svn: 72959
* Split the Add, Sub, and Mul instruction opcodes into separateDan Gohman2009-06-041-2/+10
| | | | | | | | | | | | | | | integer and floating-point opcodes, introducing FAdd, FSub, and FMul. For now, the AsmParser, BitcodeReader, and IRBuilder all preserve backwards compatability, and the Core LLVM APIs preserve backwards compatibility for IR producers. Most front-ends won't need to change immediately. This implements the first step of the plan outlined here: http://nondot.org/sabre/LLVMNotes/IntegerOverflow.txt llvm-svn: 72897
* Add new function attribute - noredzone. Devang Patel2009-06-041-1/+1
| | | | | | | Update code generator to use this attribute and remove DisableRedZone target option. Update llc to set this attribute when -disable-red-zone command line option is used. llvm-svn: 72894
* Use v.data() instead of &v[0] when SmallVector v might be empty.Jay Foad2009-05-211-9/+9
| | | | llvm-svn: 72210
* Make MDNode use CallbackVH. Also change MDNode to store Value* instead ofNick Lewycky2009-05-101-9/+17
| | | | | | | Constant* in preperation of a future change to support holding non-Constants in an MDNode. llvm-svn: 71407
* testcase and asmparser fix for PR4066Chris Lattner2009-04-251-2/+5
| | | | llvm-svn: 70080
* Fix warning in .ll parser, detect and reject available_externally on functionNick Lewycky2009-04-131-0/+1
| | | | | | declarations. llvm-svn: 68944
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-0/+3
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Add support for embedded metadata to LLVM. This introduces two new types ofNick Lewycky2009-04-041-1/+42
| | | | | | | | Constant, MDString and MDNode which can only be used by globals with a name that starts with "llvm." or as arguments to a function with the same naming restriction. llvm-svn: 68420
* Fix a bug in our autoupgrade support: in an argument list to a functionChris Lattner2009-03-251-4/+8
| | | | | | | | | | | | call, we should treat "i64 zext" as the start of a constant expr, but "i64 0 zext" as an argument with an obsolete attribute on it (this form is already tested by test/Assembler/2007-07-30-AutoUpgradeZextSext.ll). Make the autoupgrade logic more discerning to avoid treating "i64 zext" as an old-style attribute, causing us to reject a valid constant expr. This fixes PR3876. llvm-svn: 67682
* It makes no sense to have a ODR version of commonDuncan Sands2009-03-111-6/+2
| | | | | | linkage, so remove it. llvm-svn: 66690
* Remove the one-definition-rule version of extern_weakDuncan Sands2009-03-111-13/+7
| | | | | | | linkage: this linkage type only applies to declarations, but ODR is only relevant to globals with definitions. llvm-svn: 66650
* Fix two classes of bugs. First:Chris Lattner2009-03-091-15/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | validate an invariant so that the asmparser rejects a bad construct instead of the verifier. Before: llvm-as: assembly parsed, but does not verify as correct! Invalid struct return type! i64 (%struct.Type*, %struct.Type*)* @foo after: llvm-as: t.ll:5:8: functions with 'sret' argument must return void define i64 @foo(%struct.Type* noalias nocapture sret %agg.result, %struct.Type* nocapture byval %t) nounwind { ^ Second, check that void is only used where allowed (in function return types) not in arbitrary places, fixing PR3747 - Crash in llvm-as with void field in struct. We now reject that example with: $ llvm-as t.ll llvm-as: t.ll:1:12: struct element can not have void type %x = type {void} ^ llvm-svn: 66394
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-21/+40
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Fix a pretty awesome bug that only happened in a strange case with anonymousChris Lattner2009-03-011-8/+11
| | | | | | types. This was reading the uint for the keyword after the token was advanced. llvm-svn: 65743
* reject 0 element vectors with:Chris Lattner2009-02-281-0/+2
| | | | | | | | | @a = internal constant void bitcast(<0 x i8> <> to void) ^ Fixes PR3685 llvm-svn: 65698
OpenPOWER on IntegriCloud