summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm/Object] - Convert SectionRef::getName() to return Expected<>George Rimar2019-08-1440-240/+423
| | | | | | | | | | | | | | | | | | | | | | | SectionRef::getName() returns std::error_code now. Returning Expected<> instead has multiple benefits. For example, it forces user to check the error returned. Also Expected<> may keep a valuable string error message, what is more useful than having a error code. (Object\invalid.test was updated to show the new messages printed.) This patch makes a change for all users to switch to Expected<> version. Note: in a few places the error returned was ignored before my changes. In such places I left them ignored. My intention was to convert the interface used, and not to improve and/or the existent users in this patch. (Though I think this is good idea for a follow-ups to revisit such places and either remove consumeError calls or comment each of them to clarify why it is OK to have them). Differential revision: https://reviews.llvm.org/D66089 llvm-svn: 368812
* [llvm-objdump] - Add a relocation-xindex-symbol.test test case.George Rimar2019-08-143-8/+36
| | | | | | | | | This rewrites the exitent test case to use YAML instead of the precompiled object and moves it from test/Object to an appropriate llvm-objdump tests folder. Differential revision: https://reviews.llvm.org/D66140 llvm-svn: 368811
* [Intrinsics] Add a 'NoAlias' intrinsic property; annotate llvm.memcpyDavid Bolvansky2019-08-146-3/+22
| | | | | | | | | | Reviewers: jdoerfert Reviewed By: jdoerfert Differential Revision: https://reviews.llvm.org/D66158 llvm-svn: 368810
* [Codegen] Updated test for D66158David Bolvansky2019-08-141-2/+34
| | | | | | | | | | | | | | Reviewers: jdoerfert Reviewed By: jdoerfert Subscribers: cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66173 llvm-svn: 368809
* Fix the -Wunused-variable warning.Haojian Wu2019-08-142-2/+2
| | | | llvm-svn: 368808
* [InstCombine][NFC] Autogenerate checks in adjust-for-minmax.llRoman Lebedev2019-08-141-82/+82
| | | | | | Being affected by WIP patch. llvm-svn: 368807
* [API] Have SBCommandReturnObject::GetOutput/Error return "" instead of nullptrPavel Labath2019-08-143-9/+21
| | | | | | | | | | | | | | | | | | | | | | | Summary: It seems this was an unintended side-effect of D26698. AFAICT, these functions did return an empty string before that patch, and the patch contained code which attempted to ensure that, but those efforts were negated by ConstString::AsCString, which by default returns a nullptr even for empty strings. This patch: - fixes the GetOutput/Error methods to really return empty strings - adds and explicit test for that - removes a workaround in lldbtest.py, which was masking this problem from our other tests Reviewers: jingham, clayborg Subscribers: zturner, lldb-commits Differential Revision: https://reviews.llvm.org/D65739 llvm-svn: 368806
* Removed dead code from clang/tools/libclang/CXIndexDataConsumer.{cpp,h}Dmitri Gribenko2019-08-142-51/+0
| | | | | | | | | | | | Reviewers: jkorous Subscribers: dexonsmith, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66156 llvm-svn: 368805
* [NewPM][PassInstrumentation] IR printing support from clang driverTaewook Oh2019-08-142-1/+10
| | | | | | | | | | | | | | Summary: https://reviews.llvm.org/D50923 enabled the IR printing support for the new pass manager, but only for the case when `opt` tool is used as a driver. This patch is to enable the IR printing when `clang` is used as a driver. Reviewers: fedor.sergeev, philip.pfaffe Subscribers: cfe-commits, yamauchi, llvm-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D65975 llvm-svn: 368804
* [lldb] Reinstate original guard variable checkRaphael Isemann2019-08-141-9/+5
| | | | | | | | | | The isGuardVariableSymbol option for ignoring Microsoft's ABI was originally added to get the bots green, but now that we found the actual issue (that we checked for prefix instead of suffix in the MS ABI check), we should be able to properly implement the guard variable check without any strange Microsoft exceptions. llvm-svn: 368802
* [LV] Fold-tail flagDorit Nuzman2019-08-142-6/+32
| | | | | | | | | | | This is the compiler-flag equivalent of the Predicate pragma (https://reviews.llvm.org/D65197), to direct the vectorizer to fold the remainder-loop into the main-loop using predication. Differential Revision: https://reviews.llvm.org/D66108 Reviewers: Ayal, hsaito, fhahn, SjoerdMeije llvm-svn: 368801
* Revert '[LICM] Make Loop ICM profile aware' and 'Fix pass dependency for LICM'David L. Jones2019-08-147-122/+28
| | | | | | | This reverts r368526 (git commit 7e71aa24bc0788690fea7f0d7eab400c6a784deb) This reverts r368542 (git commit cb5a90fd314a7914cf293797bb4fd7a6841052cf) llvm-svn: 368800
* Remove minimum toolchain soft-errorJF Bastien2019-08-142-13/+4
| | | | | | | | | | | | | | | | | | | | | | | Summary: Back in January I changed the minimum toolchain version required to build clang and LLVM: D57264. Since then we've release LLVM 8, following [our process](http://llvm.org/docs/DeveloperPolicy.html#toolchain) it's therefore now a good time to remove the soft-error and officially deprecate older toolchains. I tried this out last Tursday night to see if any bots complained, and I saw no complaints. I also manually audited bots and didn't see any bot that should break, but their toolchain information is unreliable and some bots are offline. Once this patch stick we'll move to C++14 as we've [already agreed](http://lists.llvm.org/pipermail/llvm-dev/2019-January/129452.html). Subscribers: mgorny, jkorous, dexonsmith, llvm-commits, EricWF, thakis, chandlerc Tags: #llvm Differential Revision: https://reviews.llvm.org/D66188 llvm-svn: 368799
* Coroutines: adjust for SVN r358739John McCall2019-08-141-4/+6
| | | | | | | CallSite has been removed in favour of CallBase. Adjust the coroutine split to account for that. llvm-svn: 368798
* Don't run a full verifier pass in coro-splitting's private pipeline.John McCall2019-08-141-1/+6
| | | | | | Potentially addresses rdar://49022293. llvm-svn: 368797
* Remove unreachable blocks before splitting a coroutine.John McCall2019-08-142-1/+65
| | | | | | | The suspend-crossing algorithm is not correct in the presence of uses that cannot be reached on some successor path from their defs. llvm-svn: 368796
* Support swifterror in coroutine lowering.John McCall2019-08-144-0/+381
| | | | | | | | | | The support for swifterror allocas should work in all lowerings. The support for swifterror arguments only really works in a lowering with prototypes where you can ensure that the prototype also has a swifterror argument; I'm not really sure how it could possibly be made to work in the switch lowering. llvm-svn: 368795
* Update for optimizer changes.John McCall2019-08-141-1/+1
| | | | | | rdar://37352868 llvm-svn: 368794
* In coro.retcon lowering, don't explode if the optimizer messes around with ↵John McCall2019-08-143-1/+48
| | | | | | the linkage of the prototype or the exact types of the yielded values. llvm-svn: 368793
* Fix a use-after-free in the coro.alloca treatment.John McCall2019-08-142-4/+38
| | | | llvm-svn: 368792
* Add intrinsics for doing frame-bound dynamic allocations within a coroutine.John McCall2019-08-145-4/+464
| | | | | | | These rely on having an allocator provided to the coroutine and thus, for now, only work in retcon lowerings. llvm-svn: 368791
* Guard dumps in the coro intrinsic validation logic behind NDEBUG checks. ↵John McCall2019-08-141-0/+14
| | | | | | dump() is not guaranteed to be defined in all builds. llvm-svn: 368790
* Generalize llvm.coro.suspend.retcon to allow an arbitrary number of ↵John McCall2019-08-1410-64/+314
| | | | | | arguments to be passed back to the continuation function. llvm-svn: 368789
* Extend coroutines to support a "returned continuation" lowering.John McCall2019-08-1414-305/+2103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A quick contrast of this ABI with the currently-implemented ABI: - Allocation is implicitly managed by the lowering passes, which is fine for frontends that are fine with assuming that allocation cannot fail. This assumption is necessary to implement dynamic allocas anyway. - The lowering attempts to fit the coroutine frame into an opaque, statically-sized buffer before falling back on allocation; the same buffer must be provided to every resume point. A buffer must be at least pointer-sized. - The resume and destroy functions have been combined; the continuation function takes a parameter indicating whether it has succeeded. - Conversely, every suspend point begins its own continuation function. - The continuation function pointer is directly returned to the caller instead of being stored in the frame. The continuation can therefore directly destroy the frame when exiting the coroutine instead of having to leave it in a defunct state. - Other values can be returned directly to the caller instead of going through a promise allocation. The frontend provides a "prototype" function declaration from which the type, calling convention, and attributes of the continuation functions are taken. - On the caller side, the frontend can generate natural IR that directly uses the continuation functions as long as it prevents IPO with the coroutine until lowering has happened. In combination with the point above, the frontend is almost totally in charge of the ABI of the coroutine. - Unique-yield coroutines are given some special treatment. llvm-svn: 368788
* [FileCheck] Document FILECHECK_OPTS in -helpJoel E. Denny2019-08-141-0/+4
| | | | | | | | Reviewed By: thopre Differential Revision: https://reviews.llvm.org/D65707 llvm-svn: 368787
* [FileCheck] Move -dump-input diagnostic to first lineJoel E. Denny2019-08-142-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this patch, `-dump-input` prints a diagnostic at the end of its marker range. For example: ``` 1: Start. check:1 ^~~~~~ 2: Bad. next:2 X~~~ 3: Many lines next:2 ~~~~~~~~~~ 4: of input. next:2 ~~~~~~~~~ 5: End. next:2 ~~~~ error: no match found ``` This patch moves it to the beginning like this: ``` 1: Start. check:1 ^~~~~~ 2: Bad. next:2 X~~~ error: no match found 3: Many lines next:2 ~~~~~~~~~~ 4: of input. next:2 ~~~~~~~~~ 5: End. next:2 ~~~~ ``` The former somehow looks nicer because the diagnostic doesn't appear to be somewhere within the marker range. However, the latter is more practical, especially when the marker range includes the remainder of a very long dump. First, in the case of an error, this patch enables me to search the dump for `error:` and usually immediately land where the detected error began. Second, when trying to follow FileCheck's logic, it's best to read top down, so this patch enables me to see each diagnostic as soon as I encounter its marker. Reviewed By: thopre Differential Revision: https://reviews.llvm.org/D65702 llvm-svn: 368786
* Add __has_builtin support for builtin function-like type traits.Richard Smith2019-08-146-88/+273
| | | | | | | | | | | | | | | | | | | | | | | | Summary: Previously __has_builtin(__builtin_*) would return false for __builtin_*s that we modeled as keywords rather than as functions (because they take type arguments). With this patch, all builtins that are called with function-call-like syntax return true from __has_builtin (covering __builtin_* and also the __is_* and __has_* type traits and the handful of similar builtins without such a prefix). Update the documentation on __has_builtin and on type traits to match. While doing this I noticed the type trait documentation was out of date and incomplete; that's fixed here too. Reviewers: aaron.ballman Subscribers: jfb, kristina, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66100 llvm-svn: 368785
* [ELF] Initialize 2 fields of Symbol in SymbolTable::insertFangrui Song2019-08-142-0/+6
| | | | | | | | | | | | | | | | | | | A new symbol is added to elf::symtab in 3 steps: 1) SymbolTable::insert creates a placeholder. 2) Symbol::mergeProperties 3) Symbol::replace Fields referenced by steps 2) and 3) should be initialized in SymbolTable::insert. `traced` and `referenced` were missed previously. This did not cause problems because compilers generated code that initialized them (bit fields) to 0. Reviewed By: grimar Differential Revision: https://reviews.llvm.org/D66130 llvm-svn: 368784
* [libcxxabi] Define _LIBCXXABI_GUARD_ABI_ARM on WebAssemblySam Clegg2019-08-141-1/+2
| | | | | | | | | | This matches ItaniumCXXABI.cpp. Fixes PR42680 Differential Revision: https://reviews.llvm.org/D64961 llvm-svn: 368783
* Fix warning: suggest braces around initialization of subobjectJonas Devlieghere2019-08-141-5/+7
| | | | | | This patch adds braces to the DEFINE_XMM macro. llvm-svn: 368782
* [GlobalISel]: Fix lowering of G_Shuffle_vector where we pick up the wrong ↵Aditya Nandakumar2019-08-142-8/+35
| | | | | | | | source index https://reviews.llvm.org/D66182 llvm-svn: 368781
* [analyzer] Don't delete TaintConfig copy constructorAlex Langford2019-08-141-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: Explicitly deleting the copy constructor makes compiling the function `ento::registerGenericTaintChecker` difficult with some compilers. When we construct an `llvm::Optional<TaintConfig>`, the optional is constructed with a const TaintConfig reference which it then uses to invoke the deleted TaintConfig copy constructor. I've observered this failing with clang 3.8 on Ubuntu 16.04. Reviewers: compnerd, Szelethus, boga95, NoQ, alexshap Subscribers: xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, donat.nagy, dkrupp, Charusso, llvm-commits, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D66192 llvm-svn: 368779
* [ORC] Fix clang-interpreter example code broken by r368707.Douglas Yung2019-08-141-3/+4
| | | | llvm-svn: 368778
* [analyzer][NFC] Prepare visitors for different tracking kindsKristof Umann2019-08-145-88/+121
| | | | | | | | | | | | | | | | | | | | | | | When we're tracking a variable that is responsible for a null pointer dereference or some other sinister programming error, we of course would like to gather as much information why we think that the variable has that specific value as possible. However, the newly introduced condition tracking shows that tracking all values this thoroughly could easily cause an intolerable growth in the bug report's length. There are a variety of heuristics we discussed on the mailing list[1] to combat this, all of them requiring to differentiate in between tracking a "regular value" and a "condition". This patch introduces the new `bugreporter::TrackingKind` enum, adds it to several visitors as a non-optional argument, and moves some functions around to make the code a little more coherent. [1] http://lists.llvm.org/pipermail/cfe-dev/2019-June/062613.html Differential Revision: https://reviews.llvm.org/D64270 llvm-svn: 368777
* Update Python tests for lldb-server on WindowsAaron Smith2019-08-1417-17/+87
| | | | | | | | | | | | | | | | Summary: Thanks to Hui Huang and reviewers for all the help with this patch! Reviewers: labath, jfb, clayborg Reviewed By: labath Subscribers: Hui, clayborg, dexonsmith, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61687 llvm-svn: 368776
* [AArch64][GlobalISel] RBS: Treat s128s like vectors when unmerging.Amara Emerson2019-08-132-1/+25
| | | | | | | | The destinations should be FPRs (for now). Differential Revision: https://reviews.llvm.org/D66184 llvm-svn: 368775
* Enable lldb-server on WindowsAaron Smith2019-08-136-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This commit contains three small changes to enable lldb-server on Windows. - Add lldb-server for Windows to the build - Disable pty redirection on Windows for the initial lldb-server bring up - Add a support to get the parent pid for a process on Windows - Ifdef some signals which aren't supported on Windows Thanks to Hui Huang for the help with this patch! Reviewers: labath Reviewed By: labath Subscribers: JDevlieghere, compnerd, Hui, amccarth, xiaobai, srhines, mgorny, lldb-commits Tags: #lldb Differential Revision: https://reviews.llvm.org/D61686 llvm-svn: 368774
* [analyzer] Track the right hand side of the last store regardless of its valueKristof Umann2019-08-134-28/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The following code snippet taken from D64271#1572188 has an issue: namely, because `flag`'s value isn't undef or a concrete int, it isn't being tracked. int flag; bool coin(); void foo() { flag = coin(); } void test() { int *x = 0; int local_flag; flag = 1; foo(); local_flag = flag; if (local_flag) x = new int; foo(); local_flag = flag; if (local_flag) *x = 5; } This, in my opinion, makes no sense, other values may be interesting too. Originally added by rC185608. Differential Revision: https://reviews.llvm.org/D64287 llvm-svn: 368773
* [DebugLine] Be more robust in geussing the path styleJonas Devlieghere2019-08-131-3/+9
| | | | | | | | My previous change didn't fix the Windows bot. This patch is an attempt to make guessing the path style more robust by first looking at the compile dir and falling back to the actual file if that's unsuccessful. llvm-svn: 368772
* [analyzer] Prune calls to functions with linear CFGs that return a non-zero ↵Kristof Umann2019-08-134-49/+160
| | | | | | | | | | | | | | | | constrained value During the evaluation of D62883, I noticed a bunch of totally meaningless notes with the pattern of "Calling 'A'" -> "Returning value" -> "Returning from 'A'", which added no value to the report at all. This patch (not only affecting tracked conditions mind you) prunes diagnostic messages to functions that return a value not constrained to be 0, and are also linear. Differential Revision: https://reviews.llvm.org/D64232 llvm-svn: 368771
* [AArch64] Remove incorrect usage of MONonTemporal.Eli Friedman2019-08-131-2/+1
| | | | | | | This has no effect at the moment, but might matter if we try to implement non-temporal loads in the future. llvm-svn: 368770
* [analyzer] exploded-graph-rewriter: Implement displaying Store pointers.Artem Dergachev2019-08-133-1/+6
| | | | | | | | | They're useful when trying to understand what's going on inside your LazyCompoundValues. Differential Revision: https://reviews.llvm.org/D65427 llvm-svn: 368769
* [analyzer] exploded-graph-rewriter: Implement manual graph trimming.Artem Dergachev2019-08-132-11/+75
| | | | | | | | | | | | | | | | | | | When -trim-egraph is unavailable (say, when you're debugging a crash on a real-world code that takes too long to reduce), it makes sense to view the untrimmed graph up to the crashing node's predecessor, then dump the ID (or a pointer) of the node in the attached debugger, and then trim the dumped graph in order to keep only paths from the root to the node. The newly added --to flag does exactly that: $ exploded-graph-rewriter.py ExprEngine.dot --to 0x12229acd0 Multiple nodes can be specified. Stable IDs of nodes can be used instead of pointers. Differential Revision: https://reviews.llvm.org/D65345 llvm-svn: 368768
* [analyzer] exploded-graph-rewriter: NFC: Refactor explorers into trimmers.Artem Dergachev2019-08-132-26/+33
| | | | | | | | | | | | | | | | | | | | | | | Explorers aren't the right abstraction. For the purposes of displaying svg files we don't care in which order do we explore the nodes. We may care about this for other analyses, but we're not there yet. The function of cutting out chunks of the graph is performed poorly by the explorers, because querying predecessors/successors on the explored nodes yields original successors/predecessors even if they aren't being explored. Introduce a new entity, "trimmers", that do one thing but to it right: cut out chunks of the graph. Trimmers mutate the graph, so stale edges aren't even visible to their consumers in the pipeline. Additionally, trimmers are intrinsically composable: multiple trimmers can be applied to the graph sequentially. Refactor the single-path explorer into the single-path trimmer. Rename the test file for consistency. Differential Revision: https://reviews.llvm.org/D65344 llvm-svn: 368767
* [analyzer] exploded-graph-rewriter: Open the converted graph immediately.Artem Dergachev2019-08-132-8/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Change the default behavior: the tool no longer dumps the rewritten .dot file to stdout, but instead it automatically converts it into an .html file (which essentially wraps an .svg file) and immediately opens it with the default web browser. This means that the tool should now be fairly easy to use: $ exploded-graph-rewriter.py /tmp/ExprEngine.dot The benefits of wrapping the .svg file into an .html file are: - It'll open in a web browser, which is the intended behavior. An .svg file would be open with an image viewer/editor instead. - It avoids the white background around the otherwise dark svg area in dark mode. The feature can be turned off by passing a flag '--rewrite-only'. The LIT substitution is updated to enforce the old mode because we don't want web browsers opening on our buildbots. Differential Revision: https://reviews.llvm.org/D65250 llvm-svn: 368766
* [analyzer] Disable the checker-plugins test on Darwin.Artem Dergachev2019-08-131-0/+4
| | | | | | Fixes a buildbot. llvm-svn: 368765
* [ORC] Fix SpeculativeJIT example code broken by r368707.Lang Hames2019-08-131-6/+7
| | | | llvm-svn: 368764
* [Polly-ACC] Fix test after IR-printer change.Michael Kruse2019-08-131-1/+1
| | | | | | | After r367755, even unnamed parameters are printed in IR dumps. Change the test to expect te additional %0 in the line. llvm-svn: 368763
* [clang][DirectoryWatcher] Fix Windows stub after LLVM changeJan Korous2019-08-131-2/+4
| | | | | | | | | r367979 changed DirectoryWatcher::Create to return an llvm::Expected. Adjust the Windows stub accordingly. (upstreamed from github.com/apple/swift-clang) llvm-svn: 368762
* [clang] DirectoryWatcher for Windows stubs (to fix build break).Jan Korous2019-08-132-0/+50
| | | | | | | | | This is just a code skeleton for DirectoryWatcher-windows.cpp so the build on Windows stops breaking. (upstreamed from github.com/apple/swift-clang) llvm-svn: 368761
OpenPOWER on IntegriCloud