summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* add skylakeClement Courbet2017-04-211-2/+3
| | | | llvm-svn: 300962
* add 32 bit testsClement Courbet2017-04-211-8/+10
| | | | llvm-svn: 300961
* use repmovsb when optimizing forminsizeClement Courbet2017-04-212-8/+57
| | | | llvm-svn: 300960
* Rename FastString flag.Clement Courbet2017-04-216-14/+17
| | | | llvm-svn: 300959
* add more testsClement Courbet2017-04-211-0/+4
| | | | llvm-svn: 300958
* X86 memcpy: use REPMOVSB instead of REPMOVS{Q,D,W} for inline copiesClement Courbet2017-04-216-1/+35
| | | | | | | | | | | | when the subtarget has fast strings. This has two advantages: - Speed is improved. For example, on Haswell thoughput improvements increase linearly with size from 256 to 512 bytes, after which they plateau: (e.g. 1% for 260 bytes, 25% for 400 bytes, 40% for 508 bytes). - Code is much smaller (no need to handle boundaries). llvm-svn: 300957
* [DWARF] - Refactoring: localize handling of relocations in a single place.George Rimar2017-04-216-41/+32
| | | | | | | | | | | This is splitted from D32228, currently DWARF parsers code has few places that applied relocations values manually. These places has similar duplicated code. Patch introduces separate method that can be used to obtain relocated value. That helps to reduce code and simplifies things. Differential revision: https://reviews.llvm.org/D32284 llvm-svn: 300956
* Revert r300889, r300906, r300935, r300939Diana Picus2017-04-212-44/+13
| | | | | | | | | | | | | | | | | | | | | | | | | At least one of the ARM bots is still broken: Command Output (stderr): -- /home/buildslave/buildslave/clang-cmake-armv7-a15-full/llvm/projects/compiler-rt/test/asan/TestCases/Posix/strchr.c:31:12: error: expected string not found in input // CHECK: strchr.c:[[@LINE-2]] ^ <stdin>:3:59: note: scanning from here ==16297==ERROR: AddressSanitizer: SEGV on unknown address 0xb5add000 (pc 0xb6dccaa4 bp 0xbe8c19c8 sp 0xbe8c1570 T0) ^ <stdin>:3:59: note: with expression "@LINE-2" equal to "29" ==16297==ERROR: AddressSanitizer: SEGV on unknown address 0xb5add000 (pc 0xb6dccaa4 bp 0xbe8c19c8 sp 0xbe8c1570 T0) ^ <stdin>:5:57: note: possible intended match here #0 0xb6dccaa3 in strlen /build/glibc-f8FFOS/glibc-2.23/string/../sysdeps/arm/armv6t2/strlen.S:82 Try to fix by reverting r300889 and subsequent fixes: Revert "[asan] Fix test by removing "The signal is caused" check." Revert "[asan] Fix test on ppc64le-linux by checking "UNKNOWN memory access"" Revert "[asan] Match BUS and SIGV to fix test on Darwin" Revert "[asan] Optimize strchr for strict_string_checks=false" llvm-svn: 300955
* Delete dead codeClement Courbet2017-04-211-15/+1
| | | | llvm-svn: 300952
* [Thumb1] The recently added tADCS and tSBCS pseudo-instructions were missing ↵Artyom Skrobov2017-04-212-1/+33
| | | | | | | | | | | | | | `Uses = [CPSR]` Summary: Thanks to Oliver Stannard for helping catch this. Reviewers: olista01, efriedma Subscribers: llvm-commits, rengolin Differential Revision: https://reviews.llvm.org/D31815 llvm-svn: 300951
* [AsmWriter] Eliminate warning. NFCSerguei Katkov2017-04-211-4/+4
| | | | | | | | | | | | | | This patch eliminates the following warning lib/IR/AsmWriter.cpp:1128:57: warning: suggest parentheses around '&&' within '||' [-Wparentheses] (StrVal[1] >= '0' && StrVal[1] <= '9')) && Reviewers: timshen, rnk, davide Reviewed By: davide Subscribers: davide, llvm-commits Differential Revision: https://reviews.llvm.org/D32337 llvm-svn: 300950
* [index] Take advantage of 'external_source_symbol' attribute for indexing ↵Argyrios Kyrtzidis2017-04-217-45/+207
| | | | | | | | | purposes - Ignore decls marked as 'generated_declaration' - Include the 'defined_in' in the USR for additional namespacing llvm-svn: 300949
* [index] For 'transparent' tag typedefs, ignore their tag referenceArgyrios Kyrtzidis2017-04-212-3/+5
| | | | llvm-svn: 300948
* [MSSA] Clean up the updater a bit. NFCGeorge Burgess IV2017-04-211-5/+4
| | | | | | | | - Mark an internal function static - Remove the llvm namespace (just holding on to the `using namespace llvm;` Works on My Machine(TM)) llvm-svn: 300947
* [PartialInliner] Fix crash when inlining functions with unreachable blocks.Davide Italiano2017-04-212-12/+51
| | | | | | | | | | | | | | | | CodeExtractor looks up the dominator node corresponding to return blocks when splitting them. If one of these blocks is unreachable, there's no node in the Dom and CodeExtractor crashes because it doesn't check for domtree node validity. In theory, we could add just a check for skipping null DTNodes in `splitReturnBlock` but the fix I propose here is slightly different. To the best of my knowledge, unreachable blocks are irrelevant for the algorithm, therefore we can just skip them when building the candidate set in the constructor. Differential Revision: https://reviews.llvm.org/D32335 llvm-svn: 300946
* [BPI] Add multiplication by scalar operators to BranchProbabilitySerguei Katkov2017-04-212-0/+60
| | | | | | | | | | | | | | | This patch just adds two operators to BranchProbability class: (BP * scalar) and (BP *= scalar). Reviewers: junbuml, chandlerc, sanjoy, vsk Reviewed By: chandlerc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D32334 llvm-svn: 300945
* update XFAIL comments with more detailsEric Fiselier2017-04-212-5/+3
| | | | llvm-svn: 300944
* [AsmWriter/APFloat] FP constant printing: Avoid usage of locale dependent ↵Serguei Katkov2017-04-214-37/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | snprinf This should fix the bug https://bugs.llvm.org/show_bug.cgi?id=12906 To print the FP constant AsmWriter does the following: 1) convert FP value to String (actually using snprintf function which is locale dependent). 2) Convert String back to FP Value 3) Compare original and got FP values. If they are not equal just dump as hex. The problem happens on the 2nd step when APFloat does not expect group delimiter or fraction delimiter other than period symbol and so on, which can be produced on the first step if LLVM library is used in an environment with corresponding locale set. To fix this issue the locale independent APFloat:toString function is used. However it prints FP values slightly differently than snprintf does. Specifically it suppress trailing zeros in significant, use capital E and so on. It results in 117 test failures during make check. To avoid this I've also updated APFloat.toString a bit to pass make check at least. Reviewers: sberg, bogner, majnemer, sanjoy, timshen, rnk Reviewed By: timshen, rnk Subscribers: rnk, llvm-commits Differential Revision: https://reviews.llvm.org/D32276 llvm-svn: 300943
* Mark exception_ptr tests as XFAIL on Windows for nowEric Fiselier2017-04-2110-1/+31
| | | | llvm-svn: 300942
* XFAIL Windows test failures under test/libcxxEric Fiselier2017-04-2114-3/+53
| | | | | | | | This patch XFAIL's a number of tests under test/libcxx when on Windows. These failures need more investigation or patches to either Clang or libc++ but for now we don't want them to prevent the bot from going green. llvm-svn: 300941
* Revert r300932 and r300930.Akira Hatanaka2017-04-219-281/+59
| | | | | | | | | It seems that r300930 was creating an infinite loop in dag-combine when compling the following file: MultiSource/Benchmarks/MiBench/consumer-typeset/z21.c llvm-svn: 300940
* [asan] Fix test by removing "The signal is caused" check.Vitaly Buka2017-04-211-2/+1
| | | | llvm-svn: 300939
* [modules] Properly look up the owning module for an instantiation of a ↵Richard Smith2017-04-216-40/+80
| | | | | | | | | | | | | | | merged template. When looking for the template instantiation pattern of a templated entity, consistently select the definition of the pattern if there is one. This means we'll pick the same owning module when we start instantiating a template that we'll later pick when determining which modules are visible during that instantiation. This reinstates r300650, reverted in r300659, with a fix for a regression reported by Chandler after commit. llvm-svn: 300938
* Resolve unused local typedef warning in test.Billy Robert O'Neal III2017-04-211-1/+0
| | | | llvm-svn: 300937
* [analyzer] Fix assert in ExprEngine::processSwitchAlexander Shaposhnikov2017-04-212-2/+15
| | | | | | | | | | | | | | | This diff replaces getTypeSize(CondE->getType())) with getIntWidth(CondE->getType())) in ExprEngine::processSwitch. These calls are not equivalent for bool, see ASTContext.cpp Add a test case. Test plan: make check-clang-analysis make check-clang Differential revision: https://reviews.llvm.org/D32328 llvm-svn: 300936
* [asan] Fix test on ppc64le-linux by checking "UNKNOWN memory access"Vitaly Buka2017-04-211-1/+1
| | | | llvm-svn: 300935
* Fix 'verify-support' available featureEric Fiselier2017-04-211-2/+2
| | | | llvm-svn: 300934
* Disable LSan on ppc64, some tests are failing.Alex Shlyapnikov2017-04-213-5/+4
| | | | llvm-svn: 300933
* [AArch64] Use suffix ULL to shift a 64-bit value.Akira Hatanaka2017-04-211-1/+1
| | | | llvm-svn: 300932
* [CodeExtractor] Remove an unneeded level of indirection. NFCI.Davide Italiano2017-04-211-11/+6
| | | | llvm-svn: 300931
* [AArch64] Improve code generation for logical instructions takingAkira Hatanaka2017-04-219-59/+281
| | | | | | | | | | | | | | | | | | | | immediate operands. This commit adds an AArch64 dag-combine that optimizes code generation for logical instructions taking immediate operands. The optimization uses demanded bits to change a logical instruction's immediate operand so that the immediate can be folded into the immediate field of the instruction. This recommits r300913, which broke bots because I didn't fix a call to ShrinkDemandedConstant in SIISelLowering.cpp after changing the APIs of TargetLoweringOpt and TargetLowering. rdar://problem/18231627 Differential Revision: https://reviews.llvm.org/D5591 llvm-svn: 300930
* Revert "Enable lsan test suite on Darwin x86_64 builds"Ahmed Bougacha2017-04-213-13/+4
| | | | | | | | This reverts commit r300897. Most LSan/ASan tests are failing on darwin bots. llvm-svn: 300929
* Revert r300746 (SCEV analysis for or instructions).Eli Friedman2017-04-202-44/+22
| | | | | | | | There have been multiple reports of this causing problems: a compile-time explosion on the LLVM testsuite, and a stack overflow for an opencl kernel. llvm-svn: 300928
* [InstCombine] Remove the zextOrTrunc from ShrinkDemandedConstant.Craig Topper2017-04-201-4/+2
| | | | | | | | The demanded mask and the constant should always be the same width for all callers today. Also stop copying the demanded mask as its passed in. We should avoid allocating memory unless we are going to do something. The final AND to create the new constant will take care of it. llvm-svn: 300927
* [asan] move textdomain.c to Linux dir, as the test is Linux-specificKostya Serebryany2017-04-201-0/+0
| | | | llvm-svn: 300926
* Fix PR25874 - cxa_thread_atexit_test.pass.cpp has an incorrect XFAIL.Eric Fiselier2017-04-204-10/+0
| | | | llvm-svn: 300925
* sanitizer: fix crash with textdomain(NULL) interceptorKostya Serebryany2017-04-202-1/+11
| | | | | | | | | | | | | | | | | | Summary: The textdomain function accepts a NULL parameter (and should then return the current message domain). Add a check for this and include ASAN tests. Link: https://github.com/google/sanitizers/issues/787 Reviewers: m.guseva, kcc Reviewed By: kcc Subscribers: kubamracek Differential Revision: https://reviews.llvm.org/D32318 llvm-svn: 300924
* X86RegisterInfo: eliminateFrameIndex: Avoid code duplication; NFCMatthias Braun2017-04-203-35/+23
| | | | | | | | | | | | | | X86RegisterInfo::eliminateFrameIndex() and X86FrameLowering::getFrameIndexReference() both had logic to compute the base register. This consolidates the code. Also use MachineInstr::isReturn instead of manually enumerating tail call instructions (return instructions were not included in the previous list because they never reference frame indexes). Differential Revision: https://reviews.llvm.org/D32206 llvm-svn: 300923
* X86RegisterInfo: eliminateFrameIndex: Force SP for AfterFPPop; NFCMatthias Braun2017-04-201-3/+4
| | | | | | | | | | | | | AfterFPPop is used for tailcall/tailjump instructions. We shouldn't ever have frame-pointer/base-pointer relative addressing for those. After all the frame/base pointer should already be restored to their previous values at the return. Make this fact explicit in preparation for an upcoming refactoring. Differential Revision: https://reviews.llvm.org/D32205 llvm-svn: 300922
* [libc++] Default to vcruntime when targeting MSVCShoaib Meenai2017-04-201-11/+9
| | | | | | | | | | | | Summary: libc++abi is never the right option for LIBCXX_TARGETING_MSVC, since it targets the Itanium ABI, whereas MSVC uses the Microsoft ABI. Make the default ABI be vcruntime when targeting MSVC even if libc++abi is present in the tree. Differential Revision: https://reviews.llvm.org/D32320 llvm-svn: 300921
* Fix ATOMIC_<TYPE>_LOCK_FREE macros on Windows.Eric Fiselier2017-04-201-10/+23
| | | | | | | | | | | | Previously the ATOMIC_<TYPE>_LOCK_FREE macros were implemented using __GCC_ATOMIC_<TYPE>_LOCK_FREE but GCC specific macros are defined when -fms-compatibility is specified. To avoid this Libc++ now tries to use the newly added __CLANG_ATOMIC_<TYPE>_LOCK_FREE macros instead, and only falls back to the GCC versions when the Clang ones aren't available. llvm-svn: 300920
* Use __CLANG_ATOMIC_TYPE_LOCK_FREE macros in `stdatomic.h`Eric Fiselier2017-04-202-10/+11
| | | | | | | | | | | | | | Summary: This patch makes the header `stdatomic.h` work when `-fms-compatibility` is specified. Reviewers: rsmith Reviewed By: rsmith Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D32322 llvm-svn: 300919
* Fix typo in commentSanjoy Das2017-04-201-1/+1
| | | | llvm-svn: 300918
* [CMake] Enable ARM target in Fuchsia toolchainPetr Hosek2017-04-201-1/+3
| | | | | | | | | This is still used by some users of Fuchsia toolchain. Also include llc and opt which is useful for development and testing. Differential Revision: https://reviews.llvm.org/D32231 llvm-svn: 300917
* Revert "[AArch64] Improve code generation for logical instructions taking"Akira Hatanaka2017-04-208-280/+58
| | | | | | | | This reverts r300913. This broke bots. llvm-svn: 300916
* [Simplify] Add testcase to show that merging conditional stores for ↵Craig Topper2017-04-201-0/+39
| | | | | | triangles is sensitive to the order of the branch targets on the conditional branches. NFC llvm-svn: 300915
* Add __CLANG_ATOMIC_<TYPE>_LOCK_FREE macros for use in MSVC compatibility mode.Eric Fiselier2017-04-203-7/+75
| | | | | | | | | | | | | | | | | Summary: Libc++ currently implements the `ATOMIC_<TYPE>_LOCK_FREE` macros using the `__GCC_ATOMIC_<TYPE>_LOCK_FREE` macros. However these are not available when MSVC compatibility is enabled even though C11 `_Atomic` is. This prevents libc++ from correctly implementing `ATOMIC_<TYPE>_LOCK_FREE`. This patch adds an alternative spelling `__CLANG_ATOMIC_<TYPE>_LOCK_FREE` that is enabled with `-fms-compatibility`. Reviewers: rsmith, aaron.ballman, majnemer, zturner, compnerd, jfb, rnk Reviewed By: rsmith Subscribers: BillyONeal, smeenai, jfb, cfe-commits, dschuff Differential Revision: https://reviews.llvm.org/D32265 llvm-svn: 300914
* [AArch64] Improve code generation for logical instructions takingAkira Hatanaka2017-04-208-58/+280
| | | | | | | | | | | | | | | | immediate operands. This commit adds an AArch64 dag-combine that optimizes code generation for logical instructions taking immediate operands. The optimization uses demanded bits to change a logical instruction's immediate operand so that the immediate can be folded into the immediate field of the instruction. rdar://problem/18231627 Differential Revision: https://reviews.llvm.org/D5591 llvm-svn: 300913
* [InstCombine] function names start with lower-case letter; NFCSanjay Patel2017-04-202-3/+3
| | | | | | Forgot to make this fix with the signature change in r300911. llvm-svn: 300912
* [InstCombine] allow shl+shr demanded bits folds with splat constantsSanjay Patel2017-04-203-28/+21
| | | | llvm-svn: 300911
OpenPOWER on IntegriCloud