summaryrefslogtreecommitdiffstats
path: root/clang/utils
Commit message (Collapse)AuthorAgeFilesLines
* [NeonIntrinsicTestEmitter] vld1/vst1 do not require the :64 hint.Michael Gottesman2013-06-241-2/+0
| | | | llvm-svn: 184786
* [NeonIntrinsicTestEmitter] Fix incorrect FileCheck pattern where we were ↵Michael Gottesman2013-06-241-2/+2
| | | | | | expecting a ',' prefix to alignment hints. llvm-svn: 184785
* [NeonIntrinsicTestEmitter] Add requirement to arm neon intrinsic tests for ↵Michael Gottesman2013-06-241-0/+2
| | | | | | | | | the feature long_tests. This will prevent the tests from running on normal make check. You will need to actually pass in --param run_long_tests=true to LIT in order to run these. llvm-svn: 184784
* Remove option emitter from clang-tblgenReid Kleckner2013-06-184-290/+1
| | | | | | | The CMake build was still using it because I forgot to s/CLANG/LLVM/ in the tablegen() call. The Makefile build is already using llvm-tblgen. llvm-svn: 184192
* [analyzer] SATestBuild: Don't require reference results to have logs.Jordan Rose2013-06-101-2/+4
| | | | | | | | The Logs directory isn't used for testing, so it's filtered out ahead of time. However, there's then no reason to include it in version control at all. Don't error if it's not present. llvm-svn: 183689
* [analyzer] Always use ccc-analyzer when running scan-build on buildbotAnna Zaks2013-05-311-0/+3
| | | | llvm-svn: 182982
* Increase the portability of this script a bit: use /usr/bin/env to find bash,Richard Smith2013-05-241-1/+1
| | | | | | rather than assuming it lives in the path. Patch by Eitan Adler! llvm-svn: 182696
* ARM: Improve codegen for vget_low_* and vget_high_ intrinsics.Jim Grosbach2013-05-151-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These intrinsics use the __builtin_shuffle() function to extract the low and high half, respectively, of a 128-bit NEON vector. Currently, they're defined to use bitcasts to simplify the emitter, so we get code like: uint16x4_t vget_low_u32(uint16x8_t __a) { return (uint32x2_t) __builtin_shufflevector((int64x2_t) __a, (int64x2_t) __a, 0); } While this works, it results in those bitcasts going all the way through to the IR, resulting in code like: %1 = bitcast <8 x i16> %in to <2 x i64> %2 = shufflevector <2 x i64> %1, <2 x i64> undef, <1 x i32> %zeroinitializer %3 = bitcast <1 x i64> %2 to <4 x i16> We can instead easily perform the operation directly on the input vector like: uint16x4_t vget_low_u16(uint16x8_t __a) { return __builtin_shufflevector(__a, __a, 0, 1, 2, 3); } Not only is that much easier to read on its own, it also results in cleaner IR like: %1 = shufflevector <8 x i16> %in, <8 x i16> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3> This is both easier to read and easier for the back end to reason about effectively since the operation is obfuscating the source with bitcasts. rdar://13894163 llvm-svn: 181865
* Fix copy-pasto in naming of LAST_MS_INHERITANCE[_ATTR]Reid Kleckner2013-05-141-8/+8
| | | | | | Richard Smith pointed this out over a month ago. llvm-svn: 181830
* ArrayRef<T>() -> None cleanupDmitri Gribenko2013-05-051-1/+1
| | | | llvm-svn: 181140
* Restore Richard's belief in me.Douglas Gregor2013-05-031-1/+1
| | | | llvm-svn: 181042
* Use attribute argument information to determine when to parse attribute ↵Douglas Gregor2013-05-023-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arguments as expressions. This change partly addresses a heinous problem we have with the parsing of attribute arguments that are a lone identifier. Previously, we would end up parsing the 'align' attribute of this as an expression "(Align)": template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align((Align)))) char storage[Size]; }; while this would parse as a "parameter name" 'Align': template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align(Align))) char storage[Size]; }; The code that handles the alignment attribute would completely ignore the parameter name, so the while the first of these would do what's expected, the second would silently be equivalent to template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align)) char storage[Size]; }; i.e., use the maximal alignment rather than the specified alignment. Address this by sniffing the "Args" provided in the TableGen description of attributes. If the first argument is "obviously" something that should be treated as an expression (rather than an identifier to be matched later), parse it as an expression. Fixes <rdar://problem/13700933>. llvm-svn: 180973
* Revert r180970; it's causing breakage.Douglas Gregor2013-05-023-52/+0
| | | | llvm-svn: 180972
* Use attribute argument information to determine when to parse attribute ↵Douglas Gregor2013-05-023-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | arguments as expressions. This change partly addresses a heinous problem we have with the parsing of attribute arguments that are a lone identifier. Previously, we would end up parsing the 'align' attribute of this as an expression "(Align)": template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align((Align)))) char storage[Size]; }; while this would parse as a "parameter name" 'Align': template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align(Align))) char storage[Size]; }; The code that handles the alignment attribute would completely ignore the parameter name, so the while the first of these would do what's expected, the second would silently be equivalent to template<unsigned Size, unsigned Align> class my_aligned_storage { __attribute__((align)) char storage[Size]; }; i.e., use the maximal alignment rather than the specified alignment. Address this by sniffing the "Args" provided in the TableGen description of attributes. If the first argument is "obviously" something that should be treated as an expression (rather than an identifier to be matched later), parse it as an expression. Fixes <rdar://problem/13700933>. llvm-svn: 180970
* [neonemitter tests] Change triple of emitted tests to thumbv7s to match the ↵Michael Gottesman2013-04-251-1/+1
| | | | | | target cpu being swift. Also specify the target-abi to apcs-gnu. llvm-svn: 180233
* [6/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman2013-04-161-1/+462
| | | | | | | | | Added GenerateChecksForIntrinsic method to generate FileCheck patterns for generated arm neon tests. Reviewed by Bob Wilson. llvm-svn: 179644
* [5/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman2013-04-161-1/+2
| | | | | | | | Changed the test generation target cpu type from cortex-a9 to swift. Reviewed by Bob Wilson. llvm-svn: 179642
* [4/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman2013-04-161-3/+9
| | | | | | | | | Added code to NeonEmitter::runTests so that GenTest gets all of the needed arguments to invoke the neon test generation methods. Reviewed by Bob Wilson. llvm-svn: 179640
* [3/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman2013-04-161-28/+44
| | | | | | | | | Refactored out the method InstructionTypeCode from MangleName for use in further patches which perform neon tablegen test generation. Reviewed by Bob Wilson. llvm-svn: 179636
* [2/6] ARM Neon Intrinsic Tablegen Test Generator.Michael Gottesman2013-04-161-1/+17
| | | | | | | | | | This patch causes OpInst records to be silently identified with their Non-Op inst counterparts so that the same test generation infrastructure can be used to generate tests. Reviewed by Bob Wilson. llvm-svn: 179628
* Define Neon intrinsics as "static inline" to avoid warning. rdar://13108414Bob Wilson2013-04-121-1/+1
| | | | | | | | | | | We had been defining Neon intrinsics as "static" with always_inline attributes. If you use them from an extern inline function, you get a warning, e.g.: static function 'vadd_u8' is used in an inline function with external linkage This change simply adds the inline keyword to avoid that warning. llvm-svn: 179406
* doce parsing: adding few more headerdoc tags.Fariborz Jahanian2013-04-051-0/+3
| | | | | | // rdar://12379114 llvm-svn: 178903
* [analyzer] Re-enable cplusplus.NewDelete (but not NewDeleteLeaks).Jordan Rose2013-04-051-2/+3
| | | | | | | | As mentioned in the previous commit message, the use-after-free and double-free warnings for 'delete' are worth enabling even while the leak warnings still have false positives. llvm-svn: 178891
* [analyzer] Moving cplusplus.NewDelete to alpha.* for now.Anton Yartsev2013-04-021-1/+1
| | | | llvm-svn: 178529
* [ms-cxxabi] Give the MS inheritance attributes a base classReid Kleckner2013-03-261-1/+16
| | | | | | | | Required making a handful of changes to the table generator. Also adds an unspecified inheritance attribute. This opens the path for us to apply these attributes to C++ records implicitly. llvm-svn: 178054
* [analyzer] Adds cplusplus.NewDelete checker that check for memory leaks, ↵Anton Yartsev2013-03-251-1/+1
| | | | | | double free, and use-after-free problems of memory managed by new/delete. llvm-svn: 177849
* [analyzer] CmpRuns.py: Accept single files as input.Jordan Rose2013-03-231-46/+51
| | | | | | | | This allows us to compare two direct invocations of the analyzer on a single source file without having to wrap the output plists in their own directories. llvm-svn: 177804
* Documentation parsing. Some refactoring and codeFariborz Jahanian2013-03-081-2/+2
| | | | | | improvements per Dmtiri's comments. // rdar://12379114 llvm-svn: 176739
* HeaderDoc: Support more of HeaderDoc documentation Fariborz Jahanian2013-03-071-0/+2
| | | | | | | | commands; top level tags such as @interface and their 2nd level tags such as @coclass, etc. // rdar://12379114 llvm-svn: 176667
* doc parsing. We want to issue a strong warning whenFariborz Jahanian2013-03-051-0/+1
| | | | | | | an @function comment is not followed by a function decl. // rdar://13094352 llvm-svn: 176468
* Strip 'llvm' from 'llvm::Optional' uses.Ted Kremenek2013-02-211-1/+1
| | | | llvm-svn: 175701
* Comment parsing: improve the fidelity of XML output for many block commandsDmitri Gribenko2013-02-013-0/+53
| | | | | | | | | | | | | | This change introduces a 'kind' attribute for the <Para> tag, that captures the kind of the parent block command. For example: \todo Meow. used to be just <Para>Meow.</Para>, but now it is <Para kind="todo">Meow.</Para> llvm-svn: 174216
* [Sema][Attr]Fix alignment attribute printing.Michael Han2013-02-011-0/+47
| | | | | | | | | Remove "IsMSDeclspec" argument from Align attribute since the arguments in Attr.td should only model those appear in source code. Introduce attribute Accessor, and teach TableGen to generate syntax kind accessors for Align attribute, and use those accessors to decide if an alignment attribute is a declspec attribute. llvm-svn: 174133
* [Comment parsing] Add support for recognizingFariborz Jahanian2013-01-311-0/+1
| | | | | | | | \headerfile command and representing it in an xml document. Patch reviewed by Dmitri Gribenko. // rdar://12397511 llvm-svn: 174109
* Add indents to AST dumping and removed parenthesis from AST nodes.Richard Trieu2013-01-311-4/+37
| | | | | | | | | | | | | | | | | | | | | Indents were given the color blue when outputting with color. AST dumping now looks like this: Node |-Node | `-Node `-Node `-Node Compared to the previous: (Node (Node (Node)) (Node (Node))) llvm-svn: 174022
* TableGen backends: use emitSourceFileHeader() to emit the warning aboutDmitri Gribenko2013-01-305-18/+34
| | | | | | file contents being autogenerated llvm-svn: 173979
* Comment parsing: resolve more named character referencesDmitri Gribenko2013-01-304-0/+93
| | | | | | | | | This reimplements r173850 with a better approach: (1) use a TableGen-generated matcher instead of doing a linear search; (2) avoid allocations for new strings by converting code points to string iterals with TableGen. llvm-svn: 173931
* Propagate the spelling list index for an attribute across template ↵Richard Smith2013-01-291-1/+1
| | | | | | instantiation. llvm-svn: 173768
* Replace AS_MSTypespec with AS_Keyword, for representing any attribute spelledRichard Smith2013-01-291-1/+5
| | | | | | | | | as a keyword. Rationalize existing attributes to use it as appropriate, and to not lie about some __declspec attributes being GNU attributes. In passing, remove a gross hack which was discarding attributes which we could handle. This results in us actually respecting the __pascal keyword again. llvm-svn: 173746
* Add the missing line return to align parameters of printPretty.Michael Han2013-01-271-1/+1
| | | | llvm-svn: 173597
* [utils] Kill another no-longer-useful utility script.Daniel Dunbar2013-01-251-117/+0
| | | | | | | - We are long past the days of getting clang to fail in mass on swaths of code, fortunately. llvm-svn: 173523
* [utils] Remove the OptionalTests subdir no one runs.Daniel Dunbar2013-01-254-371/+0
| | | | llvm-svn: 173491
* [utils] Remove C++Tests that I don't think anyone uses anymore.Daniel Dunbar2013-01-2510-333/+0
| | | | llvm-svn: 173490
* scan-build: Add a --keep-empty option for better testing.Jordan Rose2013-01-241-0/+1
| | | | | | | | SATestBuild expects to compare output directories for each invocation of scan-build that it runs, but scan-build clears out empty directories by default. We were coincidentally not getting that behavior until r173294. llvm-svn: 173383
* PR14922: when printing an attribute, use the real syntax of the attribute ↵Michael Han2013-01-243-21/+148
| | | | | | | | | | | | | (GNU, C++11, MS Declspec) instead of hardcoded GNU syntax. Introduce a spelling index to Attr class, which is an index into the attribute spelling list of an attribute defined in Attr.td. This index will determine the actual spelling used by an attribute, as it incorporates both the syntax and naming of the attribute. When constructing an attribute AST node, the spelling index is computed based on attribute kind, scope (if it's a C++11 attribute), and name, then passed to Attr that will use the index to print itself. Thanks to Richard Smith for the idea and review. llvm-svn: 173358
* clang/utils/valgrind/x86_64-pc-linux-gnu_gcc-4.3.3.supp: Add /usr/bin/cmp.NAKAMURA Takumi2013-01-201-0/+7
| | | | | | | | | FIXME: It could be removed if; - check-all included llvm/valgrind/supp, too. - clang-vg didn't use "check-all". llvm-svn: 172982
* Turns out there is a simpler way of getting a set difference in bash than ↵Benjamin Kramer2013-01-141-1/+1
| | | | | | parsing diff output. llvm-svn: 172420
* Speed up find-unused-diagnostics. Now runs in less than a second instead of ↵Benjamin Kramer2013-01-121-11/+7
| | | | | | more than a minute. llvm-svn: 172330
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-3/+3
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* Error if an anonymous DiagGroup is referenced multiple times.Jordan Rose2013-01-101-2/+119
| | | | | | | | | | | Not only is this inefficient for TableGen, it's annoying for maintenance when renaming warning flags (unusual) or adding those flags to a group (more likely). This uses the new fix-it infrastructure for LLVM's SourceMgr/SMDiagnostic, as well as a few changes to TableGen to track more source information. llvm-svn: 172087
OpenPOWER on IntegriCloud