summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Reformat a comment. NFC.Stephane Sezer2017-11-131-2/+1
| | | | llvm-svn: 318079
* [tsan] Deadly signal handler for tsanVitaly Buka2017-11-138-36/+32
| | | | | | | | | | | | Summary: https://github.com/google/sanitizers/issues/637 Reviewers: eugenis Subscribers: kubamracek, llvm-commits Differential Revision: https://reviews.llvm.org/D39929 llvm-svn: 318078
* [sanitizer] Relax stack checkVitaly Buka2017-11-131-1/+1
| | | | | | -NEXT sometimes does not work as LLVMSymbolizer warning can appear there. llvm-svn: 318077
* [Reassociation] regenerate test checks; NFCSanjay Patel2017-11-131-54/+55
| | | | llvm-svn: 318076
* [clang] Remove redundant return [NFC]Mandeep Singh Grang2017-11-133-5/+0
| | | | | | | | | | | | | | Reviewers: rsmith, sfantao, mcrosier Reviewed By: mcrosier Subscribers: jholewinski, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D39915 llvm-svn: 318074
* Fix clang -Wsometimes-uninitialized warning in SCEV codeReid Kleckner2017-11-131-1/+1
| | | | | | | I don't believe this was a problem in practice, as it's likely that the boolean wasn't checked unless the backend condition was non-null. llvm-svn: 318073
* Remove a std::map and std::set that show up in LLD profilesReid Kleckner2017-11-133-3/+10
| | | | | | | | | | | | | | | | | | For GC roots, add a bit to SymbolBody to ensure that we don't add the same root twice, and switch to a vector. In addition to being faster, this may also fix some latent non-determinism. We iterate the GCRoot list later and it the order should be deterministic. For fixupExports, we can just use DenseMap. This is a simple string uniquing task, and we don't iterate the map. Reviewers: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39609 llvm-svn: 318072
* Disable GC and ICF when /debug is presentReid Kleckner2017-11-135-28/+54
| | | | | | | | | | | | | | | | | | | | | ICF and GC impair debugging, so MSVC disables these optimizations when /debug is passed. They are still on by default when no PDB is produced. This change also makes /opt:ref enable ICF, which is consistent with MSVC: https://msdn.microsoft.com/en-us/library/bxwfs976.aspx We should consider making /opt:icf fold readonly data in the near future. LLD used to do this, but we disabled it because it breaks too many programs. MSVC only does this if the user explicitly passes /opt:icf. Reviewers: ruiu, pcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D39885 llvm-svn: 318071
* NFC, Allow SystemZ SLP tests only when SystemZ is supported.Dinar Temirbulatov2017-11-131-0/+3
| | | | llvm-svn: 318070
* Create a TempFile class.Rafael Espindola2017-11-133-20/+107
| | | | | | | | | | | | | | | This just adds a TempFile class and replaces the use in FileOutputBuffer with it. The only difference for now is better error handling. Followup work includes: - Convert other user of temporary files to it. - Add support for automatically deleting on windows. - Add a createUnnamed method that returns a potentially unnamed file. It would be actually unnamed on modern linux and have a unknown name on windows. llvm-svn: 318069
* [globalisel][tablegen] Add support for extload.Daniel Sanders2017-11-132-14/+36
| | | | llvm-svn: 318068
* native_divide: provide function implementation instead of macroJan Vesely2017-11-135-1/+17
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318067
* native_recip: provide function implementation instead of macroJan Vesely2017-11-134-1/+18
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318066
* native_rsqrt: Switch implementation to 1 / native_sqrtJan Vesely2017-11-134-1/+18
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318065
* native_tan: Switch implementation to use native_sin/native_cosJan Vesely2017-11-134-9/+17
| | | | | | Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318064
* math: Use precomputed constant for log2(10.0)Jan Vesely2017-11-133-3/+11
| | | | | | | | exp10 CTS fails with or without this change Reviewer: Jeroen Ketema Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu> llvm-svn: 318063
* Try harder to delete the temporary file.Rafael Espindola2017-11-131-1/+2
| | | | | | | This changes COFF to use the output buffer that is reset by the error handler. llvm-svn: 318062
* Remove dead include.Rafael Espindola2017-11-131-1/+0
| | | | llvm-svn: 318061
* Try harder to delete the temporary file.Rafael Espindola2017-11-133-2/+8
| | | | | | | | | | | | | | | | | It is really hard to cover restarts in a debugger, SIGKILL or power failures. I will try to handle them in a followup patch, but it will not support all the systems lld has to run on. RemoveFileOnSignal takes care of crashes. So what is left is making sure all regular exits delete the file. This patch does that by moving the buffer to error handling. That is a bit of a hack, but seemed better than to generalize it to take a callback on construction. I will implement this on COFF on the next patch. llvm-svn: 318060
* fix printing of alias instructions by removing redundant spacingPetar Jovanovic2017-11-131-1/+3
| | | | | | | | | | | | Some alias instructions are printed with an extra space after the tab character. Fix this by skipping that space when the tab character is printed so that the instructions are aligned with the rest of the code. Patch by Milos Stojanovic. Differential Revision: https://reviews.llvm.org/D35946 llvm-svn: 318059
* [ValueTracking] use 'auto' with 'dyn_cast'; NFCSanjay Patel2017-11-131-11/+13
| | | | llvm-svn: 318058
* [X86] Allow X86ISD::Wrapper to be folded into the base of gather/scatter addressCraig Topper2017-11-132-58/+110
| | | | | | | | | | | | If the base of our gather corresponds to something contained in X86ISD::Wrapper we should be able to fold it into the address. This patch refactors some of the address matching to more fully use the X86ISelAddressMode struct and the getAddressOperands helper. A new helper function matchVectorAddress is added to call matchWrapper or fall back to matchAddressBase. We should also be able to support constant offsets from a wrapper, but I'll look into that in a future patch. We may even be able to completely reuse matchAddress here, but I wanted to start simple and work up to it. Differential Revision: https://reviews.llvm.org/D39927 llvm-svn: 318057
* [OpenMP] Remove the unused testsuite/ directoryJonathan Peyton2017-11-13161-15270/+0
| | | | | | | | | | The testsuite directory is not used or updated and confuses new users to the OpenMP project. These tests were rewritten using the lit format and put under the runtime/test directory. This patch removes the entire testsuite/ directory. Differential Revision: https://reviews.llvm.org/D39767 llvm-svn: 318056
* [ValueTracking] simplify code in CannotBeNegativeZero() with match(); NFCISanjay Patel2017-11-131-5/+3
| | | | llvm-svn: 318055
* [analyzer] ObjCGenerics: Don't warn on cast conversions involving explicit castDevin Coughlin2017-11-132-613/+580
| | | | | | | | | | | | | | | | | | | | | | The ObjCGenerics checker warns on a cast when there is no subtyping relationship between the tracked type of the value and the destination type of the cast. It does this even if the cast was explicitly written. This means the user can't write an explicit cast to silence the diagnostic. This commit treats explicit casts involving generic types as an indication from the programmer that the Objective-C type system is not rich enough to express the needed invariant. On explicit casts, the checker now removes any existing information inferred about the type arguments. Further, it no longer assumes the casted-to specialized type because the invariant the programmer specifies in the cast may only hold at a particular program point and not later ones. This prevents a suppressing cast from requiring a cascade of casts down the line. rdar://problem/33603303 Differential Revision: https://reviews.llvm.org/D39711 llvm-svn: 318054
* [Reassociate] add tests with 'reassoc' FMF; NFCSanjay Patel2017-11-135-3/+311
| | | | llvm-svn: 318053
* Fix netbsd, freebsd and osx builds for ArchSpec movePavel Labath2017-11-1314-19/+15
| | | | llvm-svn: 318052
* AMDGPU: Drop duplicate setOperationActionJan Vesely2017-11-131-2/+0
| | | | | | | | These are set with other scalar int ops few lines up Differential Revision: https://reviews.llvm.org/D39928 llvm-svn: 318051
* [SCEV] Handling for ICmp occuring in the evolution chain.Jatin Bhateja2017-11-133-8/+127
| | | | | | | | | | | | | | | | | | | | Summary: If a compare instruction is same or inverse of the compare in the branch of the loop latch, then return a constant evolution node. This shall facilitate computations of loop exit counts in cases where compare appears in the evolution chain of induction variables. Will fix PR 34538 Reviewers: sanjoy, hfinkel, junryoungju Reviewed By: sanjoy, junryoungju Subscribers: javed.absar, llvm-commits Differential Revision: https://reviews.llvm.org/D38494 llvm-svn: 318050
* Revert "[CodeGenPrepare] Check that erased sunken address are not reused"Simon Dardis2017-11-133-72/+1
| | | | | | This reverts commit r318032. The test broke some sanitizer bots. llvm-svn: 318049
* Move ArchSpec to the Utility modulePavel Labath2017-11-1393-204/+104
| | | | | | | | | | | | | The rationale here is that ArchSpec is used throughout the codebase, including in places which should not depend on the rest of the code in the Core module. This commit touches many files, but most of it is just renaming of #include lines. In a couple of cases, I removed the #include ArchSpec line altogether, as the file was not using it. In one or two places, this necessitated adding other #includes like lldb-private-defines.h. llvm-svn: 318048
* [ARM GlobalISel] Update legalizer testDiana Picus2017-11-131-130/+162
| | | | | | | | | | | | Make one of the legalizer tests a bit more robust by making sure all values we're interested in are used (either in a store or a return) and by using loads instead of constants for obtaining values on fewer than 32 bits. This should make the test less fragile to changes in the legalize combiner, since those loads are legal (as opposed to the constants, which were being widened and thus produced opportunities for the legalize combiner). llvm-svn: 318047
* Remove last Host usage from ArchSpecPavel Labath2017-11-135-13/+23
| | | | | | | | | | | | | | | | | | | | | | | Summary: In D39387, I was quick to jump to conclusion that ArchSpec has no external dependencies. It turns there still was one call to HostInfo::GetArchitecture left -- for implementing the "systemArch32" architecture and friends. Since GetAugmentedArchSpec is the place we handle these "incomplete" triples that don't specify os or vendor and "systemArch" looks very much like an incomplete triple, I move its handling there. After this ArchSpec *really* does not have external dependencies, and I'll move it to the Utility module as a follow-up. Reviewers: zturner, clayborg, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39896 llvm-svn: 318046
* [PowerPC][msan] Update msan to handle changed memory layouts in newer kernelsBill Seurer2017-11-131-1/+1
| | | | | | | | | | | | | In more recent Linux kernels (including those with 47 bit VMAs) the layout of virtual memory for powerpc64 changed causing the memory sanitizer to not work properly. This patch adjusts a bit mask in the memory sanitizer to work on the newer kernels while continuing to work on the older ones as well. This is the non-runtime part of the patch and finishes it. ref: r317802 Tested on several 4.x and 3.x kernel releases. llvm-svn: 318045
* [PowerPC][tsan] Update tsan to handle changed memory layouts in newer kernelsBill Seurer2017-11-131-36/+86
| | | | | | | | | | In more recent Linux kernels with 47 bit VMAs the layout of virtual memory for powerpc64 changed causing the thread sanitizer to not work properly. This patch adds support for 47 bit VMA kernels for powerpc64. Tested on several 4.x and 3.x kernel releases. llvm-svn: 318044
* Remove excess whitespace from syslog message; NFCStephan Bergmann2017-11-131-2/+2
| | | | llvm-svn: 318043
* [ThinLTO] Handle -fdebug-pass-manager for backend invocations via clangTeresa Johnson2017-11-132-0/+11
| | | | | | | | | | | | | Recommit of r317951 and r317951 along with what I believe should fix the remaining buildbot failures - the target triple should be specified for both the ThinLTO pre-thinlink compile and backend (post-thinlink) compile to ensure it is consistent. Original description: The LTO Config field wasn't being set when invoking a ThinLTO backend via clang (i.e. for distributed builds). llvm-svn: 318042
* Inserting a base test for X86 performance nopsOmer Paparo Bivas2017-11-131-0/+288
| | | | | Change-Id: I69da08b617d7fae8024c5aee04720eb465f39b81 llvm-svn: 318041
* CompilerType: Add ability to retrieve an integral template argumentPavel Labath2017-11-1320-155/+211
| | | | | | | | | | | | | | | | | | | | | | Summary: Despite it's name, GetTemplateArgument was only really working for Type template arguments. This adds the ability to retrieve integral arguments as well (which I've needed for the std::bitset data formatter). I've done this by splitting the function into three pieces. The idea is that one first calls GetTemplateArgumentKind (first function) to determine the what kind of a parameter this is. Based on that, one can then use specialized functions to retrieve the correct value. Currently, I only implement two of these: GetTypeTemplateArgument and GetIntegralTemplateArgument. Reviewers: jingham, clayborg Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D39844 llvm-svn: 318040
* Revert "[lldb] Use OrcMCJITReplacement rather than MCJIT as the underlying ↵Pavel Labath2017-11-131-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | JIT for LLDB" This commit really did not introduce any functional changes (for most people) but it turns out it's not for the reason we thought it was. The reason wasn't that Orc is a perfect drop-in replacement for MCJIT, but it was because we were never using Orc in the first place, as it was not initialized. Orc's initialization relies on a global constructor in the LLVMOrcJIT.a. Since this archive does not expose any symbols referenced from other object files, it does not get linked into liblldb when linking against llvm components statically. However, in an LLVM_LINK_LLVM_DYLIB=On build, LLVMOrcJit.a is linked into libLLVM.so using --whole-archive, so the global constructor does end up firing. The result of using Orc jit is pr34194, where lldb fails to evaluate even very simple expressions. This bug can be reproduced in non-LLVM_LINK_LLVM_DYLIB builds by making sure Orc jit is linked into liblldb, for example by #including llvm/ExecutionEngine/OrcMCJITReplacement.h in IRExecutionUnit.cpp (and adding OrcJIT as a dependency to the relevant CMakeLists.txt file). The bug reproduces (at least) on linux and osx. The root cause of the bug seems to be related to relocation processing. It seems Orc processes relocations earlier than the system it is replacing. This means the relocation processing happens before we have had a chance to remap section load addresses to reflect their address in the target process memory, so they end up pointing to locations in the lldb's address space instead. I am not sure whether this is a bug in Orc jit, or in how we are using it from lldb, but in any case it is preventing us from using Orc right now. Reverting this fixes LLVM_LINK_LLVM_DYLIB build, and makes it clear that we are in fact *not* using Orc, and we never really were. This reverts commit r279327. llvm-svn: 318039
* [asan] Add CMake hook to override shadow scale in compiler_rtWalter Lee2017-11-136-0/+31
| | | | | | | | | | | | Allow user to override shadow scale in compiler_rt by passing -DCOMPILER_RT_ASAN_SHADOW_SCALE=n to CMake. Propagate the override shadow scale value via a compiler define to compiler-rt and asan tests. Tests will use the define to partially disable unsupported tests. Set "-mllvm -asan-mapping-scale=<n>" for compiler_rt tests. Differential Revision: https://reviews.llvm.org/D39469 llvm-svn: 318038
* Allow compiler-rt test targets to work with multi-config CMake generatorsGreg Bedwell2017-11-136-14/+26
| | | | | | | | | | Multi-config CMake generators need lit to be able to resolve paths of artifacts from previous build steps at lit time, rather than expect them to be fully resolved at CMake time as they may contain the build mode. Differential Revision: https://reviews.llvm.org/D38471 llvm-svn: 318037
* [X86] test/testn intrinsics lowering to IR. llvm part.Uriel Korach2017-11-1315-625/+3169
| | | | | | | | | Remove builtins from llvm and add AutoUpgrade support. Also add fast-isel tests for the TEST and TESTN instructions. Differential Revision: https://reviews.llvm.org/D38736 llvm-svn: 318036
* [X86] test/testn intrinsics lowering to IR. clang sideUriel Korach2017-11-139-232/+244
| | | | | | | | | Change Header files of the intrinsics for lowering test and testn intrinsics to IR code. Removed test and testn builtins from clang Differential Revision: https://reviews.llvm.org/D38737 llvm-svn: 318035
* Move the setting of LLVM_BUILD_MODE to a macro so that we can re-use it in ↵Greg Bedwell2017-11-131-6/+10
| | | | | | | | compiler-rt Differential Revision: https://reviews.llvm.org/D38470 llvm-svn: 318034
* [ARM] Place jump table as the first operand in additionsMomchil Velikov2017-11-136-17/+16
| | | | | | | | | | | | When generating table jump code for switch statements, place the jump table label as the first operand in the various addition instructions in order to enable addressing mode selectors to better match index computation and possibly fold them into the addressing mode of the table entry load instruction. Differential revision: https://reviews.llvm.org/D39752 llvm-svn: 318033
* [CodeGenPrepare] Check that erased sunken address are not reusedSimon Dardis2017-11-133-1/+72
| | | | | | | | | | | | | | | | | | | | | | | CodeGenPrepare sinks address computations from one basic block to another and attempts to reuse address computations that have already been sunk. If the same address computation appears twice with the first instance as an operand of a load whose result is an operand to a simplifable select, CodeGenPrepare simplifies the select and recursively erases the now dead instructions. CodeGenPrepare then attempts to use the erased address computation for the second load. Fix this by erasing the cached address value if it has zero uses before looking for the address value in the sunken address map. This partially resolves PR35209. Thanks to Alexander Richardson for reporting the issue! Reviewers: john.brawn Differential Revision: https://reviews.llvm.org/D39841 llvm-svn: 318032
* ChangeJina Nahias2017-11-131-3/+3
| | | | | | | | | | // CHECK: shufflevector <8 x double> %0, <8 x double> %{{.*}}, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 8, i32 9> To // CHECK: shufflevector <8 x double> %{{.*}}, <8 x double> %{{.*}}, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 9, i32 8, i32 9> for fixing 318025 commit warning Change-Id: Id48a1fe1f247fe6a0b84e7189f18d2e637678e79 llvm-svn: 318031
* [analyzer] Document the issue hash debugging facilityGabor Horvath2017-11-131-0/+13
| | | | | | Differential Revision: https://reviews.llvm.org/D39543 llvm-svn: 318030
* [CodeExtractor] Add missing AllowVarArgs initialization.Florian Hahn2017-11-131-2/+3
| | | | llvm-svn: 318029
OpenPOWER on IntegriCloud