summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [analyzer] Add ObjCLoopChecker: objects from NSArray et al are non-nil.Jordan Rose2012-06-114-4/+144
| | | | | | | | | | | | While collections containing nil elements can still be iterated over in an Objective-C for-in loop, the most common Cocoa collections -- NSArray, NSDictionary, and NSSet -- cannot contain nil elements. This checker adds that assumption to the analyzer state. This was the cause of some minor false positives concerning CFRelease calls on objects in an NSArray. llvm-svn: 158319
* [analyzer] When looking for a known class, only traverse the hierarchy once.Jordan Rose2012-06-111-48/+50
| | | | | | | | | This has a small hit in the case where only one class is interesting (NilArgChecker) but is a big improvement when looking for one of several interesting classes (VariadicMethodTypeChecker), in which the most common case is that there is no match. llvm-svn: 158318
* Enable -Wunused-private-field with -Wunused.Benjamin Kramer2012-06-112-2/+2
| | | | | | | It found a lot of cruft in LLVM that I removed last week and I couldn't find any false positives. Time to give it more testing. llvm-svn: 158317
* Fix test case to work on ARM.Jakob Stoklund Olesen2012-06-111-2/+3
| | | | | | Patch by James Benton! llvm-svn: 158316
* Emit the two-operand form of the PPC mfcr instruction as mfocrf.Hal Finkel2012-06-111-1/+1
| | | | | | This is necessary on Linux and supported on Darwin, see PR2604. llvm-svn: 158315
* Add local CPU detection for Linux PPC.Hal Finkel2012-06-111-1/+95
| | | | | | This functionality mirrors that available on PPC/Darwin. llvm-svn: 158314
* Add POWER6 and POWER7 CPU types to the PPC backend.Hal Finkel2012-06-113-0/+14
| | | | | | No functional change; these will be used by upcoming scheduler enhancements. llvm-svn: 158313
* Add test rdx, rdx to fix ASan tests on Mac OS 10.7 x64Alexander Potapenko2012-06-111-0/+1
| | | | llvm-svn: 158312
* Write llvm-tblgen backends as functions instead of sub-classes.Jakob Stoklund Olesen2012-06-1134-1082/+912
| | | | | | | | | The TableGenBackend base class doesn't do much, and will be removed completely soon. Patch by Sean Silva! llvm-svn: 158311
* Fix a problem with the reverse bundle iterators.Jakob Stoklund Olesen2012-06-111-52/+16
| | | | | | | | | | | This showed up the first time rend() was called on a bundled instruction in the Mips backend. Also avoid dereferencing end() in bundle_iterator::operator++(). We still don't have a place to put unit tests for this stuff. llvm-svn: 158310
* We were computing the visibility and linkage of template parameters, butRafael Espindola2012-06-112-6/+99
| | | | | | | | | only using the linkage. Use and test both, documenting that considering the visibility and linkage of template parameters is a difference from gcc. llvm-svn: 158309
* [clang.py] Implement SourceLocation.from_offsetGregory Szorc2012-06-112-0/+23
| | | | llvm-svn: 158307
* Add some tests for the independent blocks pass.Tobias Grosser2012-06-111-0/+227
| | | | llvm-svn: 158306
* Object file output from llc isn't experimental anymore.Benjamin Kramer2012-06-111-1/+1
| | | | llvm-svn: 158305
* Add the runtime library for GPGPU code generation.Tobias Grosser2012-06-116-0/+435
| | | | | | Contributed by: Yabin Hu <yabin.hwu@gmail.com> llvm-svn: 158304
* Re-enable the CMN instruction.Bill Wendling2012-06-116-69/+166
| | | | | | | | | We turned off the CMN instruction because it had semantics which we weren't getting correct. If we are comparing with an immediate, then it's okay to use the CMN instruction. <rdar://problem/7569620> llvm-svn: 158302
* InstCombine: factor code better.Benjamin Kramer2012-06-111-14/+7
| | | | | | No functionality change. llvm-svn: 158301
* Add XOP shift and compare intrinsics.Craig Topper2012-06-113-7/+188
| | | | llvm-svn: 158300
* Documentation cleanup, fixing Doxygen markup. Mostly this avoids common termsJames Dennett2012-06-115-20/+20
| | | | | | | | | | | | | | such as "protocol" and "expression" being implicitly turned into links to mistakenly-generated Doxygen pages: - Escaping @ symbols when Doxygen would otherwise incorrectly interpret them; - Escaping # symbols when they're not intended as explicit Doxygen link requests, such as when discussing preprocessor directives; - In one odd case, unescaping @ in @__experimental_modules_import, because Doxygen wrote '\@' to the output in that case, causing the example in the description of ImportDecl to be wrong; and - Fixing a typo: @breif -> @brief. llvm-svn: 158299
* Const'ify CompilerInvocation::toArgs().Argyrios Kyrtzidis2012-06-112-2/+2
| | | | llvm-svn: 158298
* InstCombine: Turn (zext A) == (B & (1<<X)-1) into A == (trunc B), narrowing ↵Benjamin Kramer2012-06-102-1/+45
| | | | | | | | | | | | | | | | | | | | the compare. This saves a cast, and zext is more expensive on platforms with subreg support than trunc is. This occurs in the BSD implementation of memchr(3), see PR12750. On the synthetic benchmark from that bug stupid_memchr and bsd_memchr have the same performance now when not inlining either function. stupid_memchr: 323.0us bsd_memchr: 321.0us memchr: 479.0us where memchr is the llvm-gcc compiled bsd_memchr from osx lion's libc. When inlining is enabled bsd_memchr still regresses down to llvm-gcc memchr time, I haven't fully understood the issue yet, something is grossly mangling the loop after inlining. llvm-svn: 158297
* Enable ILP scheduling for all nodes by default on PPC.Hal Finkel2012-06-104-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | Over the entire test-suite, this has an insignificantly negative average performance impact, but reduces some of the worst slowdowns from the anti-dep. change (r158294). Largest speedups: SingleSource/Benchmarks/Stanford/Quicksort - 28% SingleSource/Benchmarks/Stanford/Towers - 24% SingleSource/Benchmarks/Shootout-C++/matrix - 23% MultiSource/Benchmarks/SciMark2-C/scimark2 - 19% MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount - 15% (matrix and automotive-bitcount were both in the top-5 slowdown list from the anti-dep. change) Largest slowdowns: MultiSource/Benchmarks/McCat/03-testtrie/testtrie - 28% MultiSource/Benchmarks/mediabench/gsm/toast/toast - 26% MultiSource/Benchmarks/MiBench/automotive-susan/automotive-susan - 21% SingleSource/Benchmarks/CoyoteBench/lpbench - 20% MultiSource/Applications/d/make_dparser - 16% llvm-svn: 158296
* Add AutoUpgrade support for the SSE4 ptest intrinsics.Nadav Rotem2012-06-103-6/+103
| | | | | | Patch by Michael Kuperstein. llvm-svn: 158295
* Use critical anti-dep. breaking on all PPC targets, but also add other ↵Hal Finkel2012-06-101-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | register classes. Using 'all' instead of 'critical' would be better because it would make it easier to satisfy the bundling constraints, but, as noted in the FIXME, that is currently not possible with the crs. This yields an average 1% speedup over the entire test suite (on Power 7). Largest speedups: SingleSource/Benchmarks/Shootout-C++/moments - 40% MultiSource/Benchmarks/McCat/03-testtrie/testtrie - 28% SingleSource/Benchmarks/BenchmarkGame/nsieve-bits - 26% SingleSource/Benchmarks/McGill/misr - 23% MultiSource/Applications/JM/ldecod/ldecod - 22% Largest slowdowns: SingleSource/Benchmarks/Shootout-C++/matrix - -29% SingleSource/Benchmarks/Shootout-C++/ary3 - -22% MultiSource/Benchmarks/BitBench/uuencode/uuencode - -18% SingleSource/Benchmarks/Shootout-C++/ary - -17% MultiSource/Benchmarks/MiBench/automotive-bitcount/automotive-bitcount - -15% llvm-svn: 158294
* PR12964: __int128 and unsigned __int128 are promoted integral types, be sure toRichard Smith2012-06-103-20/+38
| | | | | | consider them when enumerating builtin operator candidates. llvm-svn: 158293
* Add XOP vprot* instruction intrinsicsCraig Topper2012-06-103-0/+89
| | | | llvm-svn: 158292
* Add intrinsics for immediate form of XOP vprot instructions. Use i128mem ↵Craig Topper2012-06-102-35/+55
| | | | | | instead of f128mem for integer XOP instructions. llvm-svn: 158291
* Remove CXXRecordDecl flags which are unused after r158289.Richard Smith2012-06-106-152/+22
| | | | | | | | | | | | | | | | | | | | | We need an efficient mechanism to determine whether a defaulted default constructor is constexpr, in order to determine whether a class is a literal type, so keep the incrementally-built form on CXXRecordDecl. Remove the on-demand computation of same, so that we only have one method for determining whether a default constructor is constexpr. This doesn't affect correctness, since default constructor lookup is much simpler than selecting a constructor for copying or moving. We don't need a corresponding mechanism for defaulted copy or move constructors, since they can't affect whether a type is a literal type. Conversely, checking whether such functions are constexpr can require non-trivial effort, so we defer such checks until the copy or move constructor is required. Thus we now only compute whether a copy or move constructor is constexpr on demand, and only compute whether a default constructor is constexpr in advance. This is unfortunate, but seems like the best solution. llvm-svn: 158290
* Fix PR13052 properly, by performing special member lookup to determine whetherRichard Smith2012-06-102-16/+175
| | | | | | | | | | an explicitly-defaulted default constructor would be constexpr. This is necessary in weird (but well-formed) cases where a class has more than one copy or move constructor. Cleanup of now-unused parts of CXXRecordDecl to follow. llvm-svn: 158289
* PR13064: Store whether an in-class initializer uses direct or copyRichard Smith2012-06-1024-115/+143
| | | | | | | initialization, and use that information to produce the right kind of initialization during template instantiation. llvm-svn: 158288
* More XOP intrinsicsCraig Topper2012-06-103-0/+219
| | | | llvm-svn: 158287
* Begin adding XOP intrinsicsCraig Topper2012-06-105-1/+197
| | | | llvm-svn: 158286
* Fix the top-of-file comment in Attr.h to say that it's about attributes, notJames Dennett2012-06-091-1/+1
| | | | | | expressions. llvm-svn: 158285
* Add XOP feature flag.Craig Topper2012-06-092-8/+31
| | | | llvm-svn: 158284
* Improve ext/trunc patterns on PPC64.Hal Finkel2012-06-092-11/+5
| | | | | | | | | | The PPC64 backend had patterns for i32 <-> i64 extensions and truncations that would leave self-moves in the final assembly. Replacing those patterns with ones based on the SUBREG builtins yields better-looking code. Thanks to Jakob and Owen for their suggestions in this matter. llvm-svn: 158283
* Add CSS style for FAQ questions, and restate FAQ questions as actual questions.Ted Kremenek2012-06-092-7/+22
| | | | llvm-svn: 158282
* Wordsmith a bit, and turn </h1> into </h4> when appropriate.Ted Kremenek2012-06-091-6/+8
| | | | llvm-svn: 158281
* Revert pair constructors back to using is_convertible instead of ↵Howard Hinnant2012-06-091-6/+6
| | | | | | is_constructible. This should pull things into alignment with the final draft. Fixes http://llvm.org/bugs/show_bug.cgi?id=13063#add_comment. llvm-svn: 158280
* Use XOP vpcom intrinsics in patterns instead of a target specific SDNode ↵Craig Topper2012-06-094-60/+13
| | | | | | type. Remove the custom lowering code that selected the SDNode type. llvm-svn: 158279
* Replace XOP vpcom intrinsics with fewer intrinsics that take the immediate ↵Craig Topper2012-06-094-431/+149
| | | | | | as an argument. llvm-svn: 158278
* [clang.py] Implement Cursor.is_static_methodGregory Szorc2012-06-092-0/+26
| | | | llvm-svn: 158277
* Hashing: Remove outdated comment. Support for reserved hash values was ↵Benjamin Kramer2012-06-091-4/+0
| | | | | | removed in r151865. llvm-svn: 158276
* Reorder ParsedTemplateArg's members to reduce padding on x86_64.Benjamin Kramer2012-06-091-5/+5
| | | | llvm-svn: 158275
* Disabling a spurious deprecation warning about using PathV1 from within the ↵Aaron Ballman2012-06-091-0/+10
| | | | | | PathV1 implementation file. llvm-svn: 158274
* Fixing a typo in the comments.Aaron Ballman2012-06-091-1/+1
| | | | llvm-svn: 158273
* Replace a char counting helper function with std::count.Benjamin Kramer2012-06-091-12/+2
| | | | | | No functionality change. llvm-svn: 158272
* Replace constant-sized BitVector with std::bitset.Benjamin Kramer2012-06-091-4/+3
| | | | llvm-svn: 158270
* Allocate the contents of DwarfDebug's StringMaps in a single big ↵Benjamin Kramer2012-06-092-5/+6
| | | | | | BumpPtrAllocator. llvm-svn: 158265
* Silence a gcc-4.6 warning: GCC fails to understand that secondReg and cmpOp2 areDuncan Sands2012-06-091-1/+1
| | | | | | correlated, and thinks that cmpOp2 may be used uninitialized. llvm-svn: 158263
* [Sanitizer] Use __libc_malloc/__libc_free instead of malloc/free inside ↵Alexey Samsonov2012-06-091-3/+12
| | | | | | internal allocator on Linux (important for TSan) llvm-svn: 158261
OpenPOWER on IntegriCloud