- Jun 04, 2018
-
-
Jessica Paquette authored
This is setting up to fix bug 37573 cleanly. This moves data structures that are technically both used in some way by the target and the general-purpose outlining algorithm into MachineOutliner.h. In particular, the `Candidate` class is of importance. Before, the outliner passed the locations of `Candidates` to the target, which would then make some decisions about the prospective outlined function. This change allows us to just pass `Candidates` along to the target. This will allow the target to discard `Candidates` that would be considered unsafe before cost calculation. Thus, we will be able to remove the unsafe candidates described in the bug without resorting to torching the entire prospective function. Also, as a side-effect, it makes the outliner a bit cleaner. https://bugs.llvm.org/show_bug.cgi?id=37573 llvm-svn: 333952
-
Alexander Ivchenko authored
In preparation for the proposed linker ABI changes (https://github.com/hjl-tools/linux-abi/wiki/linux-abi-draft.pdf, https://github.com/hjl-tools/x86-psABI/wiki/x86-64-psABI-cet.pdf), this patch enables emission of the .note.gnu.property section to ELF object files when building CET-enabled modules. patch by mike.dvoretsky Differential Revision: https://reviews.llvm.org/D47145 llvm-svn: 333951
-
Amaury Sechet authored
llvm-svn: 333950
-
Amaury Sechet authored
llvm-svn: 333949
-
Erik Pilkington authored
These containers type-punned between pair<K, V> and pair<const K, V> as an optimization. This commit instead provides access to the pair via a pair of references that assign through to the underlying object. It's still undefined to mutate a const object, but clang doesn't optimize on this for data members, so this should be safe. Differential revision: https://reviews.llvm.org/D47607 llvm-svn: 333948
-
Scott Linder authored
Some overloads failed to update divergence. Differential Revision: https://reviews.llvm.org/D47148 llvm-svn: 333947
-
Artem Dergachev authored
Temporary object constructor inlining was disabled in r326240 for code like const int &x = A().x; because automatic destructor for the lifetime-extended object A() was not working correctly in CFG. CFG was fixed in r333941, so inlining can be re-enabled. CFG for lifetime extension through aggregates still needs to be fixed. Differential Revision: https://reviews.llvm.org/D44239 llvm-svn: 333946
-
Zachary Turner authored
Windows' CRT has a limit of 512 open file descriptors, and fds which are generated by converting a HANDLE via _get_osfhandle count towards this limit as well. Regardless, often you find yourself marshalling back and forth between native HANDLE objects and fds anyway. If we know from the getgo that we're going to need to work directly with the handle, we can cut out the marshalling layer while also not contributing to filling up the CRT's very limited handle table. On Unix these functions just delegate directly to the existing set of functions since an fd *is* the native file type. It would be nice, very long term, if we could convert most uses of fds to file_t. Differential Revision: https://reviews.llvm.org/D47688 llvm-svn: 333945
-
Craig Topper authored
[X86] Avoid passing _mm_undefined* to builtin_shufflevector if we are able to pass the first input a second time. This is more consistent with other usages of builtin_shufflevector. Later optimization passes or codegen will detect the duplicate vector and replace it with undef. Using _mm_undefined just puts a zeroinitializer that still needs to be optimized out later. llvm-svn: 333944
-
Amaury Sechet authored
Summary: This include variant for add, uaddo and addcarry. usubo and subcarry require the carry to be flipped to preserve semantic, but we chose to do the transform anyway in that case as to push the transform down the carry chain. Reviewers: efriedma, spatel, RKSimon, zvi, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46505 llvm-svn: 333943
-
Teresa Johnson authored
Summary: These tools failed for a very large bitcode file produced by LTO due to 64-bit values being assigned to 32-bit types. For the BitstreamReader.h fix, the value initially fit into the 32-bit unsigned, but there was an overflow when multiplying by 32 furter below to compute the bit offset. No test case in the patch as this requires a huge bitcode file. Reviewers: pcc, george.karpenkov Subscribers: mehdi_amini, a.sidorin, llvm-commits Differential Revision: https://reviews.llvm.org/D47731 llvm-svn: 333942
-
Artem Dergachev authored
In code like const int &x = A().x; automatic destructor for the object A() lifetime-extended by reference 'x' was not present in the clang CFG due to ad-hoc pattern-matching in getReferenceInitTemporaryType(). Re-use skipRValueSubobjectAdjustments() again to find the lifetime-extended object in the AST and emit the correct destructor. Lifetime extension through aggregates with references still needs to be covered. Differential Revision: https://reviews.llvm.org/D44238 llvm-svn: 333941
-
Alexander Shaposhnikov authored
Add missing aliases for --strip-debug: -g, -S, -d. Test plan: make check-all Differential revision: https://reviews.llvm.org/D47674 llvm-svn: 333940
-
Amaury Sechet authored
Summary: It has been deprecated in favor of SETCCCARRY for a year now and isn't used by any in tree backend. Reviewers: efriedma, craig.topper, dblaikie, bkramer Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47685 llvm-svn: 333939
-
Heejin Ahn authored
Summary: Because `llvm::Triple` can be derived from `TargetInfo`, it is simpler to take only `TargetInfo` argument. Reviewers: sbc100 Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D47620 llvm-svn: 333938
-
Dmitry Mikulin authored
entries to reach the target. Since these calls don't require type checks, we can short-circuit them to their real targets, except in cases when they can be pre-empted. Differential Revision: https://reviews.llvm.org/D46326 llvm-svn: 333937
-
Julie Hockett authored
llvm-svn: 333936
-
Craig Topper authored
[X86] Don't pass ParitySrc array into isAddSubOrSubAddMask. Instead use a bool output parameter to get the real piece of info we care about. NFC The ParitySrc array is more of an implementation detail. A single bool to get the final parity is sufficient. llvm-svn: 333935
-
Stanislav Mekhanoshin authored
After last changes some code can be simplified. Differential Revision: https://reviews.llvm.org/D47661 llvm-svn: 333934
-
Zachary Turner authored
Host depended on clang because HostInfo had a function to get the directory where clang was installed. We move this over to the clang expression parser plugin where it's more at home. Differential Revision: https://reviews.llvm.org/D47384 llvm-svn: 333933
-
Julie Hockett authored
Implements a simple, in-memory reducer for the mapped output of the initial tool. This creates a collection object for storing the deduplicated infos on each declaration, and populates that from the mapper output. The collection object is serialized to LLVM bitstream. On reading each serialized output, it checks to see if a merge is necessary and if so, merges the new info with the existing info (prefering the existing one if conflicts exist). For a more detailed overview of the tool, see the design document on the mailing list: http://lists.llvm.org/pipermail/cfe-dev/2017-December/056203.html Differential Revision: https://reviews.llvm.org/D43341 llvm-svn: 333932
-
Stanislav Mekhanoshin authored
Differential Revision: https://reviews.llvm.org/D47664 llvm-svn: 333931
-
Vedant Kumar authored
Change the syntax of the malloc and free commands in lldb-test's ir-memory-map subcommand to: <malloc> ::= <label> = malloc <size> <alignment> <free> ::= free <label> This should make it easier to read and extend tests in the future, e.g to test IRMemoryMap::WriteMemory or double-free behavior. Differential Revision: https://reviews.llvm.org/D47646 llvm-svn: 333930
-
Sam Clegg authored
This is a followup to rL333496. Differential Revision: https://reviews.llvm.org/D47544 llvm-svn: 333929
-
Sam Clegg authored
Differential Revision: https://reviews.llvm.org/D47727 llvm-svn: 333928
-
John Brawn authored
When checking a select to see if it matches an abs, allow the true/false values to be a sign-extension of the comparison value instead of requiring that they're directly the comparison value, as all the comparison cares about is the sign of the value. This fixes a regression due to r333702, where we were no longer generating ctlz due to isKnownNonNegative failing to match such a pattern. Differential Revision: https://reviews.llvm.org/D47631 llvm-svn: 333927
-
Mark Searles authored
On GFX9 and earlier, flat memory ops may decrement VMCNT out-of-order as well as LGKMCNT out-of-order. Differential Revision: https://reviews.llvm.org/D46616 llvm-svn: 333926
-
Simon Pilgrim authored
These methods should only be using SelectionDAG for analysis (known/sign bits etc), not node creation. llvm-svn: 333925
-
Benjamin Kramer authored
llvm-svn: 333924
-
Leonard Chan authored
// Primary fixed point types signed short _Accum s_short_accum; signed _Accum s_accum; signed long _Accum s_long_accum; unsigned short _Accum u_short_accum; unsigned _Accum u_accum; unsigned long _Accum u_long_accum; // Aliased fixed point types short _Accum short_accum; _Accum accum; long _Accum long_accum; This diff only allows for declaration of the fixed point types. Assignment and other operations done on fixed point types according to http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1169.pdf will be added in future patches. The saturated versions of these types and the equivalent _Fract types will also be added in future patches. The tests included are for asserting that we can declare these types. Fixed the test that was failing by not checking for dso_local on some targets. Differential Revision: https://reviews.llvm.org/D46084 llvm-svn: 333923
-
Andrea Di Biagio authored
This patch is the last of a sequence of three patches related to LLVM-dev RFC "MC support for variant scheduling classes". http://lists.llvm.org/pipermail/llvm-dev/2018-May/123181.html This fixes PR36672. The main goal of this patch is to teach llvm-mca how to solve variant scheduling classes. This patch does that, plus it adds new variant scheduling classes to the BtVer2 scheduling model to identify so-called zero-idioms (i.e. so-called dependency breaking instructions that are known to generate zero, and that are optimized out in hardware at register renaming stage). Without the BtVer2 change, this patch would not have had any meaningful tests. This patch is effectively the union of two changes: 1) a change that teaches llvm-mca how to resolve variant scheduling classes. 2) a change to the BtVer2 scheduling model that allows us to special-case packed XOR zero-idioms (this partially fixes PR36671). Differential Revision: https://reviews.llvm.org/D47374 llvm-svn: 333909
-
Alexander Ivchenko authored
Resubmit of r333424. This version contains the fix for fails found by buildbots on some targets. This patch allows parsing GNU_PROPERTY_X86_FEATURE_1_AND notes in .note.gnu.property sections. These notes indicate that the object file is built to support Intel CET. patch by mike.dvoretsky Differential Revision: https://reviews.llvm.org/D47473 llvm-svn: 333908
-
Krzysztof Parzyszek authored
llvm-svn: 333907
-
Ilya Biryukov authored
Summary: This should, arguably, give better ranking. Reviewers: ioeric, sammccall Reviewed By: sammccall Subscribers: mgorny, klimek, MaskRay, jkorous, mgrang, cfe-commits Differential Revision: https://reviews.llvm.org/D46943 llvm-svn: 333906
-
Nicolai Haehnle authored
Summary: Avoid name clashes with the corresponding bit fields in the instruction encoding. Change-Id: Id1644e703e976e78f7af93788d9f44cb48c3251f Reviewers: arsenm, rampitec, kzhuravl Subscribers: wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D47433 llvm-svn: 333905
-
Nicolai Haehnle authored
Summary: Implicit casting is a simple quality of life improvement. Change-Id: I3d2b31b8b8f12cbb1e84f691e359fa713a9c4b42 Reviewers: tra, simon_tatham, craig.topper, MartinO, arsenm Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D47432 llvm-svn: 333904
-
Mikhail R. Gadelha authored
Summary: This is a prototype of a bug reporter visitor that invalidates bug reports by re-checking constraints of certain states on the bug path using the Z3 constraint manager backend. The functionality is available under the `crosscheck-with-z3` analyzer config flag. Reviewers: george.karpenkov, NoQ, dcoughlin, rnkovacs Reviewed By: george.karpenkov Subscribers: rnkovacs, NoQ, george.karpenkov, dcoughlin, xbolva00, ddcc, mikhail.ramalho, MTC, fhahn, whisperity, baloghadamsoftware, szepet, a.sidorin, gsd, dkrupp, xazax.hun, cfe-commits Differential Revision: https://reviews.llvm.org/D45517 llvm-svn: 333903
-
Nicola Zaghen authored
llvm-svn: 333902
-
Nicolai Haehnle authored
Summary: Change-Id: I1442e2daa09cab727a01d8c31893b50e644a5cd3 Reviewers: tra, simon_tatham, craig.topper Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D47530 Change-Id: I397655dd18b7ff978c1affa3174740d9c1a82594 llvm-svn: 333901
-
Nicolai Haehnle authored
Summary: The new rules are straightforward. The main rules to keep in mind are: 1. NAME is an implicit template argument of class and multiclass, and will be substituted by the name of the instantiating def/defm. 2. The name of a def/defm in a multiclass must contain a reference to NAME. If such a reference is not present, it is automatically prepended. And for some additional subtleties, consider these: 3. defm with no name generates a unique name but has no special behavior otherwise. 4. def with no name generates an anonymous record, whose name is unique but undefined. In particular, the name won't contain a reference to NAME. Keeping rules 1&2 in mind should allow a predictable behavior of name resolution that is simple to follow. The old "rules" were rather surprising: sometimes (but not always), NAME would correspond to the name of the toplevel defm. They were also plain bonkers when you pushed them to their limits, as the old version of the TableGen test case shows. Having NAME correspond to the name of the toplevel defm introduces "spooky action at a distance" and breaks composability: refactoring the upper layers of a hierarchy of nested multiclass instantiations can cause unexpected breakage by changing the value of NAME at a lower level of the hierarchy. The new rules don't suffer from this problem. Some existing .td files have to be adjusted because they ended up depending on the details of the old implementation. Change-Id: I694095231565b30f563e6fd0417b41ee01a12589 Reviewers: tra, simon_tatham, craig.topper, MartinO, arsenm, javed.absar Subscribers: wdng, llvm-commits Differential Revision: https://reviews.llvm.org/D47430 llvm-svn: 333900
-