summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [OPENMP] Enable codegen of the ‘private’ clause for ‘omp simd’ directiveAlexander Musman2015-03-162-7/+27
| | | | llvm-svn: 232353
* [objc-arc] Fix indentation of debug logging so it is easy to read the output.Michael Gottesman2015-03-163-19/+101
| | | | llvm-svn: 232352
* [objc-arc] Make the ARC optimizer more conservative by forcing it to be ↵Michael Gottesman2015-03-164-68/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | non-safe in both direction, but mitigate the problem by noting that we just care if there was a further use. The problem here is the infamous one direction known safe. I was hesitant to turn it off before b/c of the potential for regressions without an actual bug from users hitting the problem. This is that bug ; ). The main performance impact of having known safe in both directions is that often times it is very difficult to find two releases without a use in-between them since we are so conservative with determining potential uses. The one direction known safe gets around that problem by taking advantage of many situations where we have two retains in a row, allowing us to avoid that problem. That being said, the one direction known safe is unsafe. Consider the following situation: retain(x) retain(x) call(x) call(x) release(x) Then we know the following about the reference count of x: // rc(x) == N (for some N). retain(x) // rc(x) == N+1 retain(x) // rc(x) == N+2 call A(x) call B(x) // rc(x) >= 1 (since we can not release a deallocated pointer). release(x) // rc(x) >= 0 That is all the information that we can know statically. That means that we know that A(x), B(x) together can release (x) at most N+1 times. Lets say that we remove the inner retain, release pair. // rc(x) == N (for some N). retain(x) // rc(x) == N+1 call A(x) call B(x) // rc(x) >= 1 release(x) // rc(x) >= 0 We knew before that A(x), B(x) could release x up to N+1 times meaning that rc(x) may be zero at the release(x). That is not safe. On the other hand, consider the following situation where we have a must use of release(x) that x must be kept alive for after the release(x)**. Then we know that: // rc(x) == N (for some N). retain(x) // rc(x) == N+1 retain(x) // rc(x) == N+2 call A(x) call B(x) // rc(x) >= 2 (since we know that we are going to release x and that that release can not be the last use of x). release(x) // rc(x) >= 1 (since we can not deallocate the pointer since we have a must use after x). … // rc(x) >= 1 use(x) Thus we know that statically the calls to A(x), B(x) can together only release rc(x) N times. Thus if we remove the inner retain, release pair: // rc(x) == N (for some N). retain(x) // rc(x) == N+1 call A(x) call B(x) // rc(x) >= 1 … // rc(x) >= 1 use(x) We are still safe unless in the final … there are unbalanced retains, releases which would have caused the program to blow up anyways even before optimization occurred. The simplest form of must use is an additional release that has not been paired up with any retain (if we had paired the release with a retain and removed it we would not have the additional use). This fits nicely into the ARC framework since basically what you do is say that given any nested releases regardless of what is in between, the inner release is known safe. This enables us to get back the lost performance. <rdar://problem/19023795> llvm-svn: 232351
* [objc-arc] Treat memcpy, memove, memset as just using pointers, not ↵Michael Gottesman2015-03-161-34/+62
| | | | | | | | | decrementing them. This will be tested in the next commit (which required it). The commit is going to update a bunch of tests at the same time. llvm-svn: 232350
* [objc-arc] Rename ConnectTDBUTraversals => PairUpRetainsReleases.Michael Gottesman2015-03-161-15/+15
| | | | | | This is a name that is more descriptive of what the method really does. NFC. llvm-svn: 232349
* [objc-arc] Move initialization of ARCMDKindCache into the class itself. I ↵Michael Gottesman2015-03-166-21/+54
| | | | | | also made it lazy. llvm-svn: 232348
* [objc-arc] Change EntryPointType to an enum class outside of ↵Michael Gottesman2015-03-163-34/+34
| | | | | | ARCRuntimeEntryPoints called ARCRuntimeEntryPointKind. llvm-svn: 232347
* InstrProf: Do a better job of reading coverage mapping data.Justin Bogner2015-03-167-65/+59
| | | | | | | | | | | | | | | | | | | | | | This code was casting regions of a memory buffer to a couple of different structs. This is wrong in a few ways: 1. It breaks aliasing rules. 2. If the buffer isn't aligned, it hits undefined behaviour. 3. It completely ignores endianness differences. 4. The structs being defined for this aren't specifying their padding properly, so this doesn't even represent the data properly on some platforms. This commit is mostly NFC, except that it fixes reading coverage for 32 bit binaries as a side effect of getting rid of the mispadded structs. I've included a test for that. I've also baked in that we only handle little endian more explicitly, since that was true in practice already. I'll fix this to handle endianness properly in a followup commit. llvm-svn: 232346
* Added nullptr to fix buildVince Harron2015-03-161-2/+3
| | | | llvm-svn: 232345
* And one more empty directory.Alexander Kornienko2015-03-160-0/+0
| | | | llvm-svn: 232344
* Remove an empty directory.Alexander Kornienko2015-03-160-0/+0
| | | | llvm-svn: 232343
* [dsymutil] Add support to generate .debug_pubnames and .debug_pubtypesFrederic Riss2015-03-164-4/+279
| | | | | | | | The information gathering part of the patch stores a bit more information than what is strictly necessary for these 2 sections. The rest will become useful when we start emitting __apple_* type accelerator tables. llvm-svn: 232342
* [ELF][ARM] Make gotSymbol a member.Shankar Easwaran2015-03-161-9/+5
| | | | | | | | | | | The gotSymbol need not be a global static variable. Apart from this reason, This variable was creating an issue with self hosting lld, as there seems to be an issue running global initializers, when initializing the guard for this static variable. Program received signal SIGTRAP, Trace/breakpoint trap. llvm-svn: 232341
* Fix ./configure build after r232338.Alexander Kornienko2015-03-161-2/+1
| | | | llvm-svn: 232340
* Rework r232337. Let llvm/test/tools/dsymutil/X86/basic-linking-x86.test ↵NAKAMURA Takumi2015-03-161-8/+7
| | | | | | dospath-tolerant. llvm-svn: 232339
* Move remove-cstr-calls from a standalone executable to a clang-tidy check ↵Alexander Kornienko2015-03-1611-327/+222
| | | | | | | | | | readability-redundant-string-cstr http://reviews.llvm.org/D7318 Patch by Richard Thomson! llvm-svn: 232338
* Suppress llvm/test/tools/dsymutil/X86/basic-linking-x86.test for now. Will ↵NAKAMURA Takumi2015-03-151-0/+1
| | | | | | fix later. llvm-svn: 232337
* llvm/test/tools/dsymutil/X86/basic-lto-*-linking-x86.test: Relax expressions ↵NAKAMURA Takumi2015-03-152-8/+8
| | | | | | to meet dos path. llvm-svn: 232336
* [dsymutil] Add missing raw_svector_stream::resync() calls.Frederic Riss2015-03-151-3/+4
| | | | | | | | | Also, after looking at the raw_svector_stream internals, increase the size of the SmallString used with it to prevent heap allocation. Issue found by the Asan bot. llvm-svn: 232335
* Adding commit msg guidelines to dev policyRenato Golin2015-03-151-2/+56
| | | | | | | | | After much bike shed discussions, we seem to agree to a few loose but relevant guidelines on how to prepare a commit message. It also points the attribution section to the new commit messages section to deduplicate information. llvm-svn: 232334
* [dsymutil] Add support for linking line tables.Frederic Riss2015-03-154-5/+511
| | | | | | | | | | | | | | | This code comes with a lot of cruft that is meant to mimic darwin's dsymutil behavior. A much simpler approach (described in the numerous FIXMEs that I put in there) gives the right output for the vast majority of cases. The extra corner cases that are handled differently need to be investigated: they seem to correctly handle debug info that is in the input, but that info looks suspicious in the first place. Anyway, the current code needs to handle this, but I plan to revisit it as soon as the big round of validation against the classic dsymutil is over. llvm-svn: 232333
* [MCDwarf] Do not emit useless line table opcode.Frederic Riss2015-03-151-1/+1
| | | | | | | | | | | | | No need to emit a DW_LNS_advance_pc with a 0 increment. Found out while comparing dsymutil's and LLVM's line table encoding. Not a correctenss fix, just a small encoding size optimization. I'm not sure how to generate a sequence that triggers this, and moreover llvm-dwardump doesn't dump the line table program, thus the effort involved in creating a testcase for this trivial patch seemed out of proportion. llvm-svn: 232332
* Use SDValue bool check to tidyup some possible combines. NFC.Simon Pilgrim2015-03-151-4/+2
| | | | llvm-svn: 232331
* SimpleArray: Provide reverse iteration via std::reverse_iterator.Benjamin Kramer2015-03-151-30/+18
| | | | | | NFC intended. llvm-svn: 232330
* Remove unneeded initialisation of fenv_t and fexcept_t.Ed Schouten2015-03-151-2/+2
| | | | | | | | Though common, there is no requirement that fenv_t and fexcept_t are structure and integer types, respectively. fexcept_t is a structure on CloudABI. llvm-svn: 232329
* remove function names from comments; NFCSanjay Patel2015-03-151-7/+6
| | | | llvm-svn: 232328
* fix typo: NFCSanjay Patel2015-03-151-1/+1
| | | | llvm-svn: 232327
* Use -fno-limit-debug-info instead of -fstandalone-debug in testsVince Harron2015-03-1511-11/+11
| | | | | | | | | | | | | This fixes tests on clang-3.4 AFAICT, these flags have the same affect and -fstandalone-debug wasn't added until after clang-3.4 Committed to try to fix buildbot Differential Revision: http://reviews.llvm.org/D8347 llvm-svn: 232326
* Use SDValue bool check to tidyup some possible combines. NFC.Simon Pilgrim2015-03-151-5/+3
| | | | llvm-svn: 232325
* [SSE} Added tests for float4-float3 conversions (PR11580)Simon Pilgrim2015-03-151-0/+32
| | | | llvm-svn: 232324
* Implement PreprocessingRecord's and LazyVector's iterators on top of ↵Benjamin Kramer2015-03-153-241/+71
| | | | | | | | | | | | | iterator_adaptor_base This basically creates a wrapper around an 'int' that poses as an iterator. While that looks a bit counter-intuitive it works just fine because iterator operations and basic integer arithmetic works in exactly the same way. Remove the manual integer wrapping code and reduce the reliance on iterator internals in the implementation. No functionality change intended. llvm-svn: 232322
* clang-format: [JS] support cast syntax and type arguments.Daniel Jasper2015-03-152-0/+19
| | | | | | | | | Casts in TS syntax (foo = <type>bar;) should not be followed by whitespace. Patch by Martin Probst. Thank you. llvm-svn: 232321
* clang-format: [JS] more precisely detect enums.Daniel Jasper2015-03-152-6/+15
| | | | | | | | | | | | The current enum detection is overly aggressive. As NestingLevel only applies per line (?) it classifies many if not most object literals as enum declarations and adds superfluous line breaks into them. This change narrows the heuristic by requiring an assignment just before the open brace and requiring the line to start with an identifier. Patch by Martin Probst. Thank you. llvm-svn: 232320
* Factor the iterators of ImmutableSet/ImmutableMap into a common base classBenjamin Kramer2015-03-152-108/+47
| | | | | | | This simplifies code quite a bit and brings the iterators closer to C++'s iterator concept. No functional change intended. llvm-svn: 232319
* MS ABI: Don't use qualified pointee types for 'catch' EH TypeDescriptorsDavid Majnemer2015-03-155-32/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Qualifiers are located next to the TypeDescriptor in order to properly ensure that a pointer type can only be caught by a more qualified catch handler. This means that a catch handler of type 'const int *' requires an RTTI object for 'int *'. We got this correct for 'throw' but not for 'catch'. N.B. We don't currently have the means to store the qualifiers because LLVM's EH strategy is tailored to the Itanium scheme. The Itanium ABI stores qualifiers inside the type descriptor in such a way that the manner of qualification is stored in addition to the pointee type's descriptor. Perhaps the best way of modeling this for the MS ABI is using an aggregate type to bundle the qualifiers with the descriptor? This is tricky because we want to make it clear to the optimization passes which catch handlers invalidate other handlers. My current thoughts on a design for this is along the lines of: { { TypeDescriptor* TD, i32 QualifierFlags }, i32 MiscFlags } The idea is that the inner most aggregate is all that is needed to communicate that one catch handler might supercede another. The 'MiscFlags' field would be used to hold the bitpattern for the notion that the 'catch' handler does not need to invoke a copy-constructor because we are catching by reference. llvm-svn: 232318
* ImmutableSet: Rename Self to SelfTy to make it more clear it is a typeDavid Majnemer2015-03-151-10/+12
| | | | | | No functional change intended. llvm-svn: 232317
* PostOrderIterator: Remove stray semicolonDavid Majnemer2015-03-151-4/+1
| | | | llvm-svn: 232316
* IR: Default the Metadata::dump() argument "harder" after r232275Duncan P. N. Exon Smith2015-03-152-1/+11
| | | | | | | | | | Use an overload instead of a default argument for `Metadata::dump()`. The latter seems to require calling `dump(nullptr)` explicitly when using a debugger, where as the former doesn't. Other than utility for debugging, there's NFC here. llvm-svn: 232315
* Restore the gcc buildDavid Majnemer2015-03-151-17/+10
| | | | llvm-svn: 232314
* Remove iterator I accidentally left behindDavid Blaikie2015-03-151-1/+0
| | | | llvm-svn: 232312
* Remove use of reserved identifier _IteratorDavid Blaikie2015-03-151-5/+5
| | | | llvm-svn: 232311
* Remove use of reserved identifiers in TwineDavid Blaikie2015-03-151-15/+14
| | | | llvm-svn: 232310
* Remove use of reserved identifier and some excess 'inline' usageDavid Blaikie2015-03-151-58/+67
| | | | llvm-svn: 232309
* Remove reserved identifier & some unnecessary 'inline'David Blaikie2015-03-151-27/+29
| | | | llvm-svn: 232308
* Remove use of reserved identifierDavid Blaikie2015-03-151-18/+17
| | | | | | & some unnecessary 'inline' keywords llvm-svn: 232307
* [clang-tidy] Fix false positives in the misc-static-assert check ↵Alexander Kornienko2015-03-152-3/+19
| | | | | | | | | | | | | | | | http://llvm.org/PR22880 The misc-static-assert check will not warn on assert(false), assert(False), assert(FALSE); where false / False / FALSE are macros expanding to the false or 0 literals. Also added corresponding test cases. http://reviews.llvm.org/D8328 Patch by Szabolcs Sipos! llvm-svn: 232306
* [dsymutil] Add an way to iterate over a DebugMapObject symbols.Frederic Riss2015-03-151-0/+4
| | | | llvm-svn: 232305
* Remove use of unreserved identifier (_Self)David Blaikie2015-03-151-15/+36
| | | | | | And some unnecessary inline keywords llvm-svn: 232304
* Remove use of a reserved identifierDavid Blaikie2015-03-151-16/+17
| | | | | | (& some unnecessary 'inline' keywords, too) llvm-svn: 232303
* Remove use of reserved identifierDavid Blaikie2015-03-151-6/+9
| | | | | | | The C++ standard reserves all identifiers starting with an underscore followed by an uppercase letter for the implementation for any use. llvm-svn: 232302
OpenPOWER on IntegriCloud