summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [X86] Remove some dead code and combine some repeated code that's left.Craig Topper2019-08-151-17/+3
| | | | | | | | If the width is 256 bits, then we must have AVX so the else here was unnecessary. Once that's removed then the >= 256 bit code is identical to the 128 bit code with a different VT so combine them. llvm-svn: 368956
* [NFC] Update doc comment to fix warning.Jonas Devlieghere2019-08-151-2/+0
| | | | | | | This fixes the warning: parameter 'EnableNullFPSuppression' not found in the function declaration [-Wdocumentation] llvm-svn: 368954
* Revert "Expose TailCallKind via the LLVM C API"Jonas Devlieghere2019-08-154-61/+3
| | | | | | | This is failing on several build bots. Reverting as discussed in https://reviews.llvm.org/D66061. llvm-svn: 368953
* Revert "[compiler-rt] Migrate llvm::make_unique to std::make_unique"Jonas Devlieghere2019-08-151-13/+13
| | | | | | | | | | The X-ray unit tests in compiler-rt are overriding the C++ version by explicitly passing -std=c++11 in the compiler invocation. This poses a problem as these tests are including LLVM headers that can now use C++14 features. I'm temporarily reverting this as I investigate the correct solution. llvm-svn: 368952
* gn build: Merge r368918Vitaly Buka2019-08-151-0/+1
| | | | llvm-svn: 368951
* [NFCI] Always initialize BugReport const fieldsAlex Langford2019-08-151-2/+4
| | | | | | | | | | | | | | | | | Summary: Some compilers require that const fields of an object must be explicitly initialized by the constructor. I ran into this issue building with clang 3.8 on Ubuntu 16.04. Reviewers: compnerd, Szelethus, NoQ Subscribers: cfe-commits, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66265 llvm-svn: 368950
* [coroutine] Fixes "cannot move instruction since its users are not dominated ↵Gor Nishanov2019-08-154-148/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | by CoroBegin" problem. Summary: Fixes https://bugs.llvm.org/show_bug.cgi?id=36578 and https://bugs.llvm.org/show_bug.cgi?id=36296. Supersedes: https://reviews.llvm.org/D55966 One of the fundamental transformation that CoroSplit pass performs before splitting the coroutine is to find which values need to survive between suspend and resume and provide a slot for them in the coroutine frame to spill and restore the value as needed. Coroutine frame becomes available once the storage for it was allocated and that point is marked in the pre-split coroutine with a llvm.coro.begin intrinsic. FE normally puts all of the user-authored code that would be accessing those values after llvm.coro.begin, however, sometimes instructions accessing those values would end up prior to coro.begin. For example, writing out a value of the parameter into the alloca done by the FE or instructions that are added by the optimization passes such as SROA when it rewrites allocas. Prior to this change, CoroSplit pass would try to move instructions that may end up accessing the values in the coroutine frame after CoroBegin. However it would run into problems (report_fatal_error) if some of the values would be used both in the allocation function (for example allocator is passed as a parameter to a coroutine) and in the use-authored body of the coroutine. To handle this case and to simplify the instruction moving logic, this change removes all of the instruction moving. Instead, we only change the uses of the spilled values that are dominated by coro.begin and leave other instructions intact. Before: ``` %var = alloca i32 %1 = getelementptr .. %var; ; will move this one after coro.begin %f = call i8* @llvm.coro.begin( ``` After: ``` %var = alloca i32 %1 = getelementptr .. %var; stays put %f = call i8* @llvm.coro.begin( ``` If we discover that there is a potential write into an alloca, prior to coro.begin we would copy its value from the alloca into the spill slot in the coroutine frame. Before: ``` %var = alloca i32 store .. %var ; will move this one after coro.begin %f = call i8* @llvm.coro.begin( ``` After: ``` %var = alloca i32 store .. %var ;stays put %f = call i8* @llvm.coro.begin( %tmp = load %var store %tmp, %spill.slot.for.var ``` Note: This change does not handle array allocas as that is something that C++ FE does not produce, but, it can be added in the future if need arises Reviewers: llvm-commits, modocache, ben-clayton, tks2103, rjmccall Reviewed By: modocache Subscribers: bartdesmet Differential Revision: https://reviews.llvm.org/D66230 llvm-svn: 368949
* [sanitizer_common] Replace forkpty with posix_spawn on DarwinJulian Lettner2019-08-157-93/+100
| | | | | | | | | | | | | | | | | | | | | | | | | On Darwin, we currently use forkpty to communicate with the "atos" symbolizer. There are several problems that fork[pty] has, e.g. that after fork, interceptors are still active and this sometimes causes crashes or hangs. This is especially problematic for TSan, which uses interceptors for OS-provided locks and mutexes, and even Libc functions use those. This patch replaces forkpty with posix_spawn on Darwin. Since posix_spawn doesn't fork (at least on Darwin), the interceptors are not a problem. Another benefit is that we'll handle post-fork failures (e.g. sandbox disallows "exec") gracefully now. Related revisions and previous attempts that were blocked by or had to be revered due to test failures: https://reviews.llvm.org/D48451 https://reviews.llvm.org/D40032 Reviewed By: kubamracek Differential Revision: https://reviews.llvm.org/D65253 llvm-svn: 368947
* [compiler-rt] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-151-13/+13
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368946
* Expose TailCallKind via the LLVM C APIRobert Widmann2019-08-144-3/+61
| | | | | | | | | | | | | | | | Summary: This exposes `CallInst`'s tail call kind via new `LLVMGetTailCallKind` and `LLVMSetTailCallKind` functions. The motivation for this is to be able to see `musttail` for languages that require mandatory tail calls for correctness. Today only the weaker `LLVMSetTail` is exposed and there is no way to set `GuaranteedTailCallOpt` via the C API. Reviewers: CodaFi, jyknight, deadalnix, rnk Reviewed By: CodaFi Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66061 llvm-svn: 368945
* [clang-tools-extra] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-1499-344/+344
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368944
* [Clang] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-14259-831/+831
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368942
* [www] Update DR status page to match latest version of CWG issues list.Richard Smith2019-08-141-32/+134
| | | | llvm-svn: 368941
* Fix handling of class member access into a vector type.Richard Smith2019-08-147-12/+55
| | | | | | | | | | | | | | | | | | | | | | When handling a member access into a non-class, non-ObjC-object type, we would perform a lookup into the surrounding scope as if for an unqualified lookup. If the member access was followed by a '<' and this lookup (or the typo-correction for it) found a template name, we'd treat the member access as naming that template. Now we treat such accesses as never naming a template if the type of the object expression is of vector type, so that vector component accesses are never misinterpreted as naming something else. This is not entirely correct, since it is in fact valid to name a template from the enclosing scope in this context, when invoking a pseudo-destructor for the vector type via an alias template, but that's very much a corner case, and this change leaves that case only as broken as the corresponding case for Objective-C types is. This incidentally adds support for dr2292, which permits a 'template' keyword at the start of a member access naming a pseudo-destructor. llvm-svn: 368940
* Remove LVALUE / RVALUE workaroundsJF Bastien2019-08-144-40/+11
| | | | | | | | | | | | Summary: LLVM_HAS_RVALUE_REFERENCE_THIS and LLVM_LVALUE_FUNCTION shouldn't be needed anymore because the minimum compiler versions support them. Subscribers: jkorous, dexonsmith, cfe-commits, llvm-commits, hans, thakis, chandlerc, rnk Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D66240 llvm-svn: 368939
* [Attributor] Try to fix "missing field 'RetInsts' initializer" warningJohannes Doerfert2019-08-141-1/+1
| | | | | | http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/35674/steps/build_Lld/logs/stdio llvm-svn: 368938
* Improve anonymous class heuristic in ClangASTContext::CreateRecordTypeShafik Yaghmour2019-08-145-14/+49
| | | | | | | | | Summary: Currently the heuristic used in ClangASTContext::CreateRecordType to identify an anonymous class is that there is that name is a nullptr or simply a null terminator. This heuristic is not accurate since it will also sweep up unnamed classes and lambdas. The improved heuristic relies on the requirement that an anonymous class must be contained within a class. Differential Revision: https://reviews.llvm.org/D66175 llvm-svn: 368937
* [LLD] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-1419-37/+37
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368936
* [Polly] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-142-2/+2
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368935
* [Bugpoint redesign] Modified Functions pass to consider declarationsDiego Trevino Ferrer2019-08-142-26/+16
| | | | | | | | | | | | | | Summary: This modification was put in place so the `ReduceMetadata` pass doesn't have to consider debug functions Reviewers: dblaikie Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66257 llvm-svn: 368934
* [LLDB] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-1463-110/+110
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368933
* [docs] Fix sphinx doc generation errorsJordan Rupprecht2019-08-146-21/+31
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Errors fixed: - GettingStarted: Duplicate explicit target name: "cmake" - GlobalISel: Unexpected indentation - LoopTerminology: Explicit markup ends without a blank line; unexpected unindent - ORCv2: Definition list ends without a blank line; unexpected unindent - Misc: document isn't included in any toctree Verified that a clean docs build (`rm -rf docs/ && ninja docs-llvm-html`) passes with no errors. Spot checked the individual pages to make sure they look OK. Reviewers: thakis, dsanders Reviewed By: dsanders Subscribers: arphaman, llvm-commits, lhames, rovka, dsanders, reames Tags: #llvm Differential Revision: https://reviews.llvm.org/D66183 llvm-svn: 368932
* [Attributor][NFC] Make debug output consistentJohannes Doerfert2019-08-141-4/+4
| | | | llvm-svn: 368931
* [SCEV] Rename getMaxBackedgeTakenCount to getConstantMaxBackedgeTakenCount [NFC]Philip Reames2019-08-145-15/+15
| | | | llvm-svn: 368930
* [LifetimeAnalysis] Support std::stack::top() and std::optional::value()Matthias Gehre2019-08-142-5/+24
| | | | | | | | | | | | | | Summary: Diagnose dangling pointers that come from std::stack::top() and std::optional::value(). Reviewers: gribozavr Subscribers: cfe-commits, xazax.hun Tags: #clang Differential Revision: https://reviews.llvm.org/D66164 llvm-svn: 368929
* [Attributor][NFC] Try to eliminate warnings (debug build + fall through)Johannes Doerfert2019-08-141-1/+3
| | | | llvm-svn: 368928
* [Attributor][NFC] Introduce statistics macros for new positionsJohannes Doerfert2019-08-141-54/+42
| | | | llvm-svn: 368927
* [SelectionDAGBuilder] Teach gather/scatter getUniformBase to look through ↵Craig Topper2019-08-142-10/+56
| | | | | | vector zeroinitializer indices in addition to scalar zeroes. llvm-svn: 368926
* [Attributor][NFC] Add merge/join/clamp operators to the IntegerStateJohannes Doerfert2019-08-142-0/+49
| | | | | | Differential Revision: https://reviews.llvm.org/D66146 llvm-svn: 368925
* [Attributor] Use the AANoNull attribute directly in AADereferenceableJohannes Doerfert2019-08-142-81/+34
| | | | | | | | | | | | | | | | | Summary: Instead of constantly keeping track of the nonnull status with the dereferenceable information we can simply query the nonnull attribute whenever we need the information (debug + manifest). Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, jfb, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66113 llvm-svn: 368924
* [AArch64][GlobalISel] Custom selection for s8 load acquire.Amara Emerson2019-08-142-1/+45
| | | | | | | | | Implement this single atomic load instruction so that we can compile stack protector code. Differential Revision: https://reviews.llvm.org/D66245 llvm-svn: 368923
* [Attributor] Use liveness during the creation of AAReturnedValuesJohannes Doerfert2019-08-143-235/+263
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: As one of the first attributes, and one of the complex ones, AAReturnedValues was not using liveness but we filtered the result after the fact. This change adds liveness usage during the creation. The algorithm is also improved and shorter. The new algorithm will collect returned values over time using the generic facilities that work with liveness already, e.g., genericValueTraversal which does not look at dead PHI node predecessors. A test to show how this leads to better results is included. Note: Unresolved calls and resolved calls are now tracked explicitly. Reviewers: uenoku, sstefan1 Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66120 llvm-svn: 368922
* [Attributor] Do not update or manifest dead attributesJohannes Doerfert2019-08-142-3/+29
| | | | | | | | | | | | | | | | Summary: If the associated context instruction is assumed dead we do not need to update or manifest the state. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66116 llvm-svn: 368921
* Revert "[lldb] Reinstate original guard variable check"Raphael Isemann2019-08-141-5/+9
| | | | | | | | | | | It seems this breaks the following tests: lldb-Suite :: expression_command/call-function/TestCallUserDefinedFunction.py lldb-Suite :: expression_command/rdar42038760/TestScalarURem.py Let's revert this patch and wait until we find an actual issue that could be fixed by also doing the guard variable check on Windows. llvm-svn: 368920
* [Attributor] Use IRPosition consistentlyJohannes Doerfert2019-08-142-462/+788
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The next attempt to clean up the Attributor interface before we grow it further. Before, we used a combination of two values (associated + anchor) and an argument number (or -1) to determine a location. This was very fragile. The new system uses exclusively IR positions and we restrict the generation of IR positions to special constructor methods that verify internal constraints we have. This will catch misuse early. The auto-conversion, e.g., in getAAFor, is now performed through the SubsumingPositionIterator. This iterator takes an IR position and allows to visit all IR positions that "subsume" the given one, e.g., function attributes "subsume" argument attributes of that function. For a detailed breakdown see the class comment of SubsumingPositionIterator. This patch also introduces the IRPosition::getAttrs() to extract IR attributes at a certain position. The method knows how to look up in different positions that are equivalent, e.g., the argument position for call site arguments. We also introduce three new positions kinds such that we have all IR positions where attributes can be placed and one for "floating" values. Reviewers: sstefan1, uenoku Subscribers: hiraditya, bollu, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65977 llvm-svn: 368919
* [Bugpoint redesign] Added Pass to Remove Global VariablesDiego Trevino Ferrer2019-08-147-1/+139
| | | | | | | | | | | | | | | Summary: This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively. I'm still uncertain if this pass should remove derived uses, I'm open to suggestions. Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64176 llvm-svn: 368918
* [AMDGPU] Do not assume a default GCN targetStanislav Mekhanoshin2019-08-142-4/+3
| | | | | | Differential Revision: https://reviews.llvm.org/D66246 llvm-svn: 368917
* Fix thread comparison by making sure we never pass our special 'not a ↵Marshall Clow2019-08-142-4/+12
| | | | | | thread' value to the underlying implementation. Fixes PR#42918. llvm-svn: 368916
* [Bugpoint redesign] Reduced scope of variables in Delta implementationDiego Trevino Ferrer2019-08-141-5/+4
| | | | | | | | | | | | Summary: This diff also changed the check in `Delta.cpp` to verify interesting-ness, so it exits when the input isn't interesting Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66251 llvm-svn: 368915
* [libc++] Mark <chrono> test as unsupported on AppleClang 9Louis Dionne2019-08-141-0/+1
| | | | llvm-svn: 368914
* [x86] add tests for fadd reduction; NFCSanjay Patel2019-08-141-0/+132
| | | | | | More coverage for D66236. llvm-svn: 368913
* [clang-doc] Add missing check in testsDiego Astiazaran2019-08-143-2/+10
| | | | | | | | Path is now checked when comparing two Infos in the unit tests. Differential Revision: https://reviews.llvm.org/D66124 llvm-svn: 368912
* [libc++] Mark std::tuple CTAD test as failing on AppleClang 9Louis Dionne2019-08-141-0/+1
| | | | | | | | Like CTAD for std::unordered_set, AppleClang 9's support for CTAD is insufficient. I suspect the corresponding LLVM Clang is broken too, but we don't seem to have testers using that Clang. llvm-svn: 368911
* Use std::is_final directlyJF Bastien2019-08-142-12/+1
| | | | | | The workaround isn't needed anymore because all toolchains should support it. llvm-svn: 368910
* SwapByteOrder.h: don't check for unsupported GCC versionsJF Bastien2019-08-141-6/+4
| | | | llvm-svn: 368909
* MathExtras.h: don't check for unsupported GCC versionsJF Bastien2019-08-141-8/+8
| | | | llvm-svn: 368908
* Add support in CMake to statically link the C++ standard library.Erich Keane2019-08-143-0/+26
| | | | | | | | | | | | | | | It is sometimes useful to have the C++ standard library linked into the assembly when compiling clang, particularly when distributing a compiler onto systems that don't have a copy of stdlibc++ or libc++ installed. This functionality should work with either GCC or Clang as the host compiler, though statically linking libc++ (as may be required for licensing purposes) is only possible if the host compiler is Clang with a copy of libc++ available. Differential Revision: https://reviews.llvm.org/D65603 llvm-svn: 368907
* [SLP][NFC] Use pointers to address to ScalarToTreeEntry elements, instead of ↵Dinar Temirbulatov2019-08-141-4/+4
| | | | | | indexes. llvm-svn: 368906
* [SDAG] move variable closer to use; NFCSanjay Patel2019-08-141-1/+1
| | | | llvm-svn: 368905
* [lldb][NFC] Remove unused functionJordan Rupprecht2019-08-141-5/+0
| | | | llvm-svn: 368904
OpenPOWER on IntegriCloud