summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [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
* Fix linking of DLL's on WindowsEric Fiselier2017-01-073-23/+63
| | | | | | | | On Windows the runtime search path for DLL's is the same as PATH. This patch changes the test suite to add the libc++ build directory to the runtime PATH. llvm-svn: 291309
* NewGVN: Fix PR 31501.Daniel Berlin2017-01-073-38/+223
| | | | | | | | | | | | Summary: LLVM's non-standard notion of phi nodes means we can't both try to substitute for undef in phi nodes *and* use phi nodes as leaders all the time. This changes NewGVN to use the same semantics as SimplifyPHINode to decide which phi nodes are equivalent. Reviewers: davide Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28312 llvm-svn: 291308
* ModuleSummaryIndexYAML: Make a few fields optional to make it easier to ↵Peter Collingbourne2017-01-071-6/+6
| | | | | | write tests. llvm-svn: 291307
* Configure default ABI library as NONE on WindowsEric Fiselier2017-01-061-1/+6
| | | | llvm-svn: 291306
* Follow-up for r291277: Increase buffer size in uuid.cc testcase.Kuba Mracek2017-01-061-1/+1
| | | | | | 2048 should be enough for everyone. llvm-svn: 291305
* [ThinLTO] Handle conflicting local names gracefullyTeresa Johnson2017-01-064-6/+72
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: r285871 introduced an assert that was overly aggressive in the case of a same-named local in different same-named files (in different directories), where the source name and therefore the GUID ended up the same because the files were compiled in their own directory without any leading path. Change the handling in the promotion logic to get the summary for the version in that module. This also exposed an issue where we are not always importing the right copy, which is a performance not correctness issue (because the renaming is based on the module hash which must be different, see the bug report for details). I will fix that as a follow-on. Fixes PR31561. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28411 llvm-svn: 291304
* [ThinLTO] Optionally ignore empty index fileTeresa Johnson2017-01-062-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to simplify distributed build system integration, where actions may be scheduled before the Thin Link which determines the list of objects selected by the linker. The gold plugin currently will emit 0-sized index files for objects not selected by the link, to enable checking for expected output files by the build system. If the build system then schedules a backend action for these bitcode files, we want to be able to fall back to normal compilation instead of failing. Fallback is enabled under an option in LLVM (D28410), in which case a nullptr is returned from llvm::getModuleSummaryIndexForFile. Clang can just proceed with non-ThinLTO compilation in that case. I am investigating whether this can be addressed in our build system, but that is a longer term fix and so this enables a workaround in the meantime. Reviewers: mehdi_amini Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D28362 llvm-svn: 291303
* [ThinLTO] Optionally ignore empty index fileTeresa Johnson2017-01-061-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In order to simplify distributed build system integration, where actions may be scheduled before the Thin Link which determines the list of objects selected by the linker. The gold plugin currently will emit 0-sized index files for objects not selected by the link, to enable checking for expected output files by the build system. If the build system then schedules a backend action for these bitcode files, we want to be able to fall back to normal compilation instead of failing. This is the LLVM side support for optionally enabling fallback instead of issuing an error. Return a null CombinedIndex from llvm::getModuleSummaryIndexForFile under the option when the file is empty. Clang can then ignore the index when it is null. Clang patch is D28362. Reviewers: mehdi_amini Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28410 llvm-svn: 291302
* [PM] Edit comments on PM Proxy and utility classes.Justin Lebar2017-01-061-67/+60
| | | | | | | | | | Reviewers: chandlerc Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D27502 llvm-svn: 291301
* Add a cc1 option to force disabling lifetime-markers emission from clangMehdi Amini2017-01-066-1/+12
| | | | | | | | Summary: This intended as a debugging/development flag only. Differential Revision: https://reviews.llvm.org/D28385 llvm-svn: 291300
* [gtest] Detect warning flags using the positive spelling.Chandler Carruth2017-01-063-7/+7
| | | | | | | | | | | | | | | | | | | | | Some GCC versions will accept any warning flag name after a '-Wno-', which would cause us to try to disable warnings with names GCC didn't understand. This will silently succeed unless there is some other output from GCC in which case we get weird cc1plus warnings about the warning name being bogus. There is still the issue that gtest sets warning flags for building gtest-all.cc using weird 'add_definitions' and the fact that there is a GCC version which warns on the variadic macro usage in gtest under -pedantic, but has no flag analogous to Clang's -Wgnu-zero-variadic-macro-argumnets to suppress this warning. I haven't been able to come up with any good solution here. The closest is to turn off -pedantic for those versions of GCC, but that seems really nasty. For now, those versinos of GCC aren't warning clean. If anyone is broken by this, I'll work on CMake logic to detect and disable -pedantic in these cases. llvm-svn: 291299
* Fix breakage caused when _LIBCPP_HAS_THREAD_API_PTHREAD is manually definedEric Fiselier2017-01-061-4/+3
| | | | llvm-svn: 291298
* [BPF] Fix some Clang-tidy modernize and Include What You Use warnings; other ↵Eugene Zelenko2017-01-066-45/+42
| | | | | | minor fixes (NFC). llvm-svn: 291297
* [InstSimplify] Optimize away udivs in the presence of range metadataDavid Majnemer2017-01-062-0/+25
| | | | | | We know that udiv %V, C can be optimized away to 0 if %V is ult C. llvm-svn: 291296
* Revisit PR10177: don't instantiate a variable if it's only referenced in aRichard Smith2017-01-065-67/+75
| | | | | | | | | | | | | | dependent context and can't be used in a constant expression. Per C++ [temp.inst]p2, "the instantiation of a static data member does not occur unless the static data member is used in a way that requires the definition to exist". This doesn't /quite/ match that, as we still instantiate static data members that are usable in constant expressions even if the use doesn't require a definition. A followup patch will fix that for both variables and functions. llvm-svn: 291295
* Ensure that only one compiler-rt component is created for lsanFrancis Ricci2017-01-061-2/+1
| | | | | | | | | | | | | | | | Summary: The lsan cmake configuration failed when targeting more than one architecture, because it would attempt to create multiple components with the same name. Ensure that only one lsan component is ever created. Reviewers: beanz, bogner Subscribers: dberris, llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28151 llvm-svn: 291294
* Handle versioned undefined symbols.Rafael Espindola2017-01-063-6/+94
| | | | | | | In order to keep symbol lookup a simple name lookup this patch adds versioned symbols with an explicit @ to the symbol table. llvm-svn: 291293
* Follow-up for r291289: Fix failing global_metadata_darwin.ll testKuba Mracek2017-01-061-1/+1
| | | | llvm-svn: 291292
* Install lldb Python module on Windows.Zachary Turner2017-01-061-6/+9
| | | | | | | Patch by Vadim Chugunov Differential Revision: https://reviews.llvm.org/D27476 llvm-svn: 291291
* Convert MSF Stream iterators to use llvm iterator facade.Zachary Turner2017-01-061-40/+71
| | | | llvm-svn: 291290
* [asan] Change the visibility of ___asan_globals_registered to hiddenKuba Mracek2017-01-061-0/+1
| | | | | | | | This flag is used to track global registration in Mach-O and it doesn't need to be exported and visible. Differential Revision: https://reviews.llvm.org/D28250 llvm-svn: 291289
* Fix use after freeXin Tong2017-01-061-1/+1
| | | | | | | | | | | | Summary: Fix use after free in LoopUnswitch Reviewers: chenli, atrick, hfinkel, mzolotukhin Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D28412 llvm-svn: 291288
* [sanitizer] Use architecture/slice information when symbolizing fat Mach-O ↵Kuba Mracek2017-01-0612-36/+184
| | | | | | | | | | files on Darwin This patch starts passing architecture information about a module to llvm-symbolizer and into text reports. This fixes the longstanding x86_64/x86_64h mismatch issue on Darwin. Differential Revision: https://reviews.llvm.org/D27390 llvm-svn: 291287
* Add _LIBCPP_COMPILER_[CLANG|GCC|MSVC|IBM] macros.Eric Fiselier2017-01-065-32/+32
| | | | | | | | | | | | This patch refactors the compiler detection done in `__config` by creating a set of `_LIBCPP_COMPILER_<TYPE>` macros. The goal of this patch is to make it easier to detect what compiler is being used outside of `__config`. Additionally this patch removes workarounds for GCC in `__bit_reference`. I tested GCC 4.8 and 4.9 without the workaround and neither seemed to need it anymore. llvm-svn: 291286
* [llvm-config] Print --system-libs only when static linkingMichal Gorny2017-01-066-5/+17
| | | | | | | | | | | | | | | Modify the --system-libs option in llvm-config to print system libs only when using static linking. The system libraries are irrelevant when linking to a shared library since the library has appropriate library dependencies embedded. Modify the --system-libs test appropriately to force static linking, and disable it if static libs are not available (i.e. BUILD_SHARED_LIBS is enabled). Differential Revision: https://reviews.llvm.org/D27805 llvm-svn: 291285
* [cmake] Canonicalize CMake booleans to 0/1 for lit interopMichal Gorny2017-01-069-22/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Canonicalize all CMake booleans to 0/1 before passing them to lit, to ensure that the Python side handles all of them consistently and correctly. 0/1 is a safe choice of values that trigger the same boolean interpretation in CMake, Python and C++. Furthermore, using them without quotes improves the chance Python will explicitly fail when an incorrect value (such as ON/OFF, TRUE/FALSE, YES/NO) is accidentally passed, rather than silently misinterpreting the value. This replaces a lot of different logics spread around lit site files, attempting to partially reproduce the boolean logic used in CMake and usually silently failing when an uncommon value was used instead. In fact, some of them were never working correctly since different values were assigned in CMake and checked in Python. The alternative solution could be to create a common parser for CMake booleans in lit and use it consistently throughout the site files. However, it does not seem like the best idea to create redundant implementation of the same logic and have to follow upstream if it ever is extended to handle more values. Differential Revision: https://reviews.llvm.org/D28294 llvm-svn: 291284
* [test] Remove unused 'test_examples' config varMichal Gorny2017-01-062-5/+0
| | | | | | | | | Remove config.test_examples from lit.site.cfg and the relevant ENABLE_EXAMPLES definition from CMake. It is not used anywhere. Differential Revision: https://reviews.llvm.org/D28283 llvm-svn: 291283
* [InstSimplify] Optimize away urems in the presence of range metadataDavid Majnemer2017-01-063-24/+52
| | | | | | We know that urem %V, C can be optimized away to %V if %V is ult C. llvm-svn: 291282
* Fix LoopLoadElimination to keep original alignment on the inital hoisted storeMehdi Amini2017-01-062-4/+6
| | | | | | | | | | | This is fixing a bug where Loop Vectorization is widening a load but with a lower alignment. Hoisting the load without propagating the alignment will allow inst-combine to later deduce a higher alignment that what the pointer actually is. Differential Revision: https://reviews.llvm.org/D28408 llvm-svn: 291281
* [asan] Teach asan_symbolize.py to use :arch with atos and llvm-symbolizer on ↵Kuba Mracek2017-01-061-26/+51
| | | | | | | | | | Darwin This patch teaches asan_symbolize.py to read an architecture suffix on module names (e.g. ":x86_64") and pass that option to atos and llvm-symbolizer. Differential Revision: https://reviews.llvm.org/D27378 llvm-svn: 291280
* AMDGPU/R600: Don't use REGISTER_{LOAD,STORE} ISD nodesJan Vesely2017-01-068-368/+1162
| | | | | | | | This will make transition to SCRATCH_MEMORY easier Differential Revision: https://reviews.llvm.org/D24746 llvm-svn: 291279
* Replace _LIBCPP_HAS_NO_DELETED_FUNCTIONS with _LIBCPP_CXX03_LANGEric Fiselier2017-01-0612-50/+79
| | | | llvm-svn: 291278
* [sanitizer] Add a 'print_module_map' flag which prints modules with UUIDs on ↵Kuba Mracek2017-01-0612-11/+123
| | | | | | | | | | Darwin This patch add a new sanitizer flag, print_module_map, which enables printing a module map when the process exits, or after each report (for TSan). The output format is very similar to what Crash Reporter produces on Darwin (e.g. the format of module UUIDs). This enables users to use the existing symbol servers to offline symbolicate and aggregate reports. Differential Revision: https://reviews.llvm.org/D27400 llvm-svn: 291277
OpenPOWER on IntegriCloud