- Aug 15, 2018
-
-
Alina Sbirlea authored
Summary: Certain passes or analysis need to view a CFG snapshot rather than the actual CFG. This patch provides GraphTraits to offer such a view. The patch defines GraphTraits for BasicBlock* and Inverse<BasicBlock*> to provide CFG successors and predecessors based on a list of CFG updates. An Update is defined as a triple {InsertOrDeleteKind, BlockStartOfEdge, BlockEndOfEdge}. A GraphDiff is defined as a list of Updates that has been preprocessed to treat the CFG as a graph rather than a multi-graph. As such, there can only exist a single Update given two nodes. All duplicates will be filtered and Insert/Delete edges that cancel out will be ignored. The methods GraphDiff exposes are: - Determine if an existing child needs to be ignored, i.e. an Update exists in the correct direction to assume the removal of that edge. - Return a list of new children to be considered, i.e. an Update exists in the correct direction for each child in the list to assume the insertion of that edge. Reviewers: timshen, kuhar, chandlerc Subscribers: sanjoy, jlebar, llvm-commits Differential Revision: https://reviews.llvm.org/D50479 llvm-svn: 339689 -
Nirav Dave authored
Patch by Henric Karlsson. llvm-svn: 339688
-
Kirill Bobyrev authored
This patch improves readability of multiple files in clang-tools-extra and enforces LLVM Coding Guidelines. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50707 llvm-svn: 339687
-
Simon Pilgrim authored
If each element is zero from one (or both) inputs then we can combine these into a single shuffle mask. llvm-svn: 339686
-
- Aug 14, 2018
-
-
Julie Hockett authored
Differential Revision: https://reviews.llvm.org/D50709 llvm-svn: 339685
-
Simon Pilgrim authored
We generate these shuffle patterns but we fail to combine them. llvm-svn: 339684
-
Sanjay Patel authored
llvm-svn: 339683
-
Fedor Sergeev authored
Increment existing NumInlined and NumDeleted stats in InlinerPass::run. llvm-svn: 339682
-
Sanjay Patel authored
llvm-svn: 339681
-
George Rimar authored
We have a dead piece of code there which is impossible to trigger using regular objects I believe. Patch removes it and adds a test case showing how this condition can be triggered with use of a broken object and crash the linker. llvm-svn: 339680
-
Simon Pilgrim authored
We still only use this for v16i8, but this cleans up the code to support v32i8/v64i8 sometime in the future. llvm-svn: 339679
-
Sven van Haastregt authored
llvm-svn: 339678
-
Sid Manning authored
Differential Revision: https://reviews.llvm.org/D50657 llvm-svn: 339677
-
Hsiangkai Wang authored
There are two forms for label debug information in DWARF format. 1. Labels in a non-inlined function: DW_TAG_label DW_AT_name DW_AT_decl_file DW_AT_decl_line DW_AT_low_pc 2. Labels in an inlined function: DW_TAG_label DW_AT_abstract_origin DW_AT_low_pc We will collect label information from DBG_LABEL. Before every DBG_LABEL, we will generate a temporary symbol to denote the location of the label. The symbol could be used to get DW_AT_low_pc afterwards. So, we create a mapping between 'inlined label' and DBG_LABEL MachineInstr in DebugHandlerBase. The DBG_LABEL in the mapping is used to query the symbol before it. The AbstractLabels in DwarfCompileUnit is used to process labels in inlined functions. We also keep a mapping between scope and labels in DwarfFile to help to generate correct tree structure of DIEs. It also generates label debug information under global isel. Differential Revision: https://reviews.llvm.org/D45556 llvm-svn: 339676
-
Louis Dionne authored
Summary: These #includes are quite important, since otherwise any #if TEST_STD_VER > 14 && defined(TEST_HAS_C11_FEATURES) checks are always false, and so we don't actually test for C11 support in the standard library. Reviewers: mclow.lists, EricWF Subscribers: christof, dexonsmith, cfe-commits Differential Revision: https://reviews.llvm.org/D50674 llvm-svn: 339675 -
Amara Emerson authored
Differential Revision: https://reviews.llvm.org/D49442 llvm-svn: 339674
-
Kirill Bobyrev authored
Add missed space, fix a typo. Reviewed by: ioeric Differential Revision: https://reviews.llvm.org/D50702 llvm-svn: 339673
-
George Rimar authored
The code involved was simply dead. `IgnoreAll` value is used in `maybeReportUndefined` only which is never called for -r. And at the same time `IgnoreAll` was set only for -r. llvm-svn: 339672
-
Stefan Granitz authored
llvm-svn: 339671
-
Simon Pilgrim authored
llvm-svn: 339670
-
Stefan Granitz authored
Fix: ConstString::GetConstCStringAndSetMangledCounterPart() should update the value if the key exists already Summary: This issue came up because it caused problems in our unit tests. The StringPool did connect counterparts only once and silently ignored the values passed in subsequent calls. The simplest solution for the unit tests would be silent overwrite. In practice, however, it seems useful to assert that we never overwrite a different mangled counterpart. If we ever have mangled counterparts for other languages than C++, this makes it more likely to notice collisions. I added an assertion that allows the following cases: * inserting a new value * overwriting the empty string * overwriting with an identical value I fixed the unit tests, which used "random" strings and thus produced collisions. It would be even better if there was a way to reset or isolate the StringPool, but that's a different story. Reviewers: jingham, friss, labath Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D50536 llvm-svn: 339669
-
David Chisnall authored
Summary: This probably fixes PR35277, though there may be other sources of nondeterminism (this was the only case of iterating over a DenseMap). It's difficult to provide a test case for this, because it shows up only on systems with ASLR enabled. Reviewers: rjmccall Reviewed By: rjmccall Subscribers: bmwiedemann, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D50559 llvm-svn: 339668
-
David Chisnall authored
This mangling is used only for outlined SEH finally blocks, which have internal linkage. This fixes the failure of CodeGenObjC/2007-04-03-ObjcEH.m on builds with expensive checks enabled, on Windows. This test should probably be specifying a triple: it currently picks up whatever the host environment is using. Unfortunately, I have no idea what it is trying to test, because it contains no comments and predates Clang having working Objective-C IR generation. llvm-svn: 339667
-
Simon Pilgrim authored
MSVC only accepts if-else chains up to 127 blocks long. I've had to merge a number of intrinsic cases together to get back below this limit, resulting in some duplication of string matches; this shouldn't cause any notable increase in runtime (and even then only for old IR, nothing that clang currently emits). llvm-svn: 339666
-
Ilya Biryukov authored
Summary: To avoid producing very verbose output in substitutions involving typedefs, e.g. T -> std::vector<std::string>::iterator gets turned into an unreadable mess when printed out for libstdc++, result contains internal types (std::__Vector_iterator<...>) and expanded well-defined typedefs (std::basic_string<char>). Until we improve the presentation code in clang, going with non-instantiated decls looks like a better UX trade-off. Reviewers: hokein, ioeric, kadircet Reviewed By: hokein Subscribers: MaskRay, jkorous, arphaman, cfe-commits Differential Revision: https://reviews.llvm.org/D50645 llvm-svn: 339665
-
Dean Michael Berris authored
This confirms expectations for multiple values provided through the driver when selecting specific modes and the order of appearance of individual values for the `-fxray-modes=` flag. This change just adds more test cases to an existing test file. llvm-svn: 339662
-
Tomasz Krupa authored
Summary: This adds constant folding of signed add/sub with saturation intrinsics. Reviewers: craig.topper, spatel, RKSimon, chandlerc, efriedma Reviewed By: craig.topper Subscribers: rnk, llvm-commits Differential Revision: https://reviews.llvm.org/D50499 llvm-svn: 339659
-
Kristof Umann authored
llvm-svn: 339655
-
Roger Ferrer Ibanez authored
This is a fix for r339314. MCInstBuilder uses the named parameter idiom and an 'operator MCInst&' to ease the creation of MCInsts. As the object of MCInstBuilder owns the MCInst is manipulating, the lifetime of the MCInst is bound to that of MCInstBuilder. In r339314 I bound a reference to the MCInst in an initializer. The temporary of MCInstBuilder (and also its MCInst) is destroyed at the end of the declaration leading to a dangling reference. Fix this by using MCInstBuilder inside an argument of a function call. Temporaries in function calls are destroyed in the enclosing full expression, so the the reference to MCInst is still valid when emitToStreamer executes. llvm-svn: 339654
-
Kristof Umann authored
[analyzer][UninitializedObjectChecker] Void pointers are casted back to their dynamic type in note message Differential Revision: https://reviews.llvm.org/D49228 llvm-svn: 339653
-
Chih-Mao Chen authored
llvm-svn: 339652
-
Tomasz Krupa authored
Summary: This is the patch that lowers x86 intrinsics to native IR in order to enable optimizations. Reviewers: craig.topper, spatel, RKSimon Reviewed By: craig.topper Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D46892 llvm-svn: 339651
-
Tomasz Krupa authored
Summary: This revision improves previous version (rL330322) which has been reverted due to crashes. This is the patch that lowers x86 intrinsics to native IR in order to enable optimizations. The patch also includes folding of previously missing saturation patterns so that IR emits the same machine instructions as the intrinsics. Reviewers: craig.topper, spatel, RKSimon Reviewed By: craig.topper Subscribers: mike.dvoretsky, DavidKreitzer, sroland, llvm-commits Differential Revision: https://reviews.llvm.org/D46179 llvm-svn: 339650
-
Aleksandr Urakov authored
Summary: In this patch I've tried to combine the best ideas from D49368 and D49410, so it implements following: - Completion of UDTs from a PDB with a filling of a layout info; - Pointers to members; - Fixes the bug relating to a virtual base offset reading from `vbtable`. The offset was treated as an unsigned, but it can be a negative sometimes. - Support of MSInheritance attribute Reviewers: asmith, zturner, rnk, labath, clayborg, lldb-commits Reviewed By: zturner Subscribers: aleksandr.urakov, stella.stamenova, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D49980 llvm-svn: 339649
-
Sjoerd Meijer authored
Differential Revision: https://reviews.llvm.org/D50511 llvm-svn: 339645
-
Max Kazantsev authored
llvm-svn: 339644
-
Max Kazantsev authored
llvm-svn: 339643
-
Martin Storsjo authored
This is essential when building with -nodefaultlibs. In some CMake versions (noticed in 3.5.1), the same libraries are picked up from CMAKE_REQUIRED_LIBRARIES in some exceptional situations (if CXX probing failed, due to libc++ not being built yet, the libraries from CMAKE_REQUIRED_LIBRARIES are used for linking the target library), but not at all in other newer CMake versions (3.10). This is similar to what already is done in libcxxabi in SVN r302760 and libcxx in SVN r312498. Differential Revision: https://reviews.llvm.org/D50663 llvm-svn: 339642
-
David Carlier authored
- Assuming strlcat is used with strlcpy we check as we can if the last argument does not equal os not larger than the buffer. - Advising the proper usual pattern. Reviewers: NoQ, george.karpenkov Reviewed By: george.karpenkov Differential Revision: https://reviews.llvm.org/D49722 llvm-svn: 339641
-
Teresa Johnson authored
Summary: When WPD is performed in a ThinLTO backend, the function may be created if it isn't already in that module. Module::getOrInsertFunction may add a bitcast, in which case the returned Constant is not a Function and doesn't have a name. Invoke stripPointerCasts() on the returned value where we access its name. Reviewers: pcc Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits Differential Revision: https://reviews.llvm.org/D49959 llvm-svn: 339640
-