summaryrefslogtreecommitdiffstats
path: root/llvm/lib/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert Chris' commits up to r149348 that started causing VMCoreTests unit ↵Argyrios Kyrtzidis2012-02-011-2/+1
| | | | | | | | | | | | | | | | | | | test to fail. These are: r149348 r149351 r149352 r149354 r149356 r149357 r149361 r149362 r149364 r149365 llvm-svn: 149470
* eliminate the "string" form of ConstantArray::get, usingChris Lattner2012-01-311-1/+2
| | | | | | ConstantDataArray::getString instead. llvm-svn: 149365
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-5/+3
| | | | llvm-svn: 148578
* Extend Attributes to 64 bitsKostya Serebryany2012-01-204-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: LLVM needs more function attributes than currently available (32 bits). One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc). Solution: - extend the Attributes from 32 bits to 64-bits - wrap the object into a class so that unsigned is never erroneously used instead - change "unsigned" to "Attributes" throughout the code, including one place in clang. - the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking. - the class has "safe operator bool()" to support the common idiom: if (Attributes attr = getAttrs()) useAttrs(attr); - The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls - Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work. - Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit. Tested: "make check" on Linux (32-bit and 64-bit) and Mac (10.6) built/run spec CPU 2006 on Linux with clang -O2. This change will break clang build in lib/CodeGen/CGCall.cpp. The following patch will fix it. llvm-svn: 148553
* Add 'llvm_unreachable' to passify GCC's understanding of the constraintsChandler Carruth2012-01-101-0/+1
| | | | | | | | of several newly un-defaulted switches. This also helps optimizers (including LLVM's) recognize that every case is covered, and we should assume as much. llvm-svn: 147861
* Remove unnecessary default cases in switches that cover all enum values.David Blaikie2012-01-101-1/+0
| | | | llvm-svn: 147855
* Removes unused field TheError from LLLexer.Manuel Klimek2011-12-211-1/+0
| | | | llvm-svn: 147049
* The powers that be have decided that LLVM IR should now support 16-bitDan Gohman2011-12-172-7/+11
| | | | | | | | "half precision" floating-point with a first-class type. This patch adds basic IR support (but not codegen support). llvm-svn: 146786
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* Push StringRefs through the metadata interface.Benjamin Kramer2011-12-061-1/+1
| | | | llvm-svn: 145934
* Add support for vectors of pointers.Nadav Rotem2011-12-051-9/+26
| | | | llvm-svn: 145801
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-291-5/+0
| | | | llvm-svn: 145420
* remove asmparsing and documentation support for "volatile load", which was ↵Chris Lattner2011-11-272-28/+8
| | | | | | only produced by LLVM 2.9 and earlier. LLVM 3.0 and later prefers "load volatile". llvm-svn: 145172
* remove autoupgrade support for really old-style debug info intrinsics.Chris Lattner2011-11-271-2/+0
| | | | | | | I think this is the last of autoupgrade that can be removed in 3.1. Can the atomic upgrade stuff also go? llvm-svn: 145169
* remove autoupgrade support for LLVM 2.9 exception stuff. Mainline supportsChris Lattner2011-11-271-3/+0
| | | | | | LLVM 3.0 and later. llvm-svn: 145165
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-031-0/+23
| | | | llvm-svn: 143634
* LLLexer: Factor hex char parsing.Benjamin Kramer2011-10-271-38/+16
| | | | llvm-svn: 143101
* Backing out patch. Will refactor to remove the AsmParser dependency on Target.Lang Hames2011-10-182-7/+0
| | | | llvm-svn: 142323
* Re-applying the target data layout verification patch from r142288, plus ↵Lang Hames2011-10-172-0/+7
| | | | | | | | appropriate CMake dependencies. Thanks to Raphael Espindola for tracking down the CMake issues. llvm-svn: 142306
* 142288 broke the build:Rafael Espindola2011-10-171-6/+0
| | | | | | | | | | | | Linking CXX executable ../../bin/llvm-as ../../lib/libLLVMAsmParser.a(LLParser.cpp.o):/home/espindola/llvm/llvm/lib/AsmParser/LLParser.cpp:function llvm::LLParser::ParseTargetDefinition(): error: undefined reference to 'llvm::TargetData::parseSpecifier(llvm::StringRef, llvm::TargetData*)' clang-3: error: linker command failed with exit code 1 (use -v to see invocation) Revert "Validate target data layout strings." This reverts commit 599d2d4c25d3aee63a21d9c67a88cd43bd971b7e. llvm-svn: 142296
* Validate target data layout strings.Lang Hames2011-10-171-0/+6
| | | | | | Invalid strings in asm files will result in parse errors. Invalid string literals passed to TargetData constructors will result in an assertion. llvm-svn: 142288
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-162-2/+2
| | | | | | | | note/warning/error as a string, pass it around as an enum. llvm-svn: 142107
* Remove last references to hotpatch.Rafael Espindola2011-10-042-2/+0
| | | | llvm-svn: 141057
* Add the returns_twice attribute to LLVM.Rafael Espindola2011-10-033-1/+3
| | | | llvm-svn: 141001
* Auto upgrade the old EH scheme to use the new one. This is on a trial basis. IfBill Wendling2011-08-271-0/+3
| | | | | | things to disasterously over night, this can be reverted. llvm-svn: 138702
* Remove unused variable.Duncan Sands2011-08-181-1/+0
| | | | llvm-svn: 137933
* Move "atomic" and "volatile" designations on instructions after the opcodeEli Friedman2011-08-122-38/+71
| | | | | | | | | | 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
* 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-124-0/+51
| | | | | | | | | | | | 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-092-11/+38
| | | | 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-314-1/+15
| | | | | | | | | 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-304-79/+4
| | | | | | | r136339, r136341, r136369, r136387, r136392, r136396, r136429, r136430, r136444, r136445, r136446, r136253 pending review. llvm-svn: 136556
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. llvm-svn: 136433
* LangRef and basic memory-representation/reading/writing for 'cmpxchg' andEli Friedman2011-07-284-1/+109
| | | | | | | | | | | | | | | | | | | | | '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-274-4/+77
| | | | | | This adds the new instructions 'landingpad' and 'resume'. llvm-svn: 136253
* Initial implementation of 'fence' instruction, the new C++0x-style ↵Eli Friedman2011-07-254-1/+62
| | | | | | | | 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
* Add APInt(numBits, ArrayRef<uint64_t> bigVal) constructor to prevent future ↵Jeffrey Yasskin2011-07-181-3/+3
| | | | | | | | | ambiguity errors like the one corrected by r135261. Migrate all LLVM callers of the old constructor to the new one. llvm-svn: 135431
* 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-182-32/+32
| | | | 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
OpenPOWER on IntegriCloud