summaryrefslogtreecommitdiff
path: root/lib/AsmParser
Commit message (Collapse)AuthorAge
...
* Add a new function attribute, nonlazybind, which inhibits lazy-loadingJohn McCall2011-06-15
| | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133080 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the .ll parser to handle named metadata with non-simple names.Nick Lewycky2011-06-15
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133050 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor parsing of variable names (ie., %foo and @foo) since they have the sameNick Lewycky2011-06-04
| | | | | | | | rules. Also refactor "read string until quote" into its own function. No functionality change! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132645 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace the -unwind-tables option with a per function flag. This is moreRafael Espindola2011-05-25
| | | | | | | LTO friendly as we can now correctly merge files compiled with or without -fasynchronous-unwind-tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132033 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused variables caught by GCC's -Wunused-but-set-variable.Benjamin Kramer2011-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130755 91177308-0d34-0410-b5e6-96231b3b80d8
* PR9214: Convert Metadata API to use ArrayRef.Jay Foad2011-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129932 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r129235 pending a vetting of the EH rewrite.Bill Wendling2011-04-10
| | | | | | | | | | | | | | | | | | --- 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129259 91177308-0d34-0410-b5e6-96231b3b80d8
* Beginning of the Great Exception Handling Rewrite.Bill Wendling2011-04-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.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129235 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove PHINode::reserveOperandSpace(). Instead, add a parameter toJay Foad2011-03-30
| | | | | | PHINode::Create() giving the (known or expected) number of operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128537 91177308-0d34-0410-b5e6-96231b3b80d8
* Use X86_thiscall calling convention for Win64 as well.Tilmann Scheller2011-03-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126934 91177308-0d34-0410-b5e6-96231b3b80d8
* Add Win64 thiscall calling convention.Tilmann Scheller2011-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126862 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a special streamer to libLTO that just records symbols definitions andRafael Espindola2011-03-02
| | | | | | | | | | | 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 :-) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126830 91177308-0d34-0410-b5e6-96231b3b80d8
* convert ConstantVector::get to use ArrayRef.Chris Lattner2011-02-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125537 91177308-0d34-0410-b5e6-96231b3b80d8
* revert my ConstantVector patch, it seems to have made the llvm-gccChris Lattner2011-02-14
| | | | | | | builders unhappy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125504 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch ConstantVector::get to use ArrayRef instead of a pointer+sizeChris Lattner2011-02-14
| | | | | | | idiom. Change various clients to simplify their code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125487 91177308-0d34-0410-b5e6-96231b3b80d8
* implement .ll and .bc support for nsw/nuw on shl and exact on lshr/ashr.Chris Lattner2011-02-07
| | | | | | | Factor some code better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125006 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance vmcore to know that udiv's can be exact, and add a trivialChris Lattner2011-02-06
| | | | | | | | | | instcombine xform to exercise this. Nothing forms exact udivs yet though. This is progress on PR8862 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124992 91177308-0d34-0410-b5e6-96231b3b80d8
* Move unnamed_addr after the function arguments on Sabre's request.Rafael Espindola2011-01-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124209 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123529 91177308-0d34-0410-b5e6-96231b3b80d8
* Reject uses of unnamed_addr in declarations.Rafael Espindola2011-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123358 91177308-0d34-0410-b5e6-96231b3b80d8
* First step in fixing PR8927:Rafael Espindola2011-01-08
| | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123063 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing standard headers. Patch by Joerg Sonnenberger!Nick Lewycky2010-12-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122193 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing std:: prefixes to some calls. C++ doesn't require that <cfoo>Nick Lewycky2010-12-19
| | | | | | | | headers provide symbols outside namespace std and the LLVM coding standards state that we should prefix all of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122192 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-16
| | | | | | via an out parm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-09
| | | | | | error_code &ec. And fix clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
* PR5207: Change APInt methods trunc(), sext(), zext(), sextOrTrunc() andJay Foad2010-12-07
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121120 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new 'hotpatch' attribute. This attribute will insert a two-byte no-opCharles Davis2010-10-25
| | | | | | | | instruction at the beginning of each function that has the attribute, allowing the function to be easily hooked and/or patched. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117264 91177308-0d34-0410-b5e6-96231b3b80d8
* AlignLoc is never used for anything - zap it (gcc-4.6 warning).Duncan Sands2010-10-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117025 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate some calls to Value::getNameStr.Benjamin Kramer2010-10-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116670 91177308-0d34-0410-b5e6-96231b3b80d8
* Pacify a noisy compiler, and sink this variable declaration closer to its uses.Nick Lewycky2010-09-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115206 91177308-0d34-0410-b5e6-96231b3b80d8
* Silence compiler warning.Nick Lewycky2010-09-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115107 91177308-0d34-0410-b5e6-96231b3b80d8
* Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer2010-09-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114847 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ret instruction to PTX backendChe-Liang Chiou2010-09-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114788 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-13
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
* Add X86 MMX type to bitcode and Type.Dale Johannesen2010-09-10
| | | | | | | | | (The Ada bindings probably need it too, but all the obvious places to change say "do not edit this file".) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113618 91177308-0d34-0410-b5e6-96231b3b80d8
* remove unions from LLVM IR. They are severely buggy and notChris Lattner2010-08-28
| | | | | | | being actively maintained, improved, or extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment explaining why this code doesn't just callDan Gohman2010-08-24
| | | | | | | ParseMetadataValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111914 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment explaining why this code is more complex than itDan Gohman2010-08-24
| | | | | | | initially seems it should require. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111913 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend function-local metadata to be usable as attachments.Dan Gohman2010-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111895 91177308-0d34-0410-b5e6-96231b3b80d8
* Give ParseInstructionMetadata access to the PerFunctionState object.Dan Gohman2010-08-24
| | | | | | | | This is in preparation for generalizing its parsing of function-local values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111893 91177308-0d34-0410-b5e6-96231b3b80d8
* Create the new linker type "linker_private_weak_def_auto".Bill Wendling2010-08-20
| | | | | | | | | | | | | It's similar to "linker_private_weak", but it's known that the address of the object is not taken. For instance, functions that had an inline definition, but the compiler decided not to inline it. Note, unlike linker_private and linker_private_weak, linker_private_weak_def_auto may have only default visibility. The symbols are removed by the linker from the final linked image (executable or dynamic library). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111684 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce a new temporary MDNode concept. Temporary MDNodes areDan Gohman2010-08-20
| | | | | | | | | not part of the IR, are not uniqued, and may be safely RAUW'd. This replaces a variety of alternate mechanisms for achieving the same effect. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111681 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't print the filename twice in file-not-found errors.Dan Gohman2010-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110179 91177308-0d34-0410-b5e6-96231b3b80d8
* Move MaximumAlignment to be a member of the Value class.Dan Gohman2010-07-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109891 91177308-0d34-0410-b5e6-96231b3b80d8
* Define a maximum supported alignment value for load, store, andDan Gohman2010-07-28
| | | | | | | | | | alloca instructions (constrained by their internal encoding), and add error checking for it. Fix an instcombine bug which generated huge alignment values (null is infinitely aligned). This fixes undefined behavior noticed by John Regehr. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109643 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r109361; it's impossible to write a call with an argument with anEli Friedman2010-07-24
| | | | | | | | invalid type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109365 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor simplification.Eli Friedman2010-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109362 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the ll parser check that arguments have valid types.Eli Friedman2010-07-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109361 91177308-0d34-0410-b5e6-96231b3b80d8
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-21
| | | | | | | for creating and populating NamedMDNodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109061 91177308-0d34-0410-b5e6-96231b3b80d8