- Jul 09, 2018
-
-
Diego Caballero authored
This patch introduces a VPValue in VPBlockBase to represent the condition bit that is used as successor selector when a block has multiple successors. This information wasn't necessary until now, when we are about to introduce outer loop vectorization support in VPlan code gen. Reviewers: fhahn, rengolin, mkuper, hfinkel, mssimpso Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D48814 llvm-svn: 336554
-
Sam McCall authored
This is ported from r333881 to JSON's new home. llvm-svn: 336542
-
Sam McCall authored
Summary: This patch adds a new "integer" ValueType, and renames Number -> Double. This allows us to preserve the full precision of int64_t when parsing integers from the wire, or constructing from an integer. The API is unchanged, other than giving asInteger() a clearer contract. In addition, always output doubles with enough precision that parsing will reconstruct the same double. Reviewers: simon_tatham Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46209 llvm-svn: 336541
-
Sam McCall authored
Summary: This consists of four main parts: - an type json::Expr representing JSON values of dynamic kind, which can be composed, inspected, and modified - a JSON parser from string -> json::Expr - a JSON printer from json::Expr -> string, with optional pretty-printing - a convention for mapping json::Expr <=> native types (fromJSON/toJSON) Mapping functions are provided for primitives (e.g. int, vector) and the ObjectMapper helper helps implement fromJSON for struct/object types. Based on clangd's usage, a couple of places I'd appreciate review attention: - fromJSON returns only bool. A richer error-signaling mechanism may be useful to provide useful messages, or let recursive fromJSONs (containers/structs) do careful error recovery. - should json::obj be always explicitly written (like json::ary) - there's no streaming parse API. I suspect there are some simple wins like a callback API where the document is a long array, and each element is small. But this can probably be bolted on easily when we see the need. Reviewers: bkramer, labath Subscribers: mgorny, ilya-biryukov, ioeric, MaskRay, llvm-commits Differential Revision: https://reviews.llvm.org/D45753 llvm-svn: 336534
-
- Jul 07, 2018
-
-
Chijun Sima authored
llvm-svn: 336485
-
Chandler Carruth authored
For certain APIs, the return value of the function does not distinguish between failure (which populates errno) and other non-error conditions (which do not set errno). For example, `fgets` returns `NULL` both when an error has occurred, or upon EOF. If `errno` is already `EINTR` for whatever reason, then ``` RetryAfterSignal(nullptr, fgets, ...); ``` on a stream that has reached EOF would infinite loop. Fix this by setting `errno` to `0` before each attempt in `RetryAfterSignal`. Patch by Ricky Zhou! Differential Revision: https://reviews.llvm.org/D48755 llvm-svn: 336479
-
- Jul 06, 2018
-
-
Vedant Kumar authored
The replaceAllDbgUsesWith utility helps passes preserve debug info when replacing one value with another. This improves upon the existing insertReplacementDbgValues API by: - Updating debug intrinsics in-place, while preventing use-before-def of the replacement value. - Falling back to salvageDebugInfo when a replacement can't be made. - Moving the responsibiliy for rewriting llvm.dbg.* DIExpressions into common utility code. Along with the API change, this teaches replaceAllDbgUsesWith how to create DIExpressions for three basic integer and pointer conversions: - The no-op conversion. Applies when the values have the same width, or have bit-for-bit compatible pointer representations. - Truncation. Applies when the new value is wider than the old one. - Zero/sign extension. Applies when the new value is narrower than the old one. Testing: - check-llvm, check-clang, a stage2 `-g -O3` build of clang, regression/unit testing. - This resolves a number of mis-sized dbg.value diagnostics from Debugify. Differential Revision: https://reviews.llvm.org/D48676 llvm-svn: 336451
-
Sam McCall authored
Summary: Error's new operator<< is the first way to print an error without consuming it. formatv() can now print objects with an operator<< that works with raw_ostream. Reviewers: bkramer Subscribers: mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D48966 llvm-svn: 336412
-
Mandeep Singh Grang authored
Summary: The lib paths are not correctly picked up for OpenEmbedded sysroots (like arm-oe-linux-gnueabi). I fix this in a follow-up clang patch. But in order to add the correct libs I need to detect if the vendor is oe. For this reason, it is first necessary to teach llvm to detect oe vendor, which is what this patch does. Reviewers: chandlerc, compnerd, rengolin, javed.absar Reviewed By: compnerd Subscribers: kristof.beyls, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D48861 llvm-svn: 336401
-
- Jul 04, 2018
-
-
Aaron Ballman authored
llvm-svn: 336298
-
Jakub Kuderski authored
Summary: Previously, if a function accepts an optional DT pointer, ``` void Foo (.., DominatorTree * DT = nullptr) { ... if(DT) DomTreeUpdater(*DT, ...).insertEdge(A, B); if(DT){ DomTreeUpdater DTU(*DT, ...); ... // Construct the update vector and applyUpdates } ... if(DT){ DomTreeUpdater DTU(*DT, ...); ... // Construct the update vector and applyUpdates } } ``` After this patch, it can be simplified as ``` void Foo (.., DominatorTree * DT = nullptr) { DomTreeUpdater DTU(DT, ...); ... DTU.insertEdge(A, B); if(DT){ ... // Construct the update vector and applyUpdates } ... if(DT){ ... // Construct the update vector and applyUpdates } } ``` Patch by Chijun Sima <simachijun@gmail.com>. Reviewers: kuhar, brzycki, dmgreen Reviewed By: kuhar Author: NutshellySima Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48923 llvm-svn: 336294
-
Andrew Ng authored
ThinLTO cache file access times are used for expiration based pruning and since Vista, file access times are not updated by Windows by default: https://blogs.technet.microsoft.com/filecab/2006/11/07/disabling-last-access-time-in-windows-vista-to-improve-ntfs-performance This means on Windows, cache files are currently being pruned from creation time. This change manually updates cache files that are accessed by ThinLTO, when on Windows. Patch by Owen Reynolds. Differential Revision: https://reviews.llvm.org/D47266 llvm-svn: 336276
-
- Jul 03, 2018
-
-
John Brawn authored
The signature of setRegToConstant changed in r336171, so adjust the AArch64 unit test in a similar way to how the X86 unit test was changed in that commit. llvm-svn: 336188
-
John Brawn authored
The target does just enough to be able to run llvm-exegesis in latency mode for at least some opcodes. Differential Revision: https://reviews.llvm.org/D48780 llvm-svn: 336187
-
Chandler Carruth authored
of libstdc++, not just certain versions of GCC. The original macros broke when using Clang + libstdc++4.9 sadly. Sadly, testing for versions of libstdc++ has been extremely problematic in the past, so I'm just narrowing this down to Windows and when using libc++ as that seems at least very unlikely to keep build bots broken. llvm-svn: 336174
-
Clement Courbet authored
Summary: This fixes PR38008. Reviewers: gchatelet, RKSimon Subscribers: tschuett, craig.topper, llvm-commits Differential Revision: https://reviews.llvm.org/D48820 llvm-svn: 336171
-
Jakub Kuderski authored
Summary: This patch is the first in a series of patches related to the [[ http://lists.llvm.org/pipermail/llvm-dev/2018-June/123883.html | RFC - A new dominator tree updater for LLVM ]]. This patch introduces the DomTreeUpdater class, which provides a cleaner API to perform updates on available dominator trees (none, only DomTree, only PostDomTree, both) using different update strategies (eagerly or lazily) to simplify the updating process. —Prior to the patch— - Directly calling update functions of DominatorTree updates the data structure eagerly while DeferredDominance does updates lazily. - DeferredDominance class cannot be used when a PostDominatorTree also needs to be updated. - Functions receiving DT/DDT need to branch a lot which is currently necessary. - Functions using both DomTree and PostDomTree need to call the update function separately on both trees. - People need to construct an additional DeferredDominance class to use functions only receiving DDT. —After the patch— Patch by Chijun Sima <simachijun@gmail.com>. Reviewers: kuhar, brzycki, dmgreen, grosser, davide Reviewed By: kuhar, brzycki Author: NutshellySima Subscribers: vsk, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D48383 llvm-svn: 336163
-
Chandler Carruth authored
introducing llvm::trivially_{copy,move}_constructible type traits. This uses a completely portable implementation of these traits provided by Richard Smith. You can see it on compiler explorer in all its glory: https://godbolt.org/g/QEDZjW I have transcribed it, clang-formatted it, added some comments, and made the tests fit into a unittest file. I have also switched llvm::unique_function over to use these new, much more portable traits. =D Hopefully this will fix the build bot breakage from my prior commit. llvm-svn: 336161
-
Chandler Carruth authored
supporting move-only closures. Most of the core optimizations for std::function are here plus a potentially novel one that detects trivially movable and destroyable functors and implements those with fewer indirections. This is especially useful as we start trying to add concurrency primitives as those often end up with move-only types (futures, promises, etc) and wanting them to work through lambdas. As further work, we could add better support for things like const-qualified operator()s to support more algorithms, and r-value ref qualified operator()s to model call-once. None of that is here though. We can also provide our own llvm::function that has some of the optimizations used in this class, but with copy semantics instead of move semantics. This is motivated by increasing usage of things like executors and the task queue where it is useful to embed move-only types like a std::promise within a type erased function. That isn't possible without this version of a type erased function. Differential Revision: https://reviews.llvm.org/D48349 llvm-svn: 336156
-
- Jul 02, 2018
-
-
Jakub Kuderski authored
Temporary revert because of a failing test on some buildbots. This reverts commit r336114. llvm-svn: 336117
-
Jakub Kuderski authored
Summary: This patch is the first in a series of patches related to the [[ http://lists.llvm.org/pipermail/llvm-dev/2018-June/123883.html | RFC - A new dominator tree updater for LLVM ]]. This patch introduces the DomTreeUpdater class, which provides a cleaner API to perform updates on available dominator trees (none, only DomTree, only PostDomTree, both) using different update strategies (eagerly or lazily) to simplify the updating process. —Prior to the patch— - Directly calling update functions of DominatorTree updates the data structure eagerly while DeferredDominance does updates lazily. - DeferredDominance class cannot be used when a PostDominatorTree also needs to be updated. - Functions receiving DT/DDT need to branch a lot which is currently necessary. - Functions using both DomTree and PostDomTree need to call the update function separately on both trees. - People need to construct an additional DeferredDominance class to use functions only receiving DDT. —After the patch— Patch by Chijun Sima <simachijun@gmail.com>. Reviewers: kuhar, brzycki, dmgreen, grosser, davide Reviewed By: kuhar, brzycki Subscribers: vsk, mgorny, llvm-commits Author: NutshellySima Differential Revision: https://reviews.llvm.org/D48383 llvm-svn: 336114
-
- Jun 28, 2018
-
-
Benjamin Kramer authored
llvm-svn: 335921
-
Zachary Turner authored
The format string for formatv allows to specify a custom padding character instead of the default space. This custom character was parsed correctly, but not passed on to the formatter. Patch by Marcel Köppe Differential Revision: https://reviews.llvm.org/D48140 llvm-svn: 335915
-
Zachary Turner authored
FileOutputBuffer creates a temp file and on commit atomically renames the temp file to the destination file. Sometimes we want to modify an existing file in place, but still have the atomicity guarantee. To do this we can initialize the contents of the temp file from the destination file (if it exists), that way the resulting FileOutputBuffer can have only selective bytes modified. Committing will then atomically replace the destination file as desired. llvm-svn: 335902
-
John Brawn authored
This should fix a sanitizer buildbot failure. llvm-svn: 335862
-
John Brawn authored
This pass is being added in order to make the information available to BasicAA, which can't do caching of this information itself, but possibly this information may be useful for other passes. Incorporates code based on Daniel Berlin's implementation of Tarjan's algorithm. Differential Revision: https://reviews.llvm.org/D47893 llvm-svn: 335857
-
Pavel Labath authored
This reverts commit r335839, because it breaks the MSVC build. llvm-svn: 335844
-
Pavel Labath authored
Summary: This allows the implicit ArrayRef conversions to kick in when e.g. comparing ArrayRef to a SmallVector. Reviewers: zturner, dblaikie Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D48632 llvm-svn: 335839
-
- Jun 27, 2018
-
-
Zachary Turner authored
The code to emit the pieces of the MSF file were actually in PDBFileBuilder. Move this to MSFBuilder so that we can theoretically emit an MSF without having a PDB file. llvm-svn: 335789
-
Michael Kruse authored
Summary: The instantiation of the drop_begin function template usually fails because the functions begin() and end() do not exist. Only when using on a container from the std namespace (or `llvm::iterator_range`s of something derived from `std::iterator`), they are matched to std::begin() and std::end() due to Koenig-lookup. Explicitly use llvm::adl_begin and llvm::adl_end to make drop_begin applicable to anything iterable (including C-style arrays). A solution for general `llvm::iterator_range`s was already tried in r244620, but got reverted in r244621 due to MSVC not liking it. Reviewers: dblaikie, grosbach, aaron.ballman, ruiu Reviewed By: dblaikie, aaron.ballman Subscribers: aaron.ballman, llvm-commits Differential Revision: https://reviews.llvm.org/D48598 llvm-svn: 335772
-
Florian Hahn authored
llvm-svn: 335729
-
Nico Weber authored
llvm-svn: 335724
-
Justin Bogner authored
These were passing the wrong type into iterator_adaptor_base if T was anything but the default. llvm-svn: 335698
-
- Jun 26, 2018
-
-
Vedant Kumar authored
This addresses post-commit feedback about the name 'skipDebugInfo' being misleading. This name could be interpreted as meaning 'a function that skips instructions with debug locations'. The new name, 'skipDebugIntrinsics', makes it clear that this function only skips debug info intrinsics. Thanks to Adrian Prantl for pointing this out! llvm-svn: 335667
-
Tim Shen authored
Summary: This is trying to add support for r334428. Reviewers: sanjoy Subscribers: jlebar, hiraditya, bixia, llvm-commits Differential Revision: https://reviews.llvm.org/D48399 llvm-svn: 335646
-
Nico Weber authored
llvm-svn: 335608
-
Clement Courbet authored
Summary: This allows targets to override code generation for some instructions. As an example of override, this also moves ad-hoc instruction filtering for X86 into the X86 ExegesisTarget. Reviewers: gchatelet Subscribers: mgorny, tschuett, llvm-commits Differential Revision: https://reviews.llvm.org/D48587 llvm-svn: 335582
-
Lang Hames authored
symbolAliases can be used to define symbol aliases within a VSO. llvm-svn: 335565
-
Tim Shen authored
Reviewers: sanjoy, craig.topper Subscribers: jlebar, hiraditya, bixia, llvm-commits Differential Revision: https://reviews.llvm.org/D48498 llvm-svn: 335557
-
Eric Christopher authored
llvm-svn: 335547
-