Commit Graph

303336 Commits

Author SHA1 Message Date
Adrian Prantl dced6ee923 Remove the expectedFlakeyDsym decorator. It's not useful anymore.
llvm-svn: 346906
2018-11-14 22:54:43 +00:00
Eric Fiselier 5828115e58 Attempt to show progress bar in benchmark tests
llvm-svn: 346905
2018-11-14 22:49:42 +00:00
Eric Fiselier 1dbe7ec946 Exclude check-cxx-benchmarks from the global test target.
llvm-svn: 346904
2018-11-14 22:48:43 +00:00
Simon Pilgrim e8cc5e4e03 [X86] Update masked expandload/compressstore test names
llvm-svn: 346903
2018-11-14 22:44:08 +00:00
Sanjay Patel 4832ffee39 [InstSimplify] add more tests for funnel shift with select; NFC
The cases are just different enough that we should have 
complete tests to avoid bugs from typos in the code.

llvm-svn: 346902
2018-11-14 22:34:25 +00:00
Jessica Paquette 27e1754fc9 [MachineOutliner][NFC] Don't compute liveness if X16/X17/NZCV are unused
Using the MBB flags, we can tell if X16/X17/NZCV are unused in a block,
and also not live out.

If this holds for all MBBs, then we can avoid checking for liveness on
that candidate. Furthermore, if it holds for an individual candidate's
MBB, then we can avoid checking for liveness on that candidate.

llvm-svn: 346901
2018-11-14 22:23:38 +00:00
Jason Molenda 2a8a665e1f update xcode project file for reproducers.
llvm-svn: 346900
2018-11-14 22:14:07 +00:00
Teresa Johnson f3d2453d4d Remove unused getMDNodeFwdRefOrNull interfaces (NFC)
Summary:
Followup from D53596/r346891. Remove the getMDNodeFwdRefOrNull interface
to the MDLoader since it is no longer used. Also improve error messages
when the internal implementation is used within the MDLoader.

Reviewers: steven_wu

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D54542

llvm-svn: 346899
2018-11-14 21:57:51 +00:00
Simon Pilgrim 9d9353aef5 [X86][SSE] Add SSE2/SSE42 masked load/store tests
Now that the load/store tests are split the impact of running the tests on multiple (illegal) targets is a lot less impactful

llvm-svn: 346896
2018-11-14 21:31:50 +00:00
Nirav Dave 1241dcb3cf Bias physical register immediate assignments
The machine scheduler currently biases register copies to/from
physical registers to be closer to their point of use / def to
minimize their live ranges. This change extends this to also physical
register assignments from immediate values.

This causes a reduction in reduction in overall register pressure and
minor reduction in spills and indirectly fixes an out-of-registers
assertion (PR39391).

Most test changes are from minor instruction reorderings and register
name selection changes and direct consequences of that.

Reviewers: MatzeB, qcolombet, myatsina, pcc

Subscribers: nemanjai, jvesely, nhaehnle, eraman, hiraditya,
  javed.absar, arphaman, jfb, jsji, llvm-commits

Differential Revision: https://reviews.llvm.org/D54218

llvm-svn: 346894
2018-11-14 21:11:53 +00:00
Simon Atanasyan b0486051d2 [ELF] Make TrapInstr and Filler byte arrays. NFC.
The uint32_t type does not clearly convey that these fields are interpreted
in the target endianness. Converting them to byte arrays should make this
more obvious and less error-prone.

Patch by James Clarke

Differential Revision: http://reviews.llvm.org/D54207

llvm-svn: 346893
2018-11-14 21:05:20 +00:00
Richard Smith 28ddb91dec [c++20] Implement P0482R6: enable -fchar8_t by default in C++20 mode.
This unfortunately results in a substantial breaking change when
switching to C++20, but it's not yet clear what / how much we should
do about that. We may want to add a compatibility conversion from
u8 string literals to const char*, similar to how C++98 provided a
compatibility conversion from string literals to non-const char*,
but that's not handled by this patch.

