summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Verifier.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Extend 'readonly' and 'readnone' to work on function arguments as well asNick Lewycky2013-07-061-8/+13
| | | | | | | functions. Make the function attributes pass add it to known library functions and when it can deduce it. llvm-svn: 185735
* IRVerifier: Correctly check attribute typesTobias Grosser2013-07-021-1/+2
| | | | | | | | | | | Add missing parenthesis such that all and not only the very first attribute is checked. Testing this piece of code is not possible with an LLVM-IR test file, as the LLVM-IR parser has a similar check such that the wrong IR does not even arrive at the verifier. llvm-svn: 185408
* Added support for the Builtin attribute.Michael Gottesman2013-06-271-0/+16
| | | | | | | | 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 llvm-svn: 185049
* [APFloat] Converted all references to APFloat::isNormal => ↵Michael Gottesman2013-06-191-1/+1
| | | | | | | | APFloat::isFiniteNonZero. Turns out all the references were in llvm and not in clang. llvm-svn: 184356
* We want a string representation of the attribute, not the kind as a string.Bill Wendling2013-06-181-2/+2
| | | | llvm-svn: 184239
* Require members of llvm.used to be named.Rafael Espindola2013-06-111-0/+1
| | | | | | | | The effect of llvm.used is to introduce an invisible reference, so this seems a reasonable restriction. It will be used to provide an easy ordering of the entries in llvm.used. llvm-svn: 183743
* Make it explicit that GlobalAlias are ok in llvm.used.Rafael Espindola2013-05-271-5/+4
| | | | | | No functionality change. llvm-svn: 182747
* Add a new function attribute 'cold' to functions.Diego Novillo2013-05-241-1/+2
| | | | | | | | | | | 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. llvm-svn: 182638
* Add some constraints to use of 'returned':Stephen Lin2013-04-231-0/+4
| | | | | | | | | 1) Disallow 'returned' on parameter that is also 'sret' (no sensible semantics, as far as I can tell). 2) Conservatively disallow tail calls through 'returned' parameters that also are 'zext' or 'sext' (for consistency with treatment of other zero-extending and sign-extending operations in tail call position detection...can be revised later to handle situations that can be determined to be safe). This is a new attribute that is not yet used, so there is no impact. llvm-svn: 180118
* Also verify llvm.compiler_used.Rafael Espindola2013-04-221-1/+2
| | | | llvm-svn: 180020
* Clarify that llvm.used can contain aliases.Rafael Espindola2013-04-221-0/+23
| | | | | | | Also add a check for llvm.used in the verifier and simplify clients now that they can assume they have a ConstantArray. llvm-svn: 180019
* Add CodeGen support for functions that always return arguments via a new ↵Stephen Lin2013-04-201-6/+45
| | | | | | 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). llvm-svn: 179925
* This patch addresses two cleanup issues:Bill Wendling2013-04-181-81/+71
| | | | | | | | | | | | | | | | 1. Verify::VerifyParameterAttrs in "lib/IR/Verifier.cpp" and AttrBuilder::removeFunctionOnlyAttrs in "lib/IR/Attributes.cpp" (only called by Verify::VerifyFunctionAttrs) separately maintained a list of function-only attribute types. I've consolidated the logic into a new function used for both cases in "lib/IR/Verifier.cpp", so this logic is in one place (other than the AsmParser front-end) 2. Various functions in "lib/IR/Verifier.cpp" passed AttributeSet around by reference needlessly, as it's just a handle to an immutable pimpl body. Patch by Stephen Lin! llvm-svn: 179790
* Unify clang/llvm attributes for asan/tsan/msan (LLVM part)Kostya Serebryany2013-02-261-3/+3
| | | | | | | | | | | | | | | | | | | 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 llvm-svn: 176075
* Implement the NoBuiltin attribute.Bill Wendling2013-02-221-1/+2
| | | | | | | | 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. llvm-svn: 175835
* [tsan/msan] adding thread_safety and uninitialized_checks attributesKostya Serebryany2013-02-111-0/+2
| | | | llvm-svn: 174864
* Add 'empty' query methods to the builder and use them in the verifier.Bill Wendling2013-02-101-1/+1
| | | | llvm-svn: 174832
* Make the AttrBuilder creation method of Attribute private so that people ↵Bill Wendling2013-01-311-1/+3
| | | | | | won't use it. llvm-svn: 174023
* Revert for now:Bill Wendling2013-01-311-3/+1
| | | | | | | | | --- Reverse-merging r174010 into '.': U include/llvm/IR/Attributes.h U lib/IR/Verifier.cpp U lib/IR/Attributes.cpp llvm-svn: 174012
* Remove the AttrBuilder version of the Attribute::get function.Bill Wendling2013-01-311-1/+3
| | | | | | | | The AttrBuilder is there to build up multiple attributes. The Attribute class represents only one attribute at a time. So remove this unnecessary builder creator method. llvm-svn: 174010
* Convert typeIncompatible to return an AttributeSet.Bill Wendling2013-01-301-2/+2
| | | | | | | There are still places which treat the Attribute object as a collection of attributes. I'm systematically removing them. llvm-svn: 173990
* Attempt to fix dragonegg. Use the number of slots to determine if the ↵Bill Wendling2013-01-301-1/+1
| | | | | | AttributeSet has attributes or not. llvm-svn: 173902
* Remove some introspection functions.Bill Wendling2013-01-251-2/+2
| | | | | | | | The 'getSlot' function and its ilk allow introspection into the AttributeSet class. However, that class should be opaque. Allow access through accessor methods instead. llvm-svn: 173522
* Add an accessor method to get the slot's index. This will limit the use of ↵Bill Wendling2013-01-251-12/+12
| | | | | | AttributeWithIndex. llvm-svn: 173495
* Use the AttributeSet query instead of the Attribute query.Bill Wendling2013-01-251-2/+2
| | | | llvm-svn: 173434
* Use AttributeSet instead of Attribute to verify things.Bill Wendling2013-01-211-53/+52
| | | | llvm-svn: 173101
* Push some more methods down to hide the use of the Attribute class.Bill Wendling2013-01-181-29/+49
| | | | | | | | Because the Attribute class is going to stop representing a collection of attributes, limit the use of it as an aggregate in favor of using AttributeSet. This replaces some of the uses for querying the function attributes. llvm-svn: 172844
* [IR] Add 'Append' and 'AppendUnique' module flag behaviors.Daniel Dunbar2013-01-161-13/+33
| | | | llvm-svn: 172659
* [IR] Add verification for module flags with the "require" behavior.Daniel Dunbar2013-01-151-7/+35
| | | | llvm-svn: 172549
* [IR] Add verifier support for llvm.module.flags.Daniel Dunbar2013-01-151-0/+57
| | | | | | | - Also, update the LangRef documentation on module flags to match the implementation. llvm-svn: 172498
* Support for half intrinsics. Pushes MMX into slower encoding path.Michael Ilseman2013-01-111-0/+1
| | | | llvm-svn: 172159
* Remove unused #includeEli Bendersky2013-01-041-1/+0
| | | | llvm-svn: 171507
* Move all of the header files which are involved in modelling the LLVM IRChandler Carruth2013-01-021-8/+8
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 171366
* Rename VMCore directory to IR.Chandler Carruth2013-01-021-0/+2015
Aside from moving the actual files, this patch only updates the build system and the source file comments under lib/... that are relevant. I'll be updating other docs and other files in smaller subsequnet commits. While I've tried to test this, but it is entirely possible that there will still be some build system fallout. Also, note that I've not changed the library name itself: libLLVMCore.a is still the library name. I'd be interested in others' opinions about whether we should rename this as well (I think we should, just not sure what it might break) llvm-svn: 171359
OpenPOWER on IntegriCloud