summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert r312898 "[ARM] Use ADDCARRY / SUBCARRY"Hans Wennborg2017-09-114-294/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | It caused PR34564. > This is a preparatory step for D34515 and also is being recommitted as its > first version caused PR34045. > > This change: > - makes nodes ISD::ADDCARRY and ISD::SUBCARRY legal for i32 > - lowering is done by first converting the boolean value into the carry flag > using (_, C) ← (ARMISD::ADDC R, -1) and converted back to an integer value > using (R, _) ← (ARMISD::ADDE 0, 0, C). An ARMISD::ADDE between the two > operations does the actual addition. > - for subtraction, given that ISD::SUBCARRY second result is actually a > borrow, we need to invert the value of the second operand and result before > and after using ARMISD::SUBE. We need to invert the carry result of > ARMISD::SUBE to preserve the semantics. > - given that the generic combiner may lower ISD::ADDCARRY and > ISD::SUBCARRYinto ISD::UADDO and ISD::USUBO we need to update their lowering > as well otherwise i64 operations now would require branches. This implies > updating the corresponding test for unsigned. > - add new combiner to remove the redundant conversions from/to carry flags > to/from boolean values (ARMISD::ADDC (ARMISD::ADDE 0, 0, C), -1) → C > - fixes PR34045 > > Differential Revision: https://reviews.llvm.org/D35192 llvm-svn: 312980
* Correct ALIGN expression when inside a section.Rafael Espindola2017-09-112-1/+15
| | | | | | | | | | | | | | | When given foobar = ALIGN(., 0x100); my expectation from what the manual says is that the final address of foobar will be aligned. It seems that bfd aligns the offset in the section, which causes some odd results if the section is not 0x100 aligned. Gold aligns the address. This changes lld to align the final address. llvm-svn: 312979
* bpf: add " ll" in the LD_IMM64 asmstringYonghong Song2017-09-119-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | This partially revert previous fix in commit f5858045aa0b ("bpf: proper print imm64 expression in inst printer"). In that commit, the original suffix "ll" is removed from LD_IMM64 asmstring. In the customer print method, the "ll" suffix is printed if the rhs is an immediate. For example, "r2 = 5ll" => "r2 = 5ll", and "r3 = varll" => "r3 = var". This has an issue though for assembler. Since assembler relies on asmstring to do pattern matching, it will not be able to distiguish between "mov r2, 5" and "ld_imm64 r2, 5" since both asmstring is "r2 = 5". In such cases, the assembler uses 64bit load for all "r = <val>" asm insts. This patch adds back " ll" suffix for ld_imm64 with one additional space for "#reg = #global_var" case. Signed-off-by: Yonghong Song <yhs@fb.com> Acked-by: Alexei Starovoitov <ast@kernel.org> llvm-svn: 312978
* Update testcases that are XFAILed on Darwin for llvm-dwarfdump changes.Adrian Prantl2017-09-112-2/+2
| | | | llvm-svn: 312977
* Update testcases for llvm-dwarfdump command line interface changeAdrian Prantl2017-09-112-3/+3
| | | | llvm-svn: 312976
* [llvm-cov] Try to fix a test on WindowsVedant Kumar2017-09-111-2/+2
| | | | | | | | | Failing bot: http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/4791 This looks like another stderr redirection issue. llvm-svn: 312975
* Update testcases for llvm-dwarfdump command line interface changeAdrian Prantl2017-09-116-6/+6
| | | | llvm-svn: 312974
* Runtime detection of android_set_abort_message.Evgeniy Stepanov2017-09-112-7/+7
| | | | | | | | | | | | | | | | | Summary: Use runtime detection (with a weak-undef symbol) of android_set_abort_message availability. Android NDK provides a single version of the ASan runtime library to be used for any target API level, which makes compile-time feature detection impossible (the library itself is built at API level 9). Reviewers: vitalybuka Subscribers: srhines, llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37716 llvm-svn: 312973
* llvm-dwarfdump: Make -brief the default and add a -verbose option instead.Adrian Prantl2017-09-11210-298/+301
| | | | | | Differential Revision: https://reviews.llvm.org/D37717 llvm-svn: 312972
* [CodeGen] Fix some Clang-tidy modernize-use-using and Include What You Use ↵Eugene Zelenko2017-09-1110-166/+243
| | | | | | warnings; other minor fixes (NFC). llvm-svn: 312971
* llvm-dwarfdump: Replace -debug-dump=sect option with individual options.Adrian Prantl2017-09-11229-367/+383
| | | | | | | | | | | | | | | | | | | | | | As discussed on llvm-dev in http://lists.llvm.org/pipermail/llvm-dev/2017-September/117301.html this changes the command line interface of llvm-dwarfdump to match the one used by the dwarfdump utility shipping on macOS. In addition to being shorter to type this format also has the advantage of allowing more than one section to be specified at the same time. In a nutshell, with this change $ llvm-dwarfdump --debug-dump=info $ llvm-dwarfdump --debug-dump=apple-objc becomes $ dwarfdump --debug-info --apple-objc Differential Revision: https://reviews.llvm.org/D37714 llvm-svn: 312970
* [llvm-cov] Allow hiding instantiation/region coverage from summary tablesEli Friedman2017-09-117-51/+78
| | | | | | | | | | | | | Region coverage is difficult to explain without going deep into how coverage is implemented. Instantiation coverage is easier to explain, but probably not useful in most cases (templates don't exist in C, and most C++ code contains relatively few templates). This patch adds the options "-show-region-summary" and "-show-instantiation-summary" to allow hiding those columns. "-show-instantiation-summary" is turned off by default. llvm-svn: 312969
* LowerTypeTests: Add import/export support for targets without absolute ↵Peter Collingbourne2017-09-1116-93/+303
| | | | | | | | | | symbol constants. The rationale is the same as for r312967. Differential Revision: https://reviews.llvm.org/D37408 llvm-svn: 312968
* WholeProgramDevirt: Add import/export support for targets without absolute ↵Peter Collingbourne2017-09-1110-32/+114
| | | | | | | | | | | | | | | | | | | symbol constants. Not all targets support the use of absolute symbols to export constants. In particular, ARM has a wide variety of constant encodings that cannot currently be relocated by linkers. So instead of exporting the constants using symbols, export them directly in the summary. The values of the constants are left as zeroes on targets that support symbolic exports. This may result in more cache misses when targeting those architectures as a result of arbitrary changes in constant values, but this seems somewhat unavoidable for now. Differential Revision: https://reviews.llvm.org/D37407 llvm-svn: 312967
* Ignore /natvis option for now.Rui Ueyama2017-09-112-0/+2
| | | | | | | | | | /natvis is a new command line option introduced by MSVC 2017. We eventually have to support it, but for now, let's ignore it so that we can at least link stuff instead of printing out an error. Patch by Michael Rickert. llvm-svn: 312966
* [codeview] omit debug locations for nested exprs unless column info enabledBob Haarman2017-09-114-0/+213
| | | | | | | | | | | | | | | | | | | | | | Summary: Microsoft Visual Studio expects debug locations to correspond to statements. We used to emit locations for expressions nested inside statements. This would confuse the debugger, causing it to stop multiple times on the same line and breaking the "step into specific" feature. This change inhibits the emission of debug locations for nested expressions when emitting CodeView debug information, unless column information is enabled. Fixes PR34312. Reviewers: rnk, zturner Reviewed By: rnk Subscribers: majnemer, echristo, aprantl, cfe-commits Differential Revision: https://reviews.llvm.org/D37529 llvm-svn: 312965
* Reorder functions so that related functions come closer.Rui Ueyama2017-09-111-19/+19
| | | | llvm-svn: 312964
* Rename COFFLdOptTable MinGWOptTable for consistency.Rui Ueyama2017-09-111-4/+4
| | | | llvm-svn: 312963
* Make the scope of an anonymous namespace as narrow as possible.Rui Ueyama2017-09-111-4/+2
| | | | llvm-svn: 312962
* Remove unused includes and do not enclose the entire file with a namespace.Rui Ueyama2017-09-111-8/+1
| | | | llvm-svn: 312961
* Fix MinGW/CMakeLists.txt.Rui Ueyama2017-09-111-4/+3
| | | | | | | | We do not use "Shim" as a name of MinGW driver, so rename it MinGW. I don't think the former dependency list was correct. MinGW driver depends on COFF. llvm-svn: 312960
* [ubsan-minimal] Enable on DarwinVedant Kumar2017-09-113-3/+6
| | | | | | | | Testing: check-ubsan-minimal Differential Revision: https://reviews.llvm.org/D37646 llvm-svn: 312959
* [Driver] Support ubsan-minimal on DarwinVedant Kumar2017-09-112-1/+10
| | | | | | | | Make it possible to use the minimal ubsan runtime on Darwin. Differential Revision: https://reviews.llvm.org/D37649 llvm-svn: 312958
* [ubsan-minimal] Document the new runtimeVedant Kumar2017-09-112-1/+17
| | | | | | Differential Revision: https://reviews.llvm.org/D37647 llvm-svn: 312957
* LLD: Add -mllvm flag to the MinGW driver.Martell Malone2017-09-113-0/+20
| | | | | | | | | | | This adds support for passing LTO flags to the MINGW driver in GNU LD style i.e. -mllvm flag -> /mllvm:flag Reviewers: ruiu, mstorsjo Differential Revision: https://reviews.llvm.org/D37712 llvm-svn: 312956
* [llvm-cov] Don't attach exec counts to lines which start a skipped regionVedant Kumar2017-09-114-1/+23
| | | | | | | | | These lines by definition don't have an execution count. This is the final part of the fix for: https://bugs.llvm.org/show_bug.cgi?id=34166 llvm-svn: 312955
* [ubsan] Make ubsan version of __sanitizer_print_stack_trace consistent with ↵Vitaly Buka2017-09-112-3/+3
| | | | | | | | | | | | | | other sanitizers Summary: Other sanitizers include __sanitizer_print_stack_trace into stack trace. Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37657 llvm-svn: 312954
* [ubsan] Save binary name before parsing optionsVitaly Buka2017-09-112-2/+1
| | | | | | | | | | | | Summary: To parser "include" we may need to do binary name substitution. Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37658 llvm-svn: 312953
* Revert "[ubsan] Save binary name before parsing options"Vitaly Buka2017-09-111-1/+1
| | | | | | | | Patch was corrupted by rebase. This reverts commit r312933 llvm-svn: 312952
* [compiler-rt] Move IsStackOverflow from asan into sanitizer_commonVitaly Buka2017-09-113-44/+49
| | | | | | | | | | | | Summary: Part of https://github.com/google/sanitizers/issues/637 Reviewers: eugenis, alekseyshl Subscribers: kubamracek, dberris, llvm-commits Differential Revision: https://reviews.llvm.org/D37536 llvm-svn: 312951
* [compiler-rt] Cleanup decoratorsVitaly Buka2017-09-119-71/+54
| | | | | | | | | | | | | | Summary: Removed redundant End*() methods which defined same way. Removed redundant Warning() methods. Reviewers: eugenis Subscribers: kubamracek, llvm-commits, dberris Differential Revision: https://reviews.llvm.org/D37549 llvm-svn: 312950
* Sort options.Rui Ueyama2017-09-112-7/+7
| | | | | | This patch also rename OPT_outlib OPT_out_implib for consistency. llvm-svn: 312949
* [pp-trace] Update skipped source ranges in testsVedant Kumar2017-09-114-20/+22
| | | | | | Depends on D36642 llvm-svn: 312948
* [Lexer] Report more precise skipped regions (PR34166)Vedant Kumar2017-09-1110-54/+104
| | | | | | | | | | | | | | | | | | | | This patch teaches the preprocessor to report more precise source ranges for code that is skipped due to conditional directives. The new behavior includes the '#' from the opening directive and the full text of the line containing the closing directive in the skipped area. This matches up clang's behavior (we don't IRGen the code between the closing "endif" and the end of a line). This also affects the code coverage implementation. See llvm.org/PR34166 (this also happens to be rdar://problem/23224058). The old behavior (report the end of the skipped range as the end location of the 'endif' token) is preserved for indexing clients. Differential Revision: https://reviews.llvm.org/D36642 llvm-svn: 312947
* [MinGW] Ignore the sysroot parameterMartin Storsjo2017-09-111-0/+1
| | | | | | | | | | | If the sysroot parameter is passed to the clang frontend, clang already uses it to find libraries and adds -L options for it, but also passes it on to the linker. Therefore we can get pretty far by just ignoring it altogether. Differential Revision: https://reviews.llvm.org/D37707 llvm-svn: 312945
* [MinGW] Map the -verbose option, implement -### for showing the produced ↵Martin Storsjo2017-09-113-2/+21
| | | | | | | | | | | | | | | parameters Pass the -verbose option through to the COFF linker, and show the arguments passed to it. If the -### option is specified, just show the produced argument list and exit, just like in clang. Replace the first argument with "lld-link" in order to produce a correct command line. Differential Revision: https://reviews.llvm.org/D37706 llvm-svn: 312944
* [InstSimplify] fix some test names; NFCSanjay Patel2017-09-113-56/+56
| | | | | | Too much division...the quotient is the answer. llvm-svn: 312943
* clang-rename: let -force handle multiple renamesMiklos Vajna2017-09-114-8/+18
| | | | | | | | | | | | | | | | | | | | | | | Summary: The use case is that renaming multiple symbols in a large enough codebase is much faster if all of these can be done with a single invocation, but there will be multiple translation units where one or more symbols are not found. Old behavior was to exit with an error (default) or exit without reporting an error (-force). New behavior is that -force results in a best-effort rename: rename symbols which are found and just ignore the rest. The existing help for -force sort of already implies this behavior. Reviewers: cfe-commits, klimek, arphaman Reviewed By: klimek Differential Revision: https://reviews.llvm.org/D37634 llvm-svn: 312942
* Driver: default to `-fno-use-cxatexit` on WindowsSaleem Abdulrasool2017-09-112-1/+28
| | | | | | | | | | This primarily impacts the Windows MSVC and Windows itanium environments. Windows MSVC does not use `__cxa_atexit` and Itanium follows suit. Simplify the logic for the default value calculation and blanket the Windows environments to default to off for use of `__cxa_atexit`. llvm-svn: 312941
* Improve readability of MinGW driver. NFC.Rui Ueyama2017-09-111-87/+69
| | | | | | | | | | | | | | Summary: In addition to removing a few global variables and functions, I believe this patch improves code readability a bit in general. Reviewers: mstorsjo, martell Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37699 llvm-svn: 312940
* [scudo] Fix improper TSD init after TLS destructors are calledKostya Kortchinsky2017-09-117-9/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Some of glibc's own thread local data is destroyed after a user's thread local destructors are called, via __libc_thread_freeres. This might involve calling free, as is the case for strerror_thread_freeres. If there is no prior heap operation in the thread, this free would end up initializing some thread specific data that would never be destroyed properly (as user's pthread destructors have already been called), while still being deallocated when the TLS goes away. As a result, a program could SEGV, usually in __sanitizer::AllocatorGlobalStats::Unregister, where one of the doubly linked list links would refer to a now unmapped memory area. To prevent this from happening, we will not do a full initialization from the deallocation path. This means that the fallback cache & quarantine will be used if no other heap operation has been called, and we effectively prevent the TSD being initialized and never destroyed. The TSD will be fully initialized for all other paths. In the event of a thread doing only frees and nothing else, a TSD would never be initialized for that thread, but this situation is unlikely and we can live with that. Reviewers: alekseyshl Reviewed By: alekseyshl Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D37697 llvm-svn: 312939
* [InstSimplify] add tests for possible sdiv/srem simplifications; NFCSanjay Patel2017-09-111-0/+354
| | | | | | | | | | As noted in PR34517, the handling of signed div/rem is not on par with unsigned div/rem. Signed is harder to reason about, but it should be possible to handle at least some of these using the same technique that we use for unsigned: use icmp logic to see if there's a relationship between the quotient and divisor. llvm-svn: 312938
* [asan] Include asan-dynamic into check-allVitaly Buka2017-09-111-9/+0
| | | | | | | | | | | | Summary: It's adds just 1k to about 45k tests. Reviewers: eugenis, alekseyshl Subscribers: kubamracek, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D37666 llvm-svn: 312937
* AMDGPU: Allow coldcc callsMatt Arsenault2017-09-112-0/+36
| | | | llvm-svn: 312936
* [mips][microMIPS] add lapc instructionPetar Jovanovic2017-09-1117-17/+60
| | | | | | | | | | Implement LAPC instruction for mips32r6, mips64r6 and micromips32r6. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D35984 llvm-svn: 312934
* [ubsan] Save binary name before parsing optionsVitaly Buka2017-09-111-1/+1
| | | | | | | | | | | | Summary: To parser "include" we may need to do binary name substitution. Reviewers: eugenis, alekseyshl Subscribers: llvm-commits, kubamracek Differential Revision: https://reviews.llvm.org/D37658 llvm-svn: 312933
* mark mersenne_twister_engine<>::seed(result_type __sd) with ↵Marshall Clow2017-09-111-0/+1
| | | | | | _LIBCPP_DISABLE_UBSAN_UNSIGNED_INTEGER_CHECK to placate UBSAN. Fixes PR#34160 llvm-svn: 312932
* Remove cross-target test dependency.Rui Ueyama2017-09-111-15/+18
| | | | | | Tests for MinGW shouldn't depend on files under test/COFF/Inputs. llvm-svn: 312931
* Unmerge GEPs to reduce register pressure on IndirectBr edges.Hiroshi Yamauchi2017-09-112-0/+227
| | | | | | | | | | | | | | | | | | | | | | | Summary: GEP merging can sometimes increase the number of live values and register pressure across control edges and cause performance problems particularly if the increased register pressure results in spills. This change implements GEP unmerging around an IndirectBr in certain cases to mitigate the issue. This is in the CodeGenPrepare pass (after all the GEP merging has happened.) With this patch, the Python interpreter loop runs faster by ~5%. Reviewers: sanjoy, hfinkel Reviewed By: hfinkel Subscribers: eastig, junbuml, llvm-commits Differential Revision: https://reviews.llvm.org/D36772 llvm-svn: 312930
* Unroll and separate the remaining parts of isolationRoman Gareev2017-09-115-180/+735
| | | | | | | | | | | | | | | | | | | | | | | | The remaining parts produced by the full partial tile isolation can contain hot spots that are worth to be optimized. Currently, we rely on the simple loop unrolling pass, LiCM and the SLP vectorizer to optimize such parts. However, the approach can suffer from the lack of the information about aliasing that Polly provides using additional alias metadata or/and the lack of the information required by simple loop unrolling pass. This patch is the first step to optimize the remaining parts. To do it, we unroll and separate them. In case of, for instance, Intel Kaby Lake, it helps to increase the performance of the generated code from 39.87 GFlop/s to 49.23 GFlop/s. The next possible step is to avoid unrolling performed by Polly in case of isolated and remaining parts and rely only on simple loop unrolling pass and the Loop vectorizer. Reviewed-by: Tobias Grosser <tobias@grosser.es> Differential Revision: https://reviews.llvm.org/D37692 llvm-svn: 312929
OpenPOWER on IntegriCloud