The feature can be disabled in C++20 mode with -fno-char8_t.

llvm-svn: 346892
2018-11-14 21:04:34 +00:00
Teresa Johnson f61a563a19 [ThinLTO] Fix a crash in lazy loading of Metadata
This is a revised version of D41474.

When the debug location is parsed in BitcodeReader::parseFunction, the
scope and inlinedAt MDNodes are obtained via MDLoader->getMDNodeFwdRefOrNull(),
which will create a forward ref if they were not yet loaded.
Specifically, if one of these MDNodes is in the module level metadata
block, and this is during ThinLTO importing, that metadata block is
lazily loaded.

Most places in that invoke getMDNodeFwdRefOrNull have a corresponding call
to resolveForwardRefsAndPlaceholders which will take care of resolving them.
E.g. places that call getMetadataFwdRefOrLoad, or at the end of parsing a
function-level metadata block, or at the end of the initial lazy load of
module level metadata in order to handle invocations of getMDNodeFwdRefOrNull
for named metadata and global object attachments. However, the calls for
the scope/inlinedAt of debug locations are not backed by any such call to
resolveForwardRefsAndPlaceholders.

To fix this, change the scope and inlinedAt parsing to instead use
getMetadataFwdRefOrLoad, which will ensure the forward refs to lazily
loaded metadata are resolved.

Fixes PR35472.

llvm-svn: 346891
2018-11-14 20:58:04 +00:00
Simon Pilgrim be527b545f [X86] Split masked load/store test files
llvm-svn: 346889
2018-11-14 20:44:59 +00:00
Eric Fiselier 336a1a6811 Rename cxx-benchmark-unittests target and convert to LIT.
This patch renames the cxx-benchmark-unittests to check-cxx-benchmarks
and converts the target to use LIT in order to make the tests run faster
and provide better output.

In particular this runs each benchmark in a suite one by one, allowing
more parallelism while ensuring output isn't garbage with multiple threads.

Additionally, it adds the CMake flag '-DLIBCXX_BENCHMARK_TEST_ARGS=<list>'
to specify what options are passed when running the benchmarks.

llvm-svn: 346888
2018-11-14 20:38:46 +00:00
Simon Pilgrim 7f15568c40 [X86] Update masked load/store test names
llvm-svn: 346887
2018-11-14 20:25:50 +00:00
Aakanksha Patil 1a60116b5c AMDGPU: Additional pattern for i16 median3 matching
min(max(a, b), max(min(a, b), c))

Differential Revision: https://reviews.llvm.org/D54494

llvm-svn: 346886
2018-11-14 20:10:41 +00:00
Vedant Kumar 808e157356 Mark @llvm.trap cold
A call to @llvm.trap can be expected to be cold (i.e. unlikely to be
reached in a normal program execution).

Outlining paths which unconditionally trap is an important memory
saving. As the hot/cold splitting pass (imho) should not treat all
noreturn calls as cold, explicitly mark @llvm.trap cold so that it can
be outlined.

Split out of https://reviews.llvm.org/D54244.

Differential Revision: https://reviews.llvm.org/D54329

llvm-svn: 346885
2018-11-14 19:53:41 +00:00
Scott Linder c0830f5577 [Support] Teach YAMLIO about polymorphic types
Add support for "polymorphic" types to YAMLIO.

PolymorphicTraits can dynamically switch between other traits (Scalar, Map, or
Sequence). When inputting, the PolymorphicTraits type is told which type to
become, and when outputting the PolymorphicTraits type is asked which type it
currently is.

Also add support for TaggedScalarTraits to allow dynamically differentiating
between multiple scalar types using YAML tags.

Serialize empty maps as "{}" and empty sequences as "[]", so that types
are preserved when round-tripping PolymorphicTraits. This change has
equivalent semantics, but may break e.g. tests which compare output
verbatim.

Differential Revision: https://reviews.llvm.org/D48144

