summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-opt-report] Fix context-sensitive lines where nothing happenedHal Finkel2017-01-074-3/+145
| | | | | | | | | | | | | | | | | Don't print a line multiple times, each for different inlining contexts, if nothing happened in any context. This prevents situations like this: [[ > main: 65 | if ((i * ni + j) % 20 == 0) fprintf > print_array: 65 | if ((i * ni + j) % 20 == 0) fprintf ]] which could happen if different optimizations were missed in different inlining contexts. llvm-svn: 291361
* Fix buildbots.Richard Smith2017-01-071-1/+1
| | | | llvm-svn: 291360
* SimplifyLibCalls: Remove incorrect optimization of fabsMatt Arsenault2017-01-073-21/+39
| | | | | | | | fabs(x * x) is not generally safe to assume x is positive if x is a NaN. This is also less general than it could be, so this will be replaced with a transformation on the intrinsic. llvm-svn: 291359
* Consistently use a ConstantEvaluated context for expressions in attributes,Richard Smith2017-01-073-4/+14
| | | | | | except for those with the "attributes are unevaluated contexts" flag. llvm-svn: 291358
* Update update_test_checks to work properly with phi nodes and other fun things.Daniel Berlin2017-01-071-23/+26
| | | | | | | | | | | | | | | | | | | | | | Summary: Prior to this change, phi nodes were never considered defs, and so we ended up with undefined variables for any loop. Now, instead of trying to find just defs, we iterate over each actual IR value in the line, and replace them one by one with either a definition or a use. We also don't try to match anything in the comment portions of the line. I've tested it even on things like function pointer calls, etc, and against existing test cases uses update_test_checks With this change, we are able to use update_tests on the cyclic cases in newgvn. The only case i'm aware of that will misfire is if you have a string with which contains a valid token. However, this is the same as it is now, with a slightly larger set of strings that may misfire. Prior to this change, a test with the string " %a =" would be replaced. Reviewers: spatel, chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28384 llvm-svn: 291357
* [Bitcode] Remove unused PlaceHolder parameter to lazyLoadModuleMetadataBlock()Mehdi Amini2017-01-071-4/+4
| | | | llvm-svn: 291356
* [CostModel][X86] Merge separate AVX1 cost LUTs. NFCI.Simon Pilgrim2017-01-071-38/+30
| | | | llvm-svn: 291355
* [CostModel][AVX512BW] Add v32i16 vector shift costs for avx512bw targets.Simon Pilgrim2017-01-074-12/+16
| | | | llvm-svn: 291354
* [CostModel][X86] Added missing AVX2 arithmetic costs.Simon Pilgrim2017-01-071-23/+33
| | | | | | Allows us to correctly fall through to the lower AVX1 costs if look up failed. llvm-svn: 291353
* [CostModel][X86] Reordered AVX1 arithmetic cost LUT into descending target ↵Simon Pilgrim2017-01-071-27/+27
| | | | | | order. NFCI. llvm-svn: 291352
* NewGVN: Make sure we properly lookup operand leaders while creatingDaniel Berlin2017-01-073-13/+478
| | | | | | | congruence classes for stores, and then keep them up to date. Add testcases. llvm-svn: 291351
* Fix dereferencing of pointers to empty classesTamas Berghammer2017-01-074-30/+110
| | | | llvm-svn: 291350
* Remove an incorrect byte size calculation in DWARFASTParserClangTamas Berghammer2017-01-071-1/+1
| | | | llvm-svn: 291349
* Attempt to fix windows buildbotSimon Pilgrim2017-01-071-0/+2
| | | | llvm-svn: 291348
* [X86][AVX512] Use lowerShuffleAsRepeatedMaskAndLanePermute for non-VBMI ↵Simon Pilgrim2017-01-074-10/+10
| | | | | | v64i8 shuffles (PR31470) llvm-svn: 291347
* tsan: Introducing a function to flush the shadow memory from third-party ↵Dmitry Vyukov2017-01-073-0/+7
| | | | | | | | | | | | libraries As discussed with Dmitry (https://goo.gl/SA4izd), I would like to introduce a function to be called from a third-party library to flush the shadow memory. In particular, we ran some experiments with our tool Archer (an OpenMP data race detector based on Tsan, https://github.com/PRUNER/archer) and flushing the memory at the end of an outer parallel region, slightly increase the runtime overhead, but reduce the memory overhead of about 30%. This feature would come very handy in case of very large OpenMP applications that may cause an "out of memory" exception when checked with Tsan. Reviewed in: https://reviews.llvm.org/D28443 Author: Simone Atzeni (simoatze) llvm-svn: 291346
* Replace identifiers called `__out` because Windows.h #defines it.Eric Fiselier2017-01-075-51/+58
| | | | | | | | Windows is greedy and it defines the identifier `__out` as a macro. This patch renames all conflicting libc++ identifiers in order to correctly work on Windows. llvm-svn: 291345
* Added "Michael Park" to `CREDITS.TXT`.Michael Park2017-01-071-0/+4
| | | | | | | | | | Summary: Test commit + give myself credit. Reviewers: EricWF Differential Revision: https://reviews.llvm.org/D28431 llvm-svn: 291344
* [libc++] Implement terminate(), unexpected() and uncaught_exceptions() on ↵Eric Fiselier2017-01-071-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | Windows Summary: This patch implements the following functions on Windows by forwarding to the MSVCRT: * `get_terminate()` * `set_terminate()` * `terminate()` * `set_unexpected()` * `get_unexpected()` * `unexpected()` * `uncaught_exception()` * `uncaught_exceptions()` Reviewers: compnerd, rnk, majnemer, smeenai Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28442 llvm-svn: 291343
* Ensure Sleep(...) isn't passed the value 0 on WindowsEric Fiselier2017-01-071-1/+1
| | | | llvm-svn: 291342
* TarWriter: Use fitsInUstar function.Rui Ueyama2017-01-071-2/+2
| | | | | | This change should have been commit as part of r291340. llvm-svn: 291341
* TarWriter: Use Ustar header's "prefix" field to store long filenames.Rui Ueyama2017-01-071-1/+27
| | | | | | | | | | | | Tar's Ustar header has the "prefix" field to store a directory part of a filename. It is not as flexible as the PAX-extended filename because there's still a limitation on the maximum filename size, but it mitigates the situation. This patch should unbreak some Windows buildbots that uses very old tar command. llvm-svn: 291340
* Follow-up for r291277: Redirect otool output to stderr.Kuba Mracek2017-01-071-1/+1
| | | | | | Tests need to output everything into a single stream, or FileCheck is sometimes confused (buffering can cause stdout/stderr to be interleaved randomly). llvm-svn: 291339
* [X86] Disable load unfolding for 128-bit MOVDDUP instructions since the load ↵Craig Topper2017-01-071-2/+2
| | | | | | size is smaller than the register size so unfolding would increase the load size. llvm-svn: 291338
* Explicitly specify MSVC mangling of iostream globals. Patch from Dave LeeEric Fiselier2017-01-071-10/+42
| | | | llvm-svn: 291337
* system_error: correct ELAST emulation on WindowsSaleem Abdulrasool2017-01-071-1/+1
| | | | | | | | | | ELAST should point to the last valid error string value. However, `_sys_nerr` provides the number of elements in the errlist array. Since the index is 0-based, this is off-by-one. Adjust it accordingly. Thanks to David Majnemer for catching this! llvm-svn: 291336
* Fix a typo. NFCXin Tong2017-01-071-1/+1
| | | | llvm-svn: 291335
* NewGVN: Reformat and fix a few newlinesDaniel Berlin2017-01-071-2/+3
| | | | llvm-svn: 291334
* provide Win32 native threadingSaleem Abdulrasool2017-01-073-9/+263
| | | | | | | | | | | Add an implementation for the Win32 threading model as a backing API for the internal c++ threading interfaces. This uses the Fls* family for the TLS (which has the support for adding termination callbacks), CRITICAL_SECTIONs for the recursive mutex, and Slim Reader/Writer locks (SRW locks) for non-recursive mutexes. These APIs should all be available on Vista or newer. llvm-svn: 291333
* [libc++] Tolerate presence of __deallocate macroEric Fiselier2017-01-079-52/+21
| | | | | | | | | | | | | | | Summary: On Windows the identifier `__deallocate` is defined as a macro by one of the Windows system headers. Previously libc++ worked around this by `#undef __deallocate` and generating a warning. However this causes the WIN32 version of `__threading_support` to always generate a warning on Windows. This is not OK. This patch renames all usages of `__deallocate` internally as to not conflict with the macro. Reviewers: mclow.lists, majnemer, rnk, rsmith, smeenai, compnerd Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28426 llvm-svn: 291332
* thread: implement sleep_for on WindowsSaleem Abdulrasool2017-01-071-0/+7
| | | | | | | | | | Windows does not provide an implementation of `nanosleep`. Round up the time duration to the nearest ms and use `Sleep`. Although this may over-sleep, there is no hard real-time guarantee on the wake, so sleeping a bit more is better than under-sleeping as it within the specification. llvm-svn: 291331
* [libc++] Correct macro name in documenationShoaib Meenai2017-01-071-1/+1
| | | | | | | The macro is named `_LIBCPP_TEMPLATE_VIS`, not `_LIBCPP_TEMPLATE_ONLY`. No functional change. llvm-svn: 291330
* Add _LIBCPP_ABI_[ITANIUM|MICROSOFT] macros.Eric Fiselier2017-01-071-0/+9
| | | | | | | | | | This patch adds a libc++ configuration macro for the ABI we are targeting, either Itanium or Microsoft. For now we configure for the Microsoft ABI when on Windows with a compiler that defines _MSC_VER. However this is only temporary until Clang implements builtin macros we can use. llvm-svn: 291329
* [NewGVN] Prefer auto over explicit type. NFCI.Davide Italiano2017-01-071-1/+1
| | | | llvm-svn: 291328
* [WebAssembly] Don't abort on code with UB.Dan Gohman2017-01-073-7/+44
| | | | | | | | Gracefully leave code that performs function-pointer bitcasts implying non-trivial pointer conversions alone, rather than aborting, since it's just undefined behavior. llvm-svn: 291326
* [WebAssembly] Move a SmallVector to a more specific scope. NFC.Dan Gohman2017-01-071-2/+2
| | | | llvm-svn: 291324
* LowerTypeTests: Thread summary and action from the API and command line into ↵Peter Collingbourne2017-01-073-38/+87
| | | | | | | | | | | the pass. Also move command line handling out of the pass constructor and into a separate function. Differential Revision: https://reviews.llvm.org/D28422 llvm-svn: 291323
* [libcxx] [test] Strip trailing whitespace. NFC, no code review.Stephan T. Lavavej2017-01-075-8/+8
| | | | llvm-svn: 291322
* Remove useless Forward Declaration from header (NFC)Mehdi Amini2017-01-071-1/+0
| | | | llvm-svn: 291321
* [AVR] Parenthesize a boolean expressionDylan McKay2017-01-071-2/+2
| | | | | | | Without the parentheses, clang would emit warnings while compiling the code. llvm-svn: 291320
* PR20090: Add (passing) test from this bug; it's been fixed for a while.Richard Smith2017-01-071-0/+7
| | | | llvm-svn: 291319
* PR23135: Don't instantiate constexpr functions referenced in unevaluated ↵Richard Smith2017-01-0715-117/+218
| | | | | | | | | | | | | | | | | | | | | operands where possible. This implements something like the current direction of DR1581: we use a narrow syntactic check to determine the set of places where a constant expression could be evaluated, and only instantiate a constexpr function or variable if it's referenced in one of those contexts, or is odr-used. It's not yet clear whether this is the right set of syntactic locations; we currently consider all contexts within templates that would result in odr-uses after instantiation, and contexts within list-initialization (narrowing conversions take another victim...), as requiring instantiation. We could in principle restrict the former cases more (only const integral / reference variable initializers, and contexts in which a constant expression is required, perhaps). However, this is sufficient to allow us to accept libstdc++ code, which relies on GCC's behavior (which appears to be somewhat similar to this approach). llvm-svn: 291318
* [MachineBasicBlock] Add a non-assert live-in accessor for debug mode.Quentin Colombet2017-01-071-0/+10
| | | | | | | | | With r291169, it is now not possible to access the live-in information when the liveness is not properly tracked. Although this is want we want in general, for debugging purpose we may want to still be able to traverse this information even if it may not be accurate. llvm-svn: 291317
* Revert "Enable weak hooks on darwin"Francis Ricci2017-01-079-42/+1
| | | | | | | | Reverts accidental upload. This reverts commit 421408c0f2cc811bcf9a945be6e95e46f76cb358. llvm-svn: 291316
* [WebAssembly] Add a pass to create wrappers for function bitcasts.Dan Gohman2017-01-075-0/+210
| | | | | | | | | | | | WebAssembly requires caller and callee signatures to match exactly. In LLVM, there are a variety of circumstances where signatures may be mismatched in practice, and one can bitcast a function address to another type to call it as that type. This patch adds a pass which replaces bitcasted function addresses with wrappers to replace the bitcasts. This doesn't catch everything, but it does match many common cases. llvm-svn: 291315
* Enable weak hooks on darwinFrancis Ricci2017-01-079-1/+42
| | | | | | | | | | | | | | | | Summary: By default, darwin requires a definition for weak interface functions at link time. Adding the '-U' link flag with each weak function allows these weak interface functions to be used without definitions, which mirrors behavior on linux and windows. Reviewers: compnerd, eugenis Subscribers: kubabrecka, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D28203 llvm-svn: 291314
* Provide default implementations for sanitizer interface functionsFrancis Ricci2017-01-072-0/+18
| | | | | | | | | | | | | | Summary: Adds a few default implementations for weak interface functions on platforms where weak hooks are not supported. Reviewers: eugenis, samsonov, timurrrr Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28201 llvm-svn: 291313
* Test commit. Comment formatting, it's -> its.Jacob Gravelle2017-01-071-2/+1
| | | | llvm-svn: 291312
* Get all tuple tests passing on WindowsEric Fiselier2017-01-072-2/+3
| | | | llvm-svn: 291311
* [ThinLTO] Specify target triple in new testTeresa Johnson2017-01-071-1/+1
| | | | | | This should fix bot failures in this test. llvm-svn: 291310
OpenPOWER on IntegriCloud