- Dec 14, 2016
-
-
Greg Clayton authored
When getting attributes it is sometimes nicer to use Optional<T> some of the time instead of magic values. I tried to cut over to only using the Optional values but it made many of the call sites very messy, so it makes sense the leave in the calls that can return a default value. Otherwise code that looks like this: uint64_t CallColumn = Die.getAttributeValueAsAddress(DW_AT_call_line, 0); Has to be turned into: uint64_t CallColumn = 0; if (auto CallColumnValue = Die.getAttributeValueAsAddress(DW_AT_call_line)) CallColumn = *CallColumnValue; The first snippet of code looks much better. But in cases where you want an offset that may or may not be there, the following code looks better: if (auto StmtOffset = Die.getAttributeValueAsSectionOffset(DW_AT_stmt_list)) { // Use StmtOffset } Differential Revision: https://reviews.llvm.org/D27772 llvm-svn: 289731
-
Justin Lebar authored
llvm-svn: 289730
-
Justin Lebar authored
Reviewers: tra Subscribers: llvm-commits, jholewinski Differential Revision: https://reviews.llvm.org/D27638 llvm-svn: 289729
-
Justin Lebar authored
Summary: Previously they were defined as a 2D char array in a header file. This is kind of overkill -- we can let the linker lay out these strings however it pleases. While we're at it, we might as well just inline these constants where they're used, as each of them is used only once. Also move NVPTXUtilities.{h,cpp} into namespace llvm. Reviewers: tra Subscribers: jholewinski, mgorny, llvm-commits Differential Revision: https://reviews.llvm.org/D27636 llvm-svn: 289728
-
Eric Fiselier authored
Summary: The standard requires tuple have the following constructors: ``` tuple(tuple<OtherTypes...> const&); tuple(tuple<OtherTypes...> &&); tuple(pair<T1, T2> const&); tuple(pair<T1, T2> &&); tuple(array<T, N> const&); tuple(array<T, N> &&); ``` However libc++ implements these as a single constructor with the signature: ``` template <class TupleLike, enable_if_t<__is_tuple_like<TupleLike>::value>> tuple(TupleLike&&); ``` This causes the constructor to reject types derived from tuple-like types; Unlike if we had all of the concrete overloads, because they cause the derived->base conversion in the signature. This patch fixes this issue by detecting derived types and the tuple-like base they are derived from. It does this by creating an overloaded function with signatures for each of tuple/pair/array and checking if the possibly derived type can convert to any of them. This patch fixes [PR17550]( https://llvm.org/bugs/show_bug.cgi?id=17550) This patch Reviewers: mclow.lists, K-ballo, mpark, EricWF Subscribers: cfe-commits Differential Revision: https://reviews.llvm.org/D27606 llvm-svn: 289727
-
Peter Collingbourne authored
Fixes PR31372. Differential Revision: https://reviews.llvm.org/D27776 llvm-svn: 289726
-
Dehao Chen authored
Summary: SampleProfileLoader pass may be invoked twice by LTO. The 2nd pass should not append more summary info as it is already preset by the 1st pass. Reviewers: eraman, davidxl Subscribers: mehdi_amini, llvm-commits Differential Revision: https://reviews.llvm.org/D27733 llvm-svn: 289725
-
Dehao Chen authored
llvm-svn: 289724
-
Jan Sjodin authored
llvm-svn: 289723
-
Davide Italiano authored
llvm-svn: 289722
-
Jan Sjodin authored
llvm-svn: 289721
-
Davide Italiano authored
llvm-svn: 289720
-
Davide Italiano authored
Also, udpate the ~60 failing tests in the tree which did not contain a valid datalayout. This fixes PR31123. lld will be updated in a following patch, immediately after this is committed. Differential Revision: https://reviews.llvm.org/D27082 llvm-svn: 289719
-
Filipe Cabecinhas authored
[asan] Don't skip instrumentation of masked load/store unless we've seen a full load/store on that pointer. Reviewers: kcc, RKSimon Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27625 llvm-svn: 289718
-
Filipe Cabecinhas authored
Reviewers: kcc Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D27548 llvm-svn: 289717
-
Eric Fiselier authored
llvm-svn: 289716
-
Dehao Chen authored
Summary: We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from clang to llvm pass manager builder. Reviewers: tejohnson, davidxl, dnovillo Subscribers: mehdi_amini, cfe-commits Differential Revision: https://reviews.llvm.org/D27744 llvm-svn: 289715
-
Dehao Chen authored
Summary: We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from clang to llvm pass manager builder. Reviewers: tejohnson, davidxl, dnovillo Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D27743 llvm-svn: 289714
-
Nico Weber authored
llvm-svn: 289713
-
Nico Weber authored
https://reviews.llvm.org/D27769 llvm-svn: 289712
-
Sean Callanan authored
LLDB needs some minor changes to adopt PrettyStackTrace after https://reviews.llvm.org/D27683. We remove our own SetCrashDescription() function and use LLVM-provided RAII objects instead. We also make sure LLDB doesn't define __crashtracer_info__ which would collide with LLVM's definition. Differential Revision: https://reviews.llvm.org/D27735 llvm-svn: 289711
-
Eric Fiselier authored
[libcxx] Fix PR24075, PR23841 - Add scoped_allocator_adaptor::construct(pair<T, U>*, ...) overloads. Summary: For more information see: * https://llvm.org/bugs/show_bug.cgi?id=23841 * https://llvm.org/bugs/show_bug.cgi?id=24075 I hope you have as much fun reviewing as I did writing these insane tests! Reviewers: mclow.lists, AlisdairM, EricWF Subscribers: AlisdairM, Potatoswatter, cfe-commits Differential Revision: https://reviews.llvm.org/D27612 llvm-svn: 289710
-
Eric Fiselier authored
Recommit r286884: P0503R0, adopted in Issaquah, rewords some requirements on nullptr_t and istream_iterator. No code changes were needed, but I updated a few tests. Also resolved P0509 and P0521, which required no changes to the library or tests. This patch was reverted due to llvm.org/PR31016. There is a bug in Clang 3.7 which causes default.pass.cpp to fails. That test is now marked as XFAIL for that clang version. This patch was originally authored by Marshall Clow. llvm-svn: 289708
-
Michal Gorny authored
Remove the includes of <llvm/Config/config.h> private LLVM header. The relevant files seem not to use any definitions from that file, and it is not available when building against installed LLVM. The use in lib/ReaderWriter/MachO/MachOLinkingContext.cpp originates from rL218718, and the use in ELF/Strings.cpp from rL274804 (where it was moved from Symbols.cpp). In both cases, they were added as a part of demangling support, and they provided HAVE_CXXABI_H. Since we are now using the LLVM demangler library instead, the code was removed and the includes and no longer necessary. Differential Revision: https://reviews.llvm.org/D27757 llvm-svn: 289707
-
Eli Friedman authored
Given that INSERT_VECTOR_ELT operates on D registers anyway, combining 64-bit vectors into a 128-bit vector is basically free. Therefore, try to split BUILD_VECTOR nodes before giving up and lowering them to a series of INSERT_VECTOR_ELT instructions. Sometimes this allows dramatically better lowerings; see testcases for examples. Inspired by similar code in the x86 backend for AVX. Differential Revision: https://reviews.llvm.org/D27624 llvm-svn: 289706
-
Nico Weber authored
llvm-svn: 289705
-
Robert Lougher authored
If all the operands to a phi node are compares that have a RHS constant, instcombine will try to pull them through the phi node, combining them into a single operation. When it does this, the debug location of the new op should be the merged debug locations of the phi node arguments. Patch 8 of 8 for D26256. Folding of a compare that has a RHS constant. Differential Revision: https://reviews.llvm.org/D26256 llvm-svn: 289704
-
Eli Friedman authored
Currently, there are substantial problems forming vld1_dup even if the VDUP survives legalization. The lack of an actual node leads to terrible results: not only can we not form post-increment vld1_dup instructions, but we form scalar pre-increment and post-increment loads which force the loaded value into a GPR. This patch fixes that by combining the vdup+load into an ARMISD node before DAGCombine messes it up. Also includes a crash fix for vld2_dup (see testcase @vld2dupi8_postinc_variable). Differential Revision: https://reviews.llvm.org/D27694 llvm-svn: 289703
-
Amjad Aboud authored
[DebugInfo] Changed DIBuilder::createCompileUnit() to take DIFile instead of FileName and Directory. This way it will be easier to expand DIFile (e.g., to contain checksum) without the need to modify the createCompileUnit() API. Reviewers: llvm-commits, rnk Differential Revision: https://reviews.llvm.org/D27762 llvm-svn: 289702
-
Amjad Aboud authored
[DebugInfo] Changed DIBuilder::createCompileUnit() to take DIFile instead of FileName and Directory. This way it will be easier to expand DIFile (e.g., to contain checksum) without the need to modify the createCompileUnit() API. Reviewers: cfe-commits, rnk Differential Revision: https://reviews.llvm.org/D27763 llvm-svn: 289701
-
Yaxun Liu authored
Removed a useless include which caused conflict. llvm-svn: 289700
-
Robert Lougher authored
If all the operands to a phi node are a binop with a RHS constant, instcombine will try to pull them through the phi node, combining them into a single operation. When it does this, the debug location of the new op should be the merged debug locations of the phi node arguments. Patch 7 of 8 for D26256. Folding of a binop with RHS constant. Differential Revision: https://reviews.llvm.org/D26256 llvm-svn: 289699
-
Richard Smith authored
llvm-svn: 289698
-
David Blaikie authored
This probably ended up this way aften the subprogram<>function link inversion and debug info metadata schema changes. llvm-svn: 289697
-
Geoff Berry authored
Summary: Move GVNHoist to later in the optimization pipeline, specifically, to the function simplification part of the pipeline. The new pipeline location allows GVNHoist to run on a function after its callees have been inlined but before the function has been considered for inlining into its callers, exposing more opportunities for hoisting. Performance results on AArch64 kryo: Improvements: Benchmarks/CoyoteBench/fftbench -24.952% spec2006/bzip2 -4.071% internal bmark -3.177% Benchmarks/PAQ8p/paq8p -1.754% spec2000/perlbmk -1.328% spec2006/h264ref -1.140% Regressions: internal bmark +1.818% Benchmarks/mafft/pairlocalalign +1.084% Reviewers: sebpop, dberlin, hiraditya Subscribers: aemerson, mehdi_amini, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D27722 llvm-svn: 289696
-
Jim Ingham authored
llvm-svn: 289695
-
Andrew Kaylor authored
Differential Revision: https://reviews.llvm.org/D27693 llvm-svn: 289694
-
Robert Lougher authored
If all the operands to a phi node are a cast, instcombine will try to pull them through the phi node, combining them into a single cast. When it does this, the debug location of the new cast should be the merged debug locations of the phi node arguments. Patch 6 of 8 for D26256. Folding of a cast operation. Differential Revision: https://reviews.llvm.org/D26256 llvm-svn: 289693
-
Tim Northover authored
Otherwise we don't get the correct predefines and so on in the front-end (or the right features in the backend). llvm-svn: 289692
-
Sean Callanan authored
llvm-svn: 289691
-