llvm-svn: 346884
2018-11-14 19:39:59 +00:00
Teresa Johnson 32dc5b9bf1 [ThinLTO] Update handling of vararg functions to match inliner
Summary:
Previously we marked all vararg functions as non-inlinable in the
function summary, which prevented their importing. However, the
corresponding inliner restriction was loosened in r321940/r342675
to only apply to functions calling va_start. Adjust the summary
flag computation to match.

Reviewers: davidxl

Subscribers: mehdi_amini, inglorion, eraman, steven_wu, dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D54270

llvm-svn: 346883
2018-11-14 19:30:13 +00:00
Shoaib Meenai d84cf13690 [AST] Fix typo in MicrosoftMangle
Correct the spelling from Artifical to Artificial.

Differential Revision: https://reviews.llvm.org/D54536

llvm-svn: 346882
2018-11-14 19:16:22 +00:00
Sanjay Patel 7d028670f6 [InstSimplify] add tests for funnel shift with select; NFC
llvm-svn: 346881
2018-11-14 19:12:54 +00:00
Sam Clegg e4afbc6804 [WebAssembly] Add support for dylink section in object format
See https://github.com/WebAssembly/tool-conventions/blob/master/DynamicLinking.md.

Differential Revision: https://reviews.llvm.org/D54490

llvm-svn: 346880
2018-11-14 18:36:24 +00:00
Craig Topper 6c94264b1f [X86] Allow pmulh to be formed from narrow vXi16 vectors under -x86-experimental-vector-widening-legalization
Narrower vectors will be widened to 128 bits without changing the element size. And generic type legalization can already handle widening mulhu/mulhs.

Differential Revision: https://reviews.llvm.org/D54513

llvm-svn: 346879
2018-11-14 18:16:21 +00:00
Alexander Richardson f0b757e231 [libcxx] [test] Fix running tests on macOS with python3
Summary:
The result of subprocess.check_output() is bytes in python3 which we need
to convert to str(). Simplify this by using the executeCommand() helper.

Reviewers: ldionne, EricWF

Reviewed By: ldionne

Subscribers: christof, libcxx-commits

Differential Revision: https://reviews.llvm.org/D54522

llvm-svn: 346878
2018-11-14 17:58:55 +00:00
Sean Fertile 614dc11ca8 [PPC64] Long branch thunks.
On PowerPC64, when a function call offset is too large to encode in a call
instruction the address is stored in a table in the data segment. A thunk is
used to load the branch target address from the table relative to the
TOC-pointer and indirectly branch to the callee. When linking position-dependent
code the addresses are stored directly in the table, for position-independent
code the table is allocated and filled in at load time by the dynamic linker.

For position-independent code the branch targets could have gone in the .got.plt
but using the .branch_lt section for both position dependent and position
independent binaries keeps it consitent and helps keep this PPC64 specific logic
seperated from the target-independent code handling the .got.plt.

Differential Revision: https://reviews.llvm.org/D53408

llvm-svn: 346877
2018-11-14 17:56:43 +00:00
Sean Fertile 36eef925c0 [NFC] Change address __tls_getaddr is defined at so it does not need a thunk.
Minor update to a ppc64 tls test so that it won't need to use a thunk once the
range-extending thunk patch is landed.

llvm-svn: 346876
2018-11-14 17:56:38 +00:00
Mandeep Singh Grang 0905fc77c1 [InstCombine] Remove a couple of asserts based on incorrect assumptions
Summary:
These asserts are based on the assumption that the order of true/false operands in a select and those in the compare would always be the same.
This fixes PR39595.

Reviewers: craig.topper, spatel, dmgreen

Reviewed By: craig.topper

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D54359

llvm-svn: 346874
2018-11-14 17:55:07 +00:00
Zachary Turner fca18e94e1 Fix some compilation failures introduced in recent patches.
This fixes two compilation failures:

  1) Designated initializers are C++20.  We can't use them in LLVM.
  2) thread_result_t is not a pointer type on all platforms, so
     returning nullptr is an error.

