Commit Graph

329655 Commits

Author SHA1 Message Date
Jordan Rupprecht c526ff8a62 [llvm-objdump] Adjust spacing and field width for --section-headers
Summary:
- Expand the "Name" column past 13 characters when any of the section names are longer. Current behavior is a staggard output instead of a nice table if a single name is longer.
- Only print the required number of hex chars for addresses (i.e. 8 characters for 32-bit, 16 characters for 64-bit)
- Fix trailing spaces

Reviewers: grimar, jhenderson, espindola

Reviewed By: grimar

Subscribers: emaste, sbc100, arichardson, aheejin, seiya, llvm-commits, MaskRay

Tags: #llvm

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

llvm-svn: 374795
2019-10-14 17:47:17 +00:00
Michael Berg 5af0201c2a Add FMF to vector ops for phi
Summary: Small amendment to handle vector cases for D67564.

Reviewers: spatel, eli.friedman, hfinkel, cameron.mcinally, arsenm, jmolloy, bogner

Reviewed By: cameron.mcinally, bogner

Subscribers: llvm-commits, efriedma, reames, bogner, wdng

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

llvm-svn: 374794
2019-10-14 17:39:32 +00:00
Jordan Rupprecht 1d32d8b176 Reapply: [llvm-size] Tidy up error messages (PR42970)
Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases.

Originally submitted as r374771 and then reverted as r374780, this patch fixes the libObject test case in Object/macho-invalid.test.

Patch by Alex Cameron

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

llvm-svn: 374793
2019-10-14 17:29:15 +00:00
Vedant Kumar eef612bf91 [llvm-profdata] Weaken "malformed-ptr-to-counter-array.test" to appease arm bots
There are a number arm bots failing after r374617 landed, and I'm not
sure why. It looks a bit like the error message llvm-profdata is
expected to print to stderr isn't flushed.

Weaken the test in an attempt to appease the arm bots: if this doesn't
work, that means that llvm-profdata is actually *not failing*, and that
will be a clear indication that some logic error is actually happening.

http://lab.llvm.org:8011/builders/clang-cmake-armv7-global-isel/builds/5604/

llvm-svn: 374792
2019-10-14 17:20:22 +00:00
Alexey Bataev 5bbceadfc8 [OPENMP50]Add support for 'parallel master taskloop' construct.
Added parsing/sema/codegen support for 'parallel master taskloop'
constructs. Some of the clauses, like 'grainsize', 'num_tasks', 'final'
and 'priority' are not supported in full, only constant expressions can
be used currently in these clauses.

llvm-svn: 374791
2019-10-14 17:17:41 +00:00
Artem Belevich 5c6ab2a0b1 [NVPTX] Restructure shfl instrinsics and add variants that return a predicate.
Also, amend constraints for non-sync variants that are no longer
available on sm_70+ with PTX6.4+.

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

llvm-svn: 374790
2019-10-14 16:53:34 +00:00
Simon Pilgrim e8877d0439 BitsInit::resolveReferences - silence static analyzer null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, assert to check that the loop has set the cached pointer.

llvm-svn: 374789
2019-10-14 16:46:21 +00:00
Simon Pilgrim ef0cb27180 XCOFFObjectWriter - silence static analyzer dyn_cast<> null dereference warning. NFCI.
The static analyzer is warning about a potential null dereference, but we should be able to use cast<> directly and if not assert will fire for us.

llvm-svn: 374788
2019-10-14 16:46:11 +00:00
Alexey Bataev 0e100037d7 [OPENMP]Fix codegen for private variably length vars in combined
constructs.

If OpenMP construct includes several capturing regions and the variable
is declared as private, the length of the inner variable length array is
not captured in outer captured regions, only in the innermost region.
Patch fixes this bug.

llvm-svn: 374787
2019-10-14 16:44:01 +00:00
Simon Pilgrim 1385b27e92 [CostModel][X86] Add CTLZ scalar costs
Add specific scalar costs for CTLZ instructions, we can't discriminate between CTLZ and CTLZ_ZERO_UNDEF so we have to assume the worst. Given how BSR is often a microcoded nightmare on some older targets we might still be underestimating it.

For targets supporting LZCNT (Intel Haswell+ or AMD Fam10+), we provide overrides that assume 1cy costs.

llvm-svn: 374786
2019-10-14 16:30:17 +00:00
Diogo N. Sampaio 2cb43b4571 [ARM] Preserve fpu behaviour for '-crypto'
Summary:
This patch restores the behaviour that -fpu overwrites the
architecture obtained from -march or -mcpu flags, not enforcing to
disable 'crypto' if march=armv7 and mfpu=neon-fp-armv8.
However, it does warn that 'crypto' is ignored when passing
mfpu=crypto-neon-fp-armv8.

Reviewers: peter.smith, labrinea

Reviewed By: peter.smith

Subscribers: nickdesaulniers, kristof.beyls, dmgreen, cfe-commits, krisb

Tags: #clang

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

llvm-svn: 374785
2019-10-14 16:29:26 +00:00
Joerg Sonnenberger 9681ea9560 Reapply r374743 with a fix for the ocaml binding
Add a pass to lower is.constant and objectsize intrinsics

This pass lowers is.constant and objectsize intrinsics not simplified by
earlier constant folding, i.e. if the object given is not constant or if
not using the optimized pass chain. The result is recursively simplified
and constant conditionals are pruned, so that dead blocks are removed
even for -O0. This allows inline asm blocks with operand constraints to
work all the time.

The new pass replaces the existing lowering in the codegen-prepare pass
and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
on the intrinsics.

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

llvm-svn: 374784
2019-10-14 16:15:14 +00:00
Sanjay Patel ee86804cf1 [x86] adjust select to sra tests; NFC
Avoid demanded-bits-based specializations (that may not be ideal,
but that's another problem).

llvm-svn: 374783
2019-10-14 15:53:55 +00:00
Cameron McInally 20b8ed2c2b [IRBuilder] Update IRBuilder::CreateFNeg(...) to return a UnaryOperator
Reapply r374240 with fix for Ocaml test, namely Bindings/OCaml/core.ml.

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

llvm-svn: 374782
2019-10-14 15:35:01 +00:00
David Green 543236232c [ARM] Selection for MVE VMOVN
The adds both VMOVNt and VMOVNb instruction selection from the appropriate
shuffles. We detect shuffle masks of the form:
0, N, 2, N+2, 4, N+4, ...
or
0, N+1, 2, N+3, 4, N+5, ...
ISel will also try the opposite patterns, with inputs reversed. These are
selected to VMOVNt and VMOVNb respectively.

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

llvm-svn: 374781
2019-10-14 15:19:33 +00:00
Nico Weber 961c34d5f4 Revert r374771 "[llvm-size] Tidy up error messages (PR42970)"
This reverts commit 83e52f5e11.

Makes Object/macho-invalid.test fail everywhere, e.g. here:
http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/23669/steps/test-llvm/logs/FAIL%3A%20LLVM%3A%3Amacho-invalid.test

llvm-svn: 374780
2019-10-14 14:44:26 +00:00
Sanjay Patel 03462bbe7d [x86] add tests for possible select to sra transforms; NFC
llvm-svn: 374779
2019-10-14 14:43:06 +00:00
Casey Carter a4f07b4d2e [libc++][test] Silence more warnings in variant tests
More cases of signed-to-unsigned conversion warnings that missed the train for d2623522.

llvm-svn: 374778
2019-10-14 14:38:12 +00:00
David Green a5ef3daf1d [ARM] Add some VMOVN tests. NFC
llvm-svn: 374777
2019-10-14 14:29:26 +00:00
Pavel Labath 458680ac78 minidump: Use yaml for memory info tests
Also, delete some minidump binary files that are no longer used in any
test.

llvm-svn: 374776
2019-10-14 14:16:39 +00:00
Simon Pilgrim 151bbba758 [CostModel][X86] Add CTPOP scalar costs (PR43656)
Add specific scalar costs for ctpop instructions, these are based on the llvm-mca's SLM throughput numbers (the oldest model we have).

For targets supporting POPCNT, we provide overrides that assume 1cy costs.

llvm-svn: 374775
2019-10-14 14:07:43 +00:00
Sam Elliott cdcf58e5af [RISCV] enable LTO support, pass some options to linker.
Summary:
1. enable LTO need to pass target feature and abi to LTO code generation
   RISCV backend need the target feature to decide which extension used in
   code generation.
2. move getTargetFeatures to CommonArgs.h and add ForLTOPlugin flag
3. add general tools::getTargetABI in CommonArgs.h because different target uses different
   way to get the target ABI.

Patch by Kuan Hsu Chen (khchen)

Reviewers: lenary, lewis-revill, asb, MaskRay

Reviewed By: lenary

Subscribers: hiraditya, dschuff, aheejin, fedor.sergeev, mehdi_amini, inglorion, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, rkruppe, PkmX, jocewei, psnobl, benna, Jim, lenary, s.egerton, pzheng, cfe-commits

Tags: #clang

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

llvm-svn: 374774
2019-10-14 14:00:13 +00:00
Guillaume Chatelet ce56e1a1cc [Alignment][NFC] Move and type functions from MathExtras to Alignment
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

llvm-svn: 374773
2019-10-14 13:14:34 +00:00
Sander de Smalen 7774812965 [AArch64] Stackframe accesses to SVE objects.
Materialize accesses to SVE frame objects from SP or FP, whichever is
available and beneficial.

This patch still assumes the objects are pre-allocated. The automatic
layout of SVE objects within the stackframe will be added in a separate
patch.

Reviewers: greened, cameron.mcinally, efriedma, rengolin, thegameg, rovka

Reviewed By: cameron.mcinally

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

llvm-svn: 374772
2019-10-14 13:11:34 +00:00
Fangrui Song 83e52f5e11 [llvm-size] Tidy up error messages (PR42970)
Clean up some formatting inconsistencies in the error messages and correctly exit with non-zero in all error cases.

Differential Revision: https://reviews.llvm.org/D68906
Patch by Alex Cameron

llvm-svn: 374771
2019-10-14 12:51:47 +00:00
David Stenberg 8535bed795 [DebugInfo] Fix truncation of call site immediates
Summary:
This addresses a bug in collectCallSiteParameters() where call site
immediates would be truncated from int64_t to unsigned.

This fixes PR43525.

Reviewers: djtodoro, NikolaPrica, aprantl, vsk

Reviewed By: aprantl

Subscribers: hiraditya, llvm-commits

Tags: #debug-info, #llvm

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

llvm-svn: 374770
2019-10-14 12:49:58 +00:00
Pavel Labath 5a8db84964 DWARFExpression: Fix/add support for (v4) debug_loc base address selection entries
The DWARFExpression is parsing the location lists in about five places.
Of those, only one actually had proper support for base address
selection entries.

Since r374600, llvm has started to produce location expressions with
base address selection entries more aggresively, which caused some tests
to fail.

This patch adds support for these entries to the places which had it
missing, fixing the failing tests. It also adds a targeted test for the
two of the three fixes, which should continue testing this functionality
even if the llvm output changes. I am not aware of a way to write a
targeted test for the third fix (DWARFExpression::Evaluate).

llvm-svn: 374769
2019-10-14 12:49:06 +00:00
Dmitri Gribenko 1a21f98ac3 Revert "Add a pass to lower is.constant and objectsize intrinsics"
This reverts commit r374743. It broke the build with Ocaml enabled:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19218

llvm-svn: 374768
2019-10-14 12:22:48 +00:00
Alexander Timofeev c4d256a590 [AMDGPU] Come back patch for the 'Assign register class for cross block values according to the divergence.'
Detailed description:

    After https://reviews.llvm.org/D59990 submit several issues were discovered.
    Changes in common code were preserved but AMDGPU specific part was reverted to keep the backend working correctly.

    Discovered issues were addressed in the following commits:

    https://reviews.llvm.org/D67662
    https://reviews.llvm.org/D67101
    https://reviews.llvm.org/D63953
    https://reviews.llvm.org/D63731

    This change brings back AMDGPU specific changes.

  Reviewed by: rampitec, arsenm

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

llvm-svn: 374767
2019-10-14 12:01:10 +00:00
Victor Campos d34822ad4c Fixing typo in llvm/IR/Intrinsics.td
Fixing typo in comment line.

llvm-svn: 374766
2019-10-14 11:12:23 +00:00
Andrea Di Biagio b744abb4f6 [X86][BtVer2] Improved latency and throughput of float/vector loads and stores.
This patch introduces the following changes to the btver2 scheduling model:

- The number of micro opcodes for YMM loads and stores is now 2 (it was
  incorrectly set to 1 for both aligned and misaligned loads/stores).

- Increased the number of AGU resource cycles for YMM loads and stores
  to 2cy (instead of 1cy).

- Removed JFPU01 and JFPX from the list of resources consumed by pure
  float/vector loads (no MMX).

I verified with llvm-exegesis that pure XMM/YMM loads are no-pipe. Those
are dispatched to the FPU but not really issues on JFPU01.

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

llvm-svn: 374765
2019-10-14 11:12:18 +00:00
Sam Parker 527a35e155 [NFC][TTI] Add Alignment for isLegalMasked[Load/Store]
Add an extra parameter so the backend can take the alignment into
consideration.

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

llvm-svn: 374763
2019-10-14 10:00:21 +00:00
Guillaume Chatelet 2a3f527cf8 Fix D68936
llvm-svn: 374761
2019-10-14 09:31:00 +00:00
Hans Wennborg f2b28fd161 build_llvm_package.bat: Run check-clang-tools and check-clangd tests.
llvm-svn: 374759
2019-10-14 09:08:57 +00:00
Guillaume Chatelet 415df89e22 [Alignment][NFC] Support compile time constants
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 374758
2019-10-14 09:04:15 +00:00
Sjoerd Meijer 52bfa73af8 [docs] loop pragmas: options implying transformations
Following our discussion on the cfe dev list:
http://lists.llvm.org/pipermail/cfe-dev/2019-August/063054.html,
I have added a paragraph that is explicit about loop pragmas, and
transformation options implying the corresponding transformation.

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

llvm-svn: 374756
2019-10-14 07:40:36 +00:00
Craig Topper f4d03213f3 [X86] Teach EmitTest to handle ISD::SSUBO/USUBO in order to use the Z flag from the subtract directly during isel.
This prevents isel from emitting a TEST instruction that
optimizeCompareInstr will need to remove later.

In some of the modified tests, the SUB gets duplicated due to
the flags being needed in two places and being clobbered in
between. optimizeCompareInstr was able to optimize away the TEST
that was using the result of one of them, but optimizeCompareInstr
doesn't know to turn SUB into CMP after removing the TEST. It
only knows how to turn SUB into CMP if the result was already
dead.

With this change the TEST never exists, so optimizeCompareInstr
doesn't have to remove it. Then it can just turn the SUB into
CMP immediately.

Fixes PR43649.

llvm-svn: 374755
2019-10-14 06:47:56 +00:00
Michal Gorny f89e758d88 [clang] [clang-offload-bundler] Fix finding installed llvm-objcopy
Allow finding installed llvm-objcopy in PATH if it's not present
in the directory containing clang-offload-bundler.  This is the case
if clang is being built stand-alone, and llvm-objcopy is already
installed while the c-o-b tool is still present in build directory.

This is consistent with how e.g. llvm-symbolizer is found in LLVM.
However, most of similar searches in LLVM and Clang are performed
without special-casing the program directory.

Fixes r369955.

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

llvm-svn: 374754
2019-10-14 05:33:23 +00:00
Nico Weber eecef1e5a5 clangd tests: use extended regex with sed
The escaped parens seem to confuse the combination of lit, cygwin
quoting, and cygwin's sed. unxutils sed in cmd.exe is fine with both
forms, so use the extended regex form that doesn't need an escaped
paren.

llvm-svn: 374753
2019-10-14 03:44:47 +00:00
Nico Weber 282b36c1ce convert another test to unix line endings
llvm-svn: 374752
2019-10-14 02:21:12 +00:00
Nico Weber 61d2655690 convert a test to unix line endings
llvm-svn: 374751
2019-10-14 02:14:18 +00:00
Nico Weber a05d254b82 fix typo in 374747
llvm-svn: 374750
2019-10-14 01:44:29 +00:00
Nico Weber 1f1703f5c7 Prefer 'env not' over 'not env' in tests.
That way, lit's builtin 'env' command can be used for the 'env' bit.

Also it's clearer that way that the 'not' shouldn't cover 'env'
failures.

llvm-svn: 374749
2019-10-14 01:41:56 +00:00
Craig Topper d0bfedf8e5 [X86] Autogenerate complete checks. NFC
llvm-svn: 374748
2019-10-14 01:41:04 +00:00
Nico Weber 9f1bb5b9a8 Make symbols.test pass on Windows.
See commit message of r374746 for details.

Hopefully final bit of PR43592.

llvm-svn: 374747
2019-10-14 01:19:53 +00:00
Nico Weber 3e54997e77 Make code-action-request.test and request-reply.test pass on Windows.
clangd's test:// scheme expands to /clangd-test on non-Win and to
C:/clang-test on Win, so it can't be mixed freely with
file:///clangd-test since that's wrong on Windows. This makes both
tests consistenly use the test:// scheme. (Alternatively, we could use
the //INPUT_DIR pattern used in a few other tests.)

Part of PR43592.

llvm-svn: 374746
2019-10-14 01:00:33 +00:00
Nico Weber c445c0cb0a Don't run background-index.test on Windows.
The test had a "UNSUPPORTED: win32" line, but the spelling of that
changed in r339307 a year ago. Finally update this test too.

Part of PR43592.

llvm-svn: 374745
2019-10-14 00:45:02 +00:00
Florian Hahn df4fd31128 [NewGVN] Use m_Br to simplify code a bit. (NFC)
llvm-svn: 374744
2019-10-13 23:34:13 +00:00
Joerg Sonnenberger e4300c392d Add a pass to lower is.constant and objectsize intrinsics
This pass lowers is.constant and objectsize intrinsics not simplified by
earlier constant folding, i.e. if the object given is not constant or if
not using the optimized pass chain. The result is recursively simplified
and constant conditionals are pruned, so that dead blocks are removed
even for -O0. This allows inline asm blocks with operand constraints to
work all the time.

The new pass replaces the existing lowering in the codegen-prepare pass
and fallbacks in SDAG/GlobalISEL and FastISel. The latter now assert
on the intrinsics.

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

llvm-svn: 374743
2019-10-13 23:00:15 +00:00
Joerg Sonnenberger 529f4ed401 Improve __builtin_constant_p lowering
__builtin_constant_p used to be short-cut evaluated to false when
building with -O0. This is undesirable as it means that constant folding
in the front-end can give different results than folding in the back-end.
It can also create conditional branches on constant conditions that don't
get folded away. With the pending improvements to the llvm.is.constant
handling on the LLVM side, the short-cut is no longer useful.

Adjust various codegen tests to not depend on the short-cut or the
backend optimisations.

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

llvm-svn: 374742
2019-10-13 22:33:46 +00:00