summaryrefslogtreecommitdiff
path: root/lib/AsmParser
Commit message (Collapse)AuthorAge
* Merging r196158:Manman Ren2013-12-09
| | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------------ r196158 | mren | 2013-12-02 13:29:56 -0800 (Mon, 02 Dec 2013) | 12 lines Debug Info: drop debug info via upgrading path if version number does not match. Add a helper function getDebugInfoVersionFromModule to return the debug info version number for a module. "Verifier/module-flags-1.ll" checks for verification errors. It will seg fault when calling getDebugInfoVersionFromModule because of the incorrect format for module flags in the testing case. We make getModuleFlagsMetadata more robust by checking for error conditions. PR17982 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_34@196822 91177308-0d34-0410-b5e6-96231b3b80d8
* Add addrspacecast instruction.Matt Arsenault2013-11-15
| | | | | | Patch by Michele Scandale! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194760 91177308-0d34-0410-b5e6-96231b3b80d8
* [Stackmap] Add AnyReg calling convention support for patchpoint intrinsic.Juergen Ributzka2013-11-08
| | | | | | | | | | | | | | The idea of the AnyReg Calling Convention is to provide the call arguments in registers, but not to force them to be placed in a paticular order into a specified set of registers. Instead it is up tp the register allocator to assign any register as it sees fit. The same applies to the return value (if applicable). Differential Revision: http://llvm-reviews.chandlerc.com/D2009 Reviewed by Andy git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194293 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove linkonce_odr_auto_hide.Rafael Espindola2013-11-01
| | | | | | | | | | | | | | | linkonce_odr_auto_hide was in incomplete attempt to implement a way for the linker to hide symbols that are known to be available in every TU and whose addresses are not relevant for a particular DSO. It was redundant in that it all its uses are equivalent to linkonce_odr+unnamed_addr. Unlike those, it has never been connected to clang or llvm's optimizers, so it was effectively dead. Given that nothing produces it, this patch just nukes it (other than the llvm-c enum value). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193865 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new calling convention for WebKit Java Script.Andrew Trick2013-10-31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193812 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r193251 : Use address-taken to disambiguate global variable and ↵Shuxin Yang2013-10-27
| | | | | | indirect memops. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193489 91177308-0d34-0410-b5e6-96231b3b80d8
* Use address-taken to disambiguate global variable and indirect memops.Shuxin Yang2013-10-23
| | | | | | | | | | | Major steps include: 1). introduces a not-addr-taken bit-field in GlobalVariable 2). GlobalOpt pass sets "not-address-taken" if it proves a global varirable dosen't have its address taken. 3). AA use this info for disambiguation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193251 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a GlobalAlias::isValidLinkage to reduce code duplication.Rafael Espindola2013-10-09
| | | | | | Thanks to Reid Kleckner for the suggestion. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192298 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for aliases with linkonce_odr.Rafael Espindola2013-10-06
| | | | | | This will be used to extend constructor aliases in clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192066 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove several unused variables.Rafael Espindola2013-10-01
| | | | | | Patch by Alp Toker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191757 91177308-0d34-0410-b5e6-96231b3b80d8
* AutoUpgrade: upgrade from scalar TBAA format to struct-path aware TBAA format.Manman Ren2013-09-28
| | | | | | | | We treat TBAA tags as struct-path aware TBAA format when the first operand is a MDNode and the tag has 3 or more operands. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191593 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement function prefix data as an IR feature.Peter Collingbourne2013-09-16
| | | | | | | | | Previous discussion: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/063909.html Differential Revision: http://llvm-reviews.chandlerc.com/D1191 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190773 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Give internal classes hidden visibility."Benjamin Kramer2013-09-11
| | | | | | | It works with clang, but GCC has different rules so we can't make all of those hidden. This reverts commit r190534. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190536 91177308-0d34-0410-b5e6-96231b3b80d8
* Give internal classes hidden visibility.Benjamin Kramer2013-09-11
| | | | | | Worth 100k on a linux/x86_64 Release+Asserts clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190534 91177308-0d34-0410-b5e6-96231b3b80d8
* Add function attribute 'optnone'.Andrea Di Biagio2013-08-23
| | | | | | | | | | This function attribute indicates that the function is not optimized by any optimization or code generator passes with the exception of interprocedural optimization passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189101 91177308-0d34-0410-b5e6-96231b3b80d8
* Target/X86: Add explicit Win64 and System V/x86-64 calling conventions.Charles Davis2013-07-12
| | | | | | | | | | | | | | | Summary: This patch adds explicit calling convention types for the Win64 and System V/x86-64 ABIs. This allows code to override the default, and use the Win64 convention on a target that wants to use SysV (and vice-versa). This is needed to implement the `ms_abi` and `sysv_abi` GNU attributes. Reviewers: CC: git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186144 91177308-0d34-0410-b5e6-96231b3b80d8
* Extend 'readonly' and 'readnone' to work on function arguments as well asNick Lewycky2013-07-06
| | | | | | | | functions. Make the function attributes pass add it to known library functions and when it can deduce it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185735 91177308-0d34-0410-b5e6-96231b3b80d8
* Added support for the Builtin attribute.Michael Gottesman2013-06-27
| | | | | | | | The Builtin attribute is an attribute that can be placed on function call site that signal that even though a function is declared as being a builtin, rdar://problem/13727199 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185049 91177308-0d34-0410-b5e6-96231b3b80d8
* keep only the StringRef version of getFileOrSTDIN.Rafael Espindola2013-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184826 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new function attribute 'cold' to functions.Diego Novillo2013-05-24
| | | | | | | | | | | Other than recognizing the attribute, the patch does little else. It changes the branch probability analyzer so that edges into blocks postdominated by a cold function are given low weight. Added analysis and code generation tests. Added documentation for the new attribute. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182638 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ArrayRef constructor from None, and do the cleanups that this ↵Dmitri Gribenko2013-05-05
| | | | | | | | | constructor enables Patch by Robert Wilhelm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181138 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix for PR 14965: Better error message for GEP with partially defined contentsEli Bendersky2013-04-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180030 91177308-0d34-0410-b5e6-96231b3b80d8
* Move 'kw_align' case to proper section, reorganize function attribute ↵Stephen Lin2013-04-20
| | | | | | keyword case statements to be consistent with r179119 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179948 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CodeGen support for functions that always return arguments via a new ↵Stephen Lin2013-04-20
| | | | | | parameter attribute 'returned', which is taken advantage of in target-independent tail call opportunity detection and in ARM call lowering (when placed on an integral first parameter). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179925 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment. Patch by Stephen Lin.Bill Wendling2013-04-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179780 91177308-0d34-0410-b5e6-96231b3b80d8
* Rationalize the formatting of these case labels. Having two sortedChandler Carruth2013-04-09
| | | | | | columns is essentially impossible to edit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179119 91177308-0d34-0410-b5e6-96231b3b80d8
* Unify clang/llvm attributes for asan/tsan/msan (LLVM part)Kostya Serebryany2013-02-26
| | | | | | | | | | | | | | | | | | | | These are two related changes (one in llvm, one in clang). LLVM: - rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode) - rename thread_safety => sanitize_thread - rename no_uninitialized_checks -> sanitize_memory CLANG: - add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis)) - add __attribute__((no_sanitize_thread)) - add __attribute__((no_sanitize_memory)) for S in address thread memory If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not set llvm attribute sanitize_S git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176075 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the NoBuiltin attribute.Bill Wendling2013-02-22
| | | | | | | | | The 'nobuiltin' attribute is applied to call sites to indicate that LLVM should not treat the callee function as a built-in function. I.e., it shouldn't try to replace that function with different code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175835 91177308-0d34-0410-b5e6-96231b3b80d8
* Update comment.Chad Rosier2013-02-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175209 91177308-0d34-0410-b5e6-96231b3b80d8
* Add static cast to unsigned char whenever a character classification ↵Guy Benyei2013-02-12
| | | | | | function is called with a signed char argument, in order to avoid assertions in Windows Debug configuration. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175006 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge the collected attributes into the call instruction's attributes.Bill Wendling2013-02-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174955 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan/msan] adding thread_safety and uninitialized_checks attributesKostya Serebryany2013-02-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174864 91177308-0d34-0410-b5e6-96231b3b80d8
* Eat the alignment keyword if we're in an attribute group.Bill Wendling2013-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174846 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a 'continue' here to stop from double lexing.Bill Wendling2013-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174833 91177308-0d34-0410-b5e6-96231b3b80d8
* TEMPORARY SYNTAX CHANGE!Bill Wendling2013-02-09
| | | | | | | | | | | | | | | | | | | The original syntax for the attribute groups was ambiguous. For example: declare void @foo() #1 #0 = attributes { noinline } The '#0' would be parsed as an attribute reference for '@foo' and not as a top-level entity. In order to continue forward while waiting for a decision on what the correct syntax is, I'm changing it to this instead: declare void @foo() #1 attributes #0 = { noinline } Repeat: This is TEMPORARY until we decide what the correct syntax should be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174813 91177308-0d34-0410-b5e6-96231b3b80d8
* Parse the attribute group reference on a function.Bill Wendling2013-02-08
| | | | | | | | | | | | Attribute references are of this form: define void @foo() #0 #1 #2 { ... } Parse them for function attributes. If there's more than one reference, then they are merged together. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174697 91177308-0d34-0410-b5e6-96231b3b80d8
* Use ParseFnAttributeValuePairs instead of ParseOptionalFuncAttrs Bill Wendling2013-02-08
| | | | | | | | The functionality of ParseOptionalFuncAttrs was there in ParseFnAttributeValuePairs. So just use that instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174686 91177308-0d34-0410-b5e6-96231b3b80d8
* Initial submission for the attribute group feature.Bill Wendling2013-02-06
| | | | | | | | | | | | | | | | | | Attribute groups are of the form: #0 = attributes { noinline "no-sse" "cpu"="cortex-a8" alignstack=4 } Target-dependent attributes are represented as strings. Attributes can have optional values associated with them. E.g., the "cpu" attribute has the value "cortex-a8". Target-independent attributes are listed as enums inside the attribute classes. Multiple attribute groups can be referenced by the same object. In that case, the attributes are merged together. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174493 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the do-while(0) thing for this #define.Bill Wendling2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174347 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM Asm/Bitcode Reader/Writer support for new IR keyword ↵Michael Gottesman2013-02-05
| | | | | | externally_initialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174340 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure that the Attribute object represents one attribute only.Bill Wendling2013-01-31
| | | | | | | | Several places were still treating the Attribute object as respresenting multiple attributes. Those places now use the AttributeSet to represent multiple attributes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174003 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the AttributeSet instead of AttributeWithIndex.Bill Wendling2013-01-27
| | | | | | | | In the future, AttributeWithIndex won't be used anymore. Besides, it exposes the internals of the AttributeSet to outside users, which isn't goodness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173603 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the IR attribute 'sspstrong'.Bill Wendling2013-01-23
| | | | | | | | | | | | | | | | | | | | | | SSPStrong applies a heuristic to insert stack protectors in these situations: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) This patch implements the SSPString attribute to be equivalent to SSPRequired. This will change in a subsequent patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173230 91177308-0d34-0410-b5e6-96231b3b80d8
* Make APFloat constructor require explicit semantics.Tim Northover2013-01-22
| | | | | | | | | Previously we tried to infer it from the bit width size, with an added IsIEEE argument for the PPC/IEEE 128-bit case, which had a default value. This default value allowed bugs to creep in, where it was inappropriate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173138 91177308-0d34-0410-b5e6-96231b3b80d8
* Use hexDigitValue in LLLexer.Jordan Rose2013-01-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172866 91177308-0d34-0410-b5e6-96231b3b80d8
* There was a switch fall-through in the parser for textual LLVM that causedDavid Tweed2013-01-07
| | | | | | | | | bogus comparison operands to default to eq/oeq. Fix that, fix a couple of tests that accidentally passed and test for bogus comparison opeartors explicitly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171733 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-02
| | | | | | | | | | | | | | | | | | | | | into their new header subdirectory: include/llvm/IR. This matches the directory structure of lib, and begins to correct a long standing point of file layout clutter in LLVM. There are still more header files to move here, but I wanted to handle them in separate commits to make tracking what files make sense at each layer easier. The only really questionable files here are the target intrinsic tablegen files. But that's a battle I'd rather not fight today. I've updated both CMake and Makefile build systems (I think, and my tests think, but I may have missed something). I've also re-sorted the includes throughout the project. I'll be committing updates to Clang, DragonEgg, and Polly momentarily. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171366 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the predicate methods off of AttributeSet instead of Attribute.Bill Wendling2012-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171257 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a new attribute, 'noduplicate'. If a function contains a noduplicate ↵James Molloy2012-12-20
| | | | | | | | | | call, the call cannot be duplicated - Jump threading, loop unrolling, loop unswitching, and loop rotation are inhibited if they would duplicate the call. Similarly inlining of the function is inhibited, if that would duplicate the call (in particular inlining is still allowed when there is only one callsite and the function has internal linkage). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170704 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-19
| | | | | | single attribute in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170502 91177308-0d34-0410-b5e6-96231b3b80d8