llvm-svn: 346873
2018-11-14 17:22:09 +00:00
Kadir Cetinkaya c9b1b100e4 [clangd] Delete unused includes.
llvm-svn: 346872
2018-11-14 17:07:39 +00:00
Sanjay Patel 6072842770 [InstCombine] fix formatting for matchBSwap(); NFC
We should have a similar function for matching rotate and/or 
funnel shift, so tidy up the related existing call.

llvm-svn: 346871
2018-11-14 16:03:36 +00:00
Florian Hahn 6df11868b5 [VPlan, SLP] Use SmallPtrSet for Candidates.
This slightly improves the candidate handling in getBest().

llvm-svn: 346870
2018-11-14 15:58:40 +00:00
John Brawn 9fd8c20c4f [SimplifyCFG] Regenerate preserve-branchweights.ll test. NFC
Regenerate this test using update_test_checks.py in preparation for an
upcomming commit, to make it not depend on the names of instructions.

llvm-svn: 346869
2018-11-14 15:27:07 +00:00
Simon Pilgrim 2b166c5044 [TTI] getOperandInfo - a broadcast shuffle means the result is OK_UniformValue
llvm-svn: 346868
2018-11-14 15:04:08 +00:00
Pavel Labath 07e93c57a3 Move DataExtractorTest to unittests/Utility
The DataExtractor class itself was moved to Utility some time ago, but
it seems this was not reflected in the location of the test code. Fix
that.

llvm-svn: 346867
2018-11-14 14:58:36 +00:00
David Bolvansky 3cc2ef80d1 Reverted D52835 to fix review comments
llvm-svn: 346866
2018-11-14 14:27:51 +00:00
David Bolvansky a208bbd576 [Diagnostics] Check integer to floating point number implicit conversions
Summary:
GCC already catches these situations so we should handle it too.

GCC warns in C++ mode only (does anybody know why?). I think it is useful in C mode too.

Reviewers: rsmith, erichkeane, aaron.ballman, efriedma, xbolva00

Reviewed By: xbolva00

Subscribers: efriedma, craig.topper, scanon, cfe-commits

Differential Revision: https://reviews.llvm.org/D52835

llvm-svn: 346865
2018-11-14 14:24:33 +00:00
Bruno Ricci 2257cbb858 [AST][NFC] Order the bit-field classes of Stmt like in StmtNodes.td
Reorder the bit-field classes and the members of the anonymous union
so that they both match the order in StmtNodes.td.

There is already a fair amount of them, and this is not going to
improve. Therefore lets try to keep some order here.

Strictly NFC.

llvm-svn: 346864
2018-11-14 14:19:34 +00:00
Peter Smith ad51cee866 [AArch64] Fix resolution of R_PLT_PAGE RelExpr
The R_AARCH64_ADR_PREL_PG_HI21 relocation type is given the R_PAGE_PC
RelExpr. This can be transformed to R_PLT_PAGE_PC via toPlt().
Unfortunately the resolution is identical to R_PAGE_PC so instead of
getting the address of the PLT entry we get the address of the symbol
which may not be correct in the case of static ifuncs. The fix is to
handle the cases separately and use getPltVA() + A with R_PLT_PAGE_PC.

Differential Revision: https://reviews.llvm.org/D54474

llvm-svn: 346863
2018-11-14 13:53:47 +00:00
Andrey Churbanov 82318c6f14 Fix for bugzilla https://bugs.llvm.org/show_bug.cgi?id=39137.
Do not write to internal structure if it keeps same value.

Differential Revision: https://reviews.llvm.org/D54305

llvm-svn: 346862
2018-11-14 13:49:41 +00:00
Paul Robinson a6a19c00d5 Document how to comment an actual parameter.
Differential Revision: https://reviews.llvm.org/D54446

llvm-svn: 346861
2018-11-14 13:43:19 +00:00
Florian Hahn 02cb67deb9 [VPlan] Remove LLVM_DEBUG from VPlanSlp::dumpBundle.
The caller should take care of only calling it with debug enabled.

llvm-svn: 346860
2018-11-14 13:33:44 +00:00
Simon Pilgrim e414b03878 [TTI] Pull out repeated 'ConcreteTTI' static_casts. NFCI.
llvm-svn: 346859
2018-11-14 13:23:28 +00:00
Florian Hahn 2eca3728ee [VPlan] Update ifdef.
llvm-svn: 346858
2018-11-14 13:21:26 +00:00
Florian Hahn 09e516c54b [VPlan, SLP] Add simple SLP analysis on top of VPlan.
This patch adds an initial implementation of the look-ahead SLP tree
construction described in 'Look-Ahead SLP: Auto-vectorization in the Presence
of Commutative Operations, CGO 2018 by Vasileios Porpodas, Rodrigo C. O. Rocha,
Luís F. W. Góes'.

It returns an SLP tree represented as VPInstructions, with combined
instructions represented as a single, wider VPInstruction.

This initial version does not support instructions with multiple
different users (either inside or outside the SLP tree) or
non-instruction operands; it won't generate any shuffles or
insertelement instructions.

It also just adds the analysis that builds an SLP tree rooted in a set
of stores. It does not include any cost modeling or memory legality
checks. The plan is to integrate it with VPlan based cost modeling, once
available and to only apply it to operations that can be widened.

A follow-up patch will add a support for replacing instructions in a
VPlan with their SLP counter parts.

Reviewers: Ayal, mssimpso, rengolin, mkuper, hfinkel, hsaito, dcaballe, vporpo, RKSimon, ABataev

Reviewed By: rengolin

Differential Revision: https://reviews.llvm.org/D4949

llvm-svn: 346857
2018-11-14 13:11:49 +00:00
Aaron Ballman 3f82b15bdc Adding myself as the code owner for clang-query as discussed in https://reviews.llvm.org/D54453.
llvm-svn: 346856
2018-11-14 13:03:50 +00:00
George Rimar 004bcb78ed [LLDB] - Recommit r346848 "[LLDB] - Support the single file split DWARF.".
Test cases were updated to not use the local compilation dir which
is different between development pc and build bots.

Original commit message:

[LLDB] - Support the single file split DWARF.

DWARF5 spec describes a single file split dwarf case
(when .dwo sections are in the .o files).

Problem is that LLDB does not work correctly in that case.
The issue is that, for example, both .debug_info and .debug_info.dwo
has the same type: eSectionTypeDWARFDebugInfo. And when code searches
section by type it might find the regular debug section
and not the .dwo one.

The patch fixes that. With it, LLDB is able to work with
output compiled with -gsplit-dwarf=single flag correctly.

Differential revision: https://reviews.llvm.org/D52403

llvm-svn: 346855
2018-11-14 13:01:15 +00:00
Simon Pilgrim cdb170794b [CostModel] Add generic expansion funnel shift cost support
Add support for the expansion of funnelshift/rotates to getIntrinsicInstrCost.

This also required us to move the X86 fshl/fshr costs to the same place as the rotates to avoid expansion and get correct scalarization vs vectorization costs.

llvm-svn: 346854
2018-11-14 12:24:50 +00:00
George Rimar 7cdb22b1ef Revert r346848 "[LLDB] - Support the single file split DWARF."
It broke BB:
http://green.lab.llvm.org/green/job/lldb-cmake/12522/testReport/junit/LLDB/Breakpoint/single_file_split_dwarf_test/

llvm-svn: 346853
2018-11-14 12:04:31 +00:00
Haojian Wu ee54a2b501 [clangd] Replace StringRef in SymbolLocation with a char pointer.
Summary:
This would save us 8 bytes per ref, and buy us ~40MB in total
for llvm index (from ~300MB to ~260 MB).

The char pointer must be null-terminated, and llvm::StringSaver
guarantees it.

Reviewers: sammccall

Subscribers: ilya-biryukov, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits

Differential Revision: https://reviews.llvm.org/D53427

llvm-svn: 346852
2018-11-14 11:55:45 +00:00