summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [sanitizer] Fix vfork interceptor on i386 w/ dynamic runtime.Evgeniy Stepanov2019-02-281-2/+16
| | | | | | | | PLT calls on i386 expect GOT base address in %ebx. This call does not need to go through PLT strictly speaking, but I'd rather avoid future surprises and implement the most general case. llvm-svn: 355125
* bpf: improve dead Defs check for XADDJiong Wang2019-02-281-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BPF XADD semantics require all Defs of XADD are dead, meaning any result of XADD insn is not used. However, BPF backend hasn't enabled sub-register liveness track, so when the source and destination operands of XADD are GPR32, there is no sub-register dead info. If we rely on the generic MachineInstr::allDefsAreDead, then we will raise false alarm on GPR32 Def. This was fine as there was no sub-register code-gen support for XADD which will be added by the next patch. To support GPR32 Def, ideally we could just enable sub-registr liveness track on BPF backend, then allDefsAreDead could work on GPR32 Def. This requires implementing TargetSubtargetInfo::enableSubRegLiveness on BPF. However, sub-register liveness tracking module inside LLVM is actually designed for the situation where one register could be split into more than one sub-registers for which case each sub-register could have their own liveness and kill one of them doesn't kill others. So, tracking liveness for each make sense. For BPF, each 64-bit register could only have one 32-bit sub-register. This is exactly the case which LLVM think brings no benefits for doing sub-register tracking, because the live range of sub-register must always equal to its parent register, therefore liveness tracking is disabled even the back-end has implemented enableSubRegLiveness. The detailed information is at r232695: Author: Matthias Braun <matze@braunis.de> Date: Thu Mar 19 00:21:58 2015 +0000 Do not track subregister liveness when it brings no benefits Hence, for BPF, we enhance MachineInstr::allDefsAreDead. Given the solo sub-register always has the same liveness as its parent register, LLVM is already attaching a implicit 64-bit register Def whenever the there is a sub-register Def. The liveness of the implicit 64-bit Def is available. For example, for "lock *(u32 *)(r0 + 4) += w9", the MachineOperand info could be: $w9 = XADDW32 killed $r0, 4, $w9(tied-def 0), implicit killed $r9, implicit-def dead $r9 Even though w9 is not marked as Dead, the parent register r9 is marked as Dead correctly, and it is safe to use such information or our purpose. v1 -> v2: - Simplified code logic inside hasLiveDefs. (Yonghong) Acked-by: Yonghong Song <yhs@fb.com> Signed-off-by: Jiong Wang <jiong.wang@netronome.com> llvm-svn: 355124
* [clang-format][NFC] Allow getLLVMStyle() to take a languageJordan Rupprecht2019-02-283-7/+15
| | | | | | | | | | | | | | | | | | | Summary: getLLVMStyle() sets the default style, but doesn't take the language as a parameter, so can't set default parameters when they differ from C++. This change adds LanguageKind as an input to getLLVMStyle so that we can start doing that. See D55964 as a motivation for this, where we want Tablegen to be formatted differently than C++. Reviewers: djasper, krasimir, MyDeveloperDay Reviewed By: MyDeveloperDay Subscribers: jdoerfert, MyDeveloperDay, kristina, cfe-commits, arphaman Tags: #clang Differential Revision: https://reviews.llvm.org/D56943 llvm-svn: 355123
* Add Support for Creating and Deleting Unicode Files and Directories in LitSerge Guelton2019-02-284-7/+40
| | | | | | | | | | | This enables lit to work with unicode file names via mkdir, rm, and redirection. Lit still uses utf-8 internally, but converts to utf-16 on Windows, or just utf-8 bytes on everything else. Committed on behalf of Jason Mittertreiner Differential Revision: https://reviews.llvm.org/D56754 llvm-svn: 355122
* Improve process launch comments for WindowsAdrian McCarthy2019-02-281-3/+7
| | | | | | | | | | | | | The existing comment about over-allocating the command line was incorrect. The contents of the command line may be changed, but it's not necessary to over allocate. The changes will be limited to the existing contents of the string (e.g., by replacing spaces with L'\0' to tokenize the command line). Also added a comment explaining a possible cause of failure to save the next programmer some time when they try to debug a 64-bit process from a 32-bit LLDB. llvm-svn: 355121
* [OpenMP] Make use of sched_yield optional in runtimeJonathan Peyton2019-02-2819-383/+181
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch cleans up the yielding code and makes it optional. An environment variable, KMP_USE_YIELD, was added. Yielding is still on by default (KMP_USE_YIELD=1), but can be turned off completely (KMP_USE_YIELD=0), or turned on only when oversubscription is detected (KMP_USE_YIELD=2). Note that oversubscription cannot always be detected by the runtime (for example, when the runtime is initialized and the process forks, oversubscription cannot be detected currently over multiple instances of the runtime). Because yielding can be controlled by user now, the library mode settings (from KMP_LIBRARY) for throughput and turnaround have been adjusted by altering blocktime, unless that was also explicitly set. In the original code, there were a number of places where a double yield might have been done under oversubscription. This version checks oversubscription and if that's not going to yield, then it does the spin check. Patch by Terry Wilmarth Differential Revision: https://reviews.llvm.org/D58148 llvm-svn: 355120
* [PGO] Update InstrProfData.inc to sync with llvmRong Xu2019-02-281-0/+2
| | | | llvm-svn: 355119
* [InstCombine] fold adds of constants separated by sext/zextSanjay Patel2019-02-282-18/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is part of a transform that may be done in the backend: D13757 ...but it should always be beneficial to fold this sooner in IR for all targets. https://rise4fun.com/Alive/vaiW Name: sext add nsw %add = add nsw i8 %i, C0 %ext = sext i8 %add to i32 %r = add i32 %ext, C1 => %s = sext i8 %i to i32 %r = add i32 %s, sext(C0)+C1 Name: zext add nuw %add = add nuw i8 %i, C0 %ext = zext i8 %add to i16 %r = add i16 %ext, C1 => %s = zext i8 %i to i16 %r = add i16 %s, zext(C0)+C1 llvm-svn: 355118
* [X86] Add test case that was supposed to go with r355116.Craig Topper2019-02-281-0/+22
| | | | llvm-svn: 355117
* [X86] Don't peek through bitcasts before checking ↵Craig Topper2019-02-281-2/+5
| | | | | | | | | | | | ISD::isBuildVectorOfConstantSDNodes in combineTruncatedArithmetic We don't have any combines that can look through a bitcast to truncate a build vector of constants. So the truncate will stick around and give us something like this pattern (binop (trunc X), (trunc (bitcast (build_vector)))) which has two truncates in it. Which will be reversed by hoistLogicOpWithSameOpcodeHands in the generic DAG combiner. Thus causing an infinite loop. Even if we had a combine for (truncate (bitcast (build_vector))), I think it would need to be implemented in getNode otherwise DAG combiner visit ordering would probably still visit the binop first and reverse it. Or combineTruncatedArithmetic would need to do its own constant folding. Differential Revision: https://reviews.llvm.org/D58705 llvm-svn: 355116
* Revert "[AArch64][GlobalISel] Add support for 64 bit vector shuffle using TBL1."Amara Emerson2019-02-282-165/+51
| | | | | | Seems to break some neon intrinsics tests. llvm-svn: 355115
* [dsymutil] Use rfind for paths with parenthesesJonas Devlieghere2019-02-281-1/+1
| | | | | | | | Dsymutil gets library member information is through the ambiguous /path/to/archive.a(member.o). The current logic we use would get confused by additional parentheses. Using rfind mitigates this issue. llvm-svn: 355114
* [NFC][Sanitizer] Weak linkage is not available on WindowsJulian Lettner2019-02-282-7/+14
| | | | | | | | | | | The concept of weak linkage is not available on Windows. The available workarounds in LLVM/sanitizer runtimes have their own problems. Define a separte symbol ubsan_GetStackTrace to work around the issue now. At lest this way it is painfully obvious that we still have to do more cleanup. Follow-up to revision: https://reviews.llvm.org/D58651 llvm-svn: 355113
* [WebAssembly] Remove uses of ThreadModelThomas Lively2019-02-2832-144/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: In the clang UI, replaces -mthread-model posix with -matomics as the source of truth on threading. In the backend, replaces -thread-model=posix with the atomics target feature, which is now collected on the WebAssemblyTargetMachine along with all other used features. These collected features will also be used to emit the target features section in the future. The default configuration for the backend is thread-model=posix and no atomics, which was previously an invalid configuration. This change makes the default valid because the thread model is ignored. A side effect of this change is that objects are never emitted with passive segments. It will instead be up to the linker to decide whether sections should be active or passive based on whether atomics are used in the final link. Reviewers: aheejin, sbc100, dschuff Subscribers: mehdi_amini, jgravelle-google, hiraditya, sunfish, steven_wu, dexonsmith, rupprecht, jfb, jdoerfert, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D58742 llvm-svn: 355112
* [Tests] Strengthen LICM test corpus to show alignment striping. (part 2)Philip Reames2019-02-281-0/+31
| | | | | | This should have been part of r355110, but my brain isn't quite awake yet, despite the coffee. Per the original submit comment... Doing scalar promotion w/o being able to prove the alignment of the hoisted load or sunk store is a bug. Update tests to actually show the alignment so that impact of the patch which fixes this can be seen. llvm-svn: 355111
* [Tests] Strengthen LICM test corpus to show alignment stripingPhilip Reames2019-02-282-0/+30
| | | | | | Doing scalar promotion w/o being able to prove the alignment of the hoisted load or sunk store is a bug. Update tests to actually show the alignment so that impact of the patch which fixes this can be seen. llvm-svn: 355110
* [ValueTracking] More accurate unsigned sub overflow detectionNikita Popov2019-02-289-30/+24
| | | | | | | | | | | | Second part of D58593. Compute precise overflow conditions based on all known bits, rather than just the sign bits. Unsigned a - b overflows iff a < b, and we can determine whether this always/never happens based on the minimal and maximal values achievable for a and b subject to the known bits constraint. llvm-svn: 355109
* [clang-tidy] fix documentation link in list of clang-tidy checksJonas Toth2019-02-281-1/+1
| | | | llvm-svn: 355108
* llvm-config: Include -stdlib= in --cxxflagsTom Stellard2019-02-281-1/+2
| | | | | | | | | | | | | | | | | | Summary: This was removed in r349068, but it is needed when llvm is compiled using the non-default c++ standard library on a platform. Reviewers: sylvestre.ledru, infinity0, mgorny, cuviper Reviewed By: sylvestre.ledru Subscribers: jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D57859 llvm-svn: 355107
* Partial revert of r353952: [HIP] Handle compile -m options and propagate ↵Yaxun Liu2019-02-282-17/+6
| | | | | | | | | | | | | | into LLC Remove comments and tests about passing -mcode-object-v3 to driver since it does not work. Other -m options are OK. Also put back -mattr=-code-object-v3 since HIP is still not ready for code object v3. Differential Revision: https://reviews.llvm.org/D57977 llvm-svn: 355106
* Make MergeBlockIntoPredecessor conformant to the precondition of calling ↵Chijun Sima2019-02-281-1/+3
| | | | | | | | | | | | | | | | | | | | | DTU.applyUpdates Summary: It is mentioned in the document of DTU that "It is illegal to submit any update that has already been submitted, i.e., you are supposed not to insert an existent edge or delete a nonexistent edge." It is dangerous to violet this rule because DomTree and PostDomTree occasionally crash on this scenario. This patch fixes `MergeBlockIntoPredecessor`, making it conformant to this precondition. Reviewers: kuhar, brzycki, chandlerc Reviewed By: brzycki Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58444 llvm-svn: 355105
* [AArch64][GlobalISel] Add support for 64 bit vector shuffle using TBL1.Amara Emerson2019-02-282-51/+165
| | | | | | | | | This extends the existing support for shufflevector to handle cases like <2 x float>, which we can implement by concating the vectors and using a TBL1. Differential Revision: https://reviews.llvm.org/D58684 llvm-svn: 355104
* [cmake] Move LLDB_DISABLE_LIBEDIT handling code into a central placePavel Labath2019-02-283-25/+24
| | | | | | | | | | | | | This was previously scattered between the main CMakeLists.txt file and LLDBGenerateConfig.cmake and LLDBConfig.cmake. This caused the some of the code to be executed in incorrect order. Specifically, the check for el_winsertstr was done before libedit_LIBRARIES was computed, and so it always failed on the first run. Moving it the two checks to a central place makes sure this doesn't happen again and improves the overall readability. llvm-svn: 355103
* [clang-tidy] redirection in list of checks adjustedJonas Toth2019-02-281-1/+1
| | | | llvm-svn: 355102
* [Target][ARM] Add a usage for SrcSz to unbreak build-bots without assertionsKadir Cetinkaya2019-02-281-0/+1
| | | | llvm-svn: 355101
* [clang-tidy] include cppcoreguidelines-explicit-virtual-functions in list of ↵Jonas Toth2019-02-282-1/+2
| | | | | | checks and fix redirection llvm-svn: 355100
* Add support for computing "zext of value" in KnownBits. NFCIBjorn Pettersson2019-02-289-35/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The description of KnownBits::zext() and KnownBits::zextOrTrunc() has confusingly been telling that the operation is equivalent to zero extending the value we're tracking. That has not been true, instead the user has been forced to explicitly set the extended bits as known zero afterwards. This patch adds a second argument to KnownBits::zext() and KnownBits::zextOrTrunc() to control if the extended bits should be considered as known zero or as unknown. Reviewers: craig.topper, RKSimon Reviewed By: RKSimon Subscribers: javed.absar, hiraditya, jdoerfert, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58650 llvm-svn: 355099
* [clang-tidy] documentation fixing the actual correct fileJonas Toth2019-02-281-0/+1
| | | | llvm-svn: 355098
* [clang-tidy] tryfix documenation continuedJonas Toth2019-02-281-0/+1
| | | | llvm-svn: 355097
* [CTU] Do not allow different CPP dialects in CTUGabor Marton2019-02-282-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: If CPP dialects are different then return with error. Consider this STL code: template<typename _Alloc> struct __alloc_traits #if __cplusplus >= 201103L : std::allocator_traits<_Alloc> #endif { // ... }; This class template would create ODR errors during merging the two units, since in one translation unit the class template has a base class, however in the other unit it has none. Reviewers: xazax.hun, a_sidorin, r.stahl Subscribers: rnkovacs, dkrupp, Szelethus, gamesh411, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D57906 llvm-svn: 355096
* [clang-tidy] another issue in documentation, double empty line seemed to ↵Jonas Toth2019-02-281-1/+0
| | | | | | confuse code-block llvm-svn: 355095
* [clang-tidy] attempt to fix documentation build-errorJonas Toth2019-02-281-3/+4
| | | | llvm-svn: 355094
* [clang-tidy] added cppcoreguidelines-explicit-virtual-functionsJonas Toth2019-02-287-3/+62
| | | | | | | | | | | | Addresses the bugzilla bug #30397. (https://bugs.llvm.org/show_bug.cgi?id=30397) modernize-use-override suggests that destructors require the override specifier and the CPP core guidelines do not recommend this. Patch by lewmpk. Differential Revision: https://reviews.llvm.org/D58731 llvm-svn: 355093
* Added missing license headersDmitri Gribenko2019-02-284-1/+31
| | | | | | | | | | | | Reviewers: ioeric Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58781 llvm-svn: 355092
* Use ArrayRef::copy, instead of copying data manuallyDmitri Gribenko2019-02-281-3/+1
| | | | | | | | | | | | Reviewers: ioeric Subscribers: jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58782 llvm-svn: 355091
* Moved Ref into its own header and implementation fileDmitri Gribenko2019-02-2811-149/+192
| | | | | | | | | | | | Reviewers: ioeric Subscribers: mgorny, jkorous, mgrang, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58778 llvm-svn: 355090
* [clang-tidy] bugprone-string-integer-assignment: Reduce false positives.Clement Courbet2019-02-282-0/+36
| | | | | | | | | | | | | | Summary: Detect a few expressions as likely character expressions, see PR27723. Reviewers: xazax.hun, alexfh Subscribers: rnkovacs, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58609 llvm-svn: 355089
* Moved Symbol into its own header and implementation fileDmitri Gribenko2019-02-2814-265/+318
| | | | | | | | | | | | Reviewers: ioeric Subscribers: mgorny, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58774 llvm-svn: 355088
* [PowerPC] Removed STATISTIC that was causing build errors.Stefan Pintilie2019-02-281-1/+0
| | | | llvm-svn: 355087
* Moved SymbolOrigin into its own header and implementation fileDmitri Gribenko2019-02-2812-36/+85
| | | | | | | | | | | | Reviewers: ioeric Subscribers: mgorny, jkorous, arphaman, kadircet, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58773 llvm-svn: 355086
* [PowerPC] Move the stack pointer update instruction later in the prologue ↵Stefan Pintilie2019-02-2810-117/+313
| | | | | | | | | | | | | | and earlier in the epilogue. Move the stdu instruction in the prologue and epilogue. This should provide a small performance boost in functions that are able to do this. I've kept this change rather conservative at the moment and functions with frame pointers or base pointers will not try to move the stack pointer update. Differential Revision: https://reviews.llvm.org/D42590 llvm-svn: 355085
* [X86][AVX] Remove superfluous insert_subvector(zero, bitcast(x)) -> ↵Simon Pilgrim2019-02-281-14/+0
| | | | | | | | bitcast(insert_subvector(zero, x)) fold This is caught by other existing bitcast folds. llvm-svn: 355084
* [ARM GlobalISel] Make arm_i32imm an IntImmLeafDiana Picus2019-02-282-15/+8
| | | | | | | | | | | | | This gets rid of some duplication in the TableGen definition, but it forces us to keep both a pointer and a reference to the subtarget in the ARMInstructionSelector. That is pretty ugly but it might be a reasonable trade-off, since the TableGen descriptions should outlive the code in the selector (or in the worst case we can update to use just the reference when we get rid of DAGISel). Differential Revision: https://reviews.llvm.org/D58031 llvm-svn: 355083
* Moved SymbolLocation into its own header and implementation fileDmitri Gribenko2019-02-2811-91/+136
| | | | | | | | | | | | Reviewers: ioeric Subscribers: mgorny, jkorous, arphaman, kadircet, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58768 llvm-svn: 355082
* Moved DenseMap support for SymbolID into SymbolID.hDmitri Gribenko2019-02-282-25/+22
| | | | llvm-svn: 355081
* Fixed typos in a test: s/CEHCK/CHECK/Dmitri Gribenko2019-02-281-7/+7
| | | | | | | | | | | | Reviewers: ilya-biryukov, serge-sans-paille Subscribers: delcypher, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58613 llvm-svn: 355080
* Fixed a typo in the test s/CEHCK/CHECK/Dmitri Gribenko2019-02-281-2/+5
| | | | | | | | | | | | | | | | | Summary: Turns out the test was not correct, I had to adjust the test to work. I also added CHECK-LABELs for better error messages from FileCheck while I'm here. Reviewers: jsji Subscribers: nemanjai, eraman, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D58614 llvm-svn: 355079
* [X86][AVX] Fold vf64 concat_vectors(movddup(x),movddup(x)) -> broadcast(x)Simon Pilgrim2019-02-282-16/+15
| | | | llvm-svn: 355078
* [ARM GlobalISel] Support global variables for Thumb2Diana Picus2019-02-2810-51/+733
| | | | | | | | | | | | | | | | | | | Add the same level of support as for ARM mode (i.e. still no TLS support). In most cases, it is sufficient to replace the opcodes with the t2-equivalent, but there are some idiosyncrasies that I decided to preserve because I don't understand the full implications: * For ARM we use LDRi12 to load from constant pools, but for Thumb we use t2LDRpci (I'm not sure if the ideal would be to use t2LDRi12 for Thumb as well, or to use LDRcp for ARM). * For Thumb we don't have an equivalent for MOV|LDRLIT_ga_pcrel_ldr, so we have to generate MOV|LDRLIT_ga_pcrel plus a load from GOT. The tests are in separate files because they're hard enough to read even without doubling the number of checks. llvm-svn: 355077
* [clang-tidy] misc-string-integer-assignment: fix false positiveClement Courbet2019-02-282-4/+9
| | | | | | | | | | | | | | | | | | | | Summary: using CodePoint = uint32_t; CodePoint cp; basic_string<CodePoint> s; s += cp; See PR27723. Reviewers: xazax.hun, alexfh Subscribers: rnkovacs, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58606 llvm-svn: 355076
OpenPOWER on IntegriCloud