Commit Graph

363741 Commits

Author SHA1 Message Date
LLVM GN Syncbot cb00609de9 [gn build] Port 2f0d755d81 2020-08-17 20:30:41 +00:00
Matt Arsenault a128292b90 GlobalISel: Make type for lower action more consistently optional
Some of the lower implementations were relying on this, however the
type was not set depending on which form .lower* helper form you were
using. For instance, if you used an unconditonal lower(), the type was
never set. Most of the lower actions do not benefit from a type
parameter, and just expand in terms of the original operation's types.

However, some lowerings could benefit from an additional type hint to
combine a promotion and an expansion. An example of this is for
add/sub sat. The DAG integer legalization tries to use smarter
expansions directly when promoting the integer type, and doesn't
always produce the same instruction with a wider type.

Treat this as an optional hint argument, that only means something for
specific lower actions. It may be useful to generalize this mechanism
to pass a full list of type indexes and desired types, but I haven't
run into a case like that yet.
2020-08-17 16:24:55 -04:00
diggerlin 2f0d755d81 [AIX][XCOFF][Patch1] Provide decoding trace back table information API for xcoff object file for llvm-objdump -d
SUMMARY:

1. This patch provided API for decoding the traceback table info and unit test for the these API.

2. Another patchs will do the following things:
2.1 added a new option --traceback-table to decode the trace back table information for xcoff object file when
using llvm-objdump to disassemble the xcoff objfile.

2.2 print out the  traceback table information for llvm-objdump.

Reviewers:  Jason liu, Hubert Tong, James Henderson

Differential Revision: https://reviews.llvm.org/D81585
2020-08-17 16:23:47 -04:00
Ellis Hoag 33490acf24 [NVPTX] Fix typo in lit test
LBAEL => LABEL

I encountered this typo elsewhere and I decided to run a global search.
It probably was unnoticed because I think CHECK-LBAEL: is ignored by
lit.

    Differential Revision: https://reviews.llvm.org/D85569
2020-08-17 16:02:11 -04:00
Florian Hahn 4cc20aa743 [DSE,MemorySSA] Skip access already dominated by a killing def.
If we already found a killing def (= a def that completely overwrites
the location) that dominates an access, we can skip processing it
further.

This does not help with compile-time, but increases the number of memory
accesses we can process with the same scan budget, leading to more
stores being eliminated.

Improvements with this change

Same hash: 203 (filtered out)
Remaining: 34
Metric: dse.NumFastStores

Program                                        base    dom     diff
 test-suite...rolangs-C++/family/family.test     2.00    4.00  100.0%
 test-suite...ProxyApps-C++/CLAMR/CLAMR.test   172.00  229.00  33.1%
 test-suite...ks/Prolangs-C/agrep/agrep.test    10.00   12.00  20.0%
 test-suite...oxyApps-C++/miniFE/miniFE.test    44.00   51.00  15.9%
 test-suite...marks/7zip/7zip-benchmark.test   1285.00 1474.00 14.7%
 test-suite...006/450.soplex/450.soplex.test   254.00  289.00  13.8%
 test-suite...006/447.dealII/447.dealII.test   2466.00 2798.00 13.5%
 test-suite...000/197.parser/197.parser.test     9.00   10.00  11.1%
 test-suite.../Benchmarks/nbench/nbench.test    85.00   91.00   7.1%
 test-suite...ce/Applications/siod/siod.test    68.00   72.00   5.9%
 test-suite...ications/JM/lencod/lencod.test   786.00  824.00   4.8%
 test-suite...6/464.h264ref/464.h264ref.test   765.00  798.00   4.3%
 test-suite.../Benchmarks/Ptrdist/bc/bc.test   105.00  109.00   3.8%
 test-suite...lications/obsequi/Obsequi.test    29.00   28.00  -3.4%
 test-suite...3.xalancbmk/483.xalancbmk.test   1322.00 1367.00  3.4%
 test-suite...chmarks/MallocBench/gs/gs.test   118.00  122.00   3.4%
 test-suite...T2006/401.bzip2/401.bzip2.test    60.00   62.00   3.3%
 test-suite...6/482.sphinx3/482.sphinx3.test    30.00   31.00   3.3%
 test-suite...rks/tramp3d-v4/tramp3d-v4.test   862.00  887.00   2.9%
 test-suite...telecomm-gsm/telecomm-gsm.test    78.00   80.00   2.6%
 test-suite...ediabench/gsm/toast/toast.test    78.00   80.00   2.6%
 test-suite.../Applications/SPASS/SPASS.test   163.00  167.00   2.5%
 test-suite...lications/ClamAV/clamscan.test   240.00  245.00   2.1%
 test-suite...006/453.povray/453.povray.test   1392.00 1419.00  1.9%
 test-suite...000/255.vortex/255.vortex.test   211.00  215.00   1.9%
 test-suite...:: External/Povray/povray.test   1295.00 1317.00  1.7%
 test-suite...lications/sqlite3/sqlite3.test   175.00  177.00   1.1%
 test-suite...T2000/256.bzip2/256.bzip2.test    99.00  100.00   1.0%
 test-suite...0/253.perlbmk/253.perlbmk.test   629.00  635.00   1.0%
 test-suite.../CINT2006/403.gcc/403.gcc.test   1183.00 1194.00  0.9%
 test-suite.../CINT2000/176.gcc/176.gcc.test   647.00  653.00   0.9%
 test-suite...ications/JM/ldecod/ldecod.test   512.00  516.00   0.8%
 test-suite...0.perlbench/400.perlbench.test   1026.00 1034.00  0.8%
 test-suite...-typeset/consumer-typeset.test   1876.00 1877.00  0.1%
 Geomean difference                                             7.3%
2020-08-17 20:54:48 +01:00
Alexandre Ganea 98e01f56b0 Revert "Re-Re-land: [CodeView] Add full repro to LF_BUILDINFO record"
This reverts commit a3036b3863.

As requested in: https://reviews.llvm.org/D80833#2221866
Bug report: https://crbug.com/1117026
2020-08-17 15:49:18 -04:00
Matt Arsenault a9ee0589a8 AMDGPU/GlobalISel: Match global saddr addressing mode 2020-08-17 15:48:06 -04:00
Sanjay Patel f925fd3304 [DAGCombiner] give magic number a name in getStoreMergeCandidates; NFC 2020-08-17 15:37:55 -04:00
Sanjay Patel 046b4a550a [DAGCombiner] reduce code duplication in getStoreMergeCandidates; NFC 2020-08-17 15:37:55 -04:00
Sanjay Patel 20c85fd1ab [DAGCombiner] simplify bool return in getStoreMergeCandidates; NFC 2020-08-17 15:37:55 -04:00
Sanjay Patel 52cd8f1ecb [DAGCombiner] clean up getStoreMergeCandidates(); NFC
1. Move bailouts and local var declarations.
2. Convert if-chain to switch on StoreSource with unreachable default.
2020-08-17 15:37:54 -04:00
Sanjay Patel 27708db3e3 [DAGCombiner] convert StoreSource if-chain to switch; NFC
The "isa" checks were less constrained because they allow
target constants, but the later matching code would bail
out on those anyway, so this should be slightly more
efficient.
2020-08-17 15:37:54 -04:00
Tyker a79e604462 [AssumeBundles] Fix Bug in Assume Queries
this bug was causing miscompile.
now clang cant properly selfhost with -mllvm --enable-knowledge-retention

Reviewed By: jdoerfert, lebedev.ri

Differential Revision: https://reviews.llvm.org/D83507
2020-08-17 21:36:53 +02:00
Matt Arsenault e1a2f4713c AMDGPU: Match global saddr addressing mode
The previous implementation was incorrect, and based off incorrect
instruction definitions. Unfortunately we can't match natural
addressing in a lot of cases due to the shift/scale applied in
getelementptrs. This relies on reducing the 64-bit shift to 32-bits.
2020-08-17 15:28:14 -04:00
Matt Arsenault 087dcbe9bc AMDGPU: Add baseline tests for global saddr matching 2020-08-17 15:23:13 -04:00
Stanislav Mekhanoshin 24182f14b6 [AMDGPU] Define spill opcodes for all AGPR sizes
Since we have defined all these sizes I believe we shall be
able to spill these as well.

Differential Revision: https://reviews.llvm.org/D86098
2020-08-17 12:17:23 -07:00
Jonas Devlieghere 9c5e25a696 [lldb] Skip test_launch_simple with reproducers
The test checks the inferior's output. During replay the binary doesn't
actually run and the output isn't captured by the reproducers.
2020-08-17 11:47:07 -07:00
Dávid Bolvanský 0f14b2e6cb Revert "[BPI] Improve static heuristics for integer comparisons"
This reverts commit 50c743fa71. Patch will be split to smaller ones.
2020-08-17 20:44:33 +02:00
Jonas Devlieghere 5a7b61b183 [lldb] Skip TestMultipleDebuggers on Windows 2020-08-17 11:34:25 -07:00
Jonas Devlieghere 24d3210e62 [lldb] Skip the Apple Simulator tests with reproducers 2020-08-17 11:29:37 -07:00
Fangrui Song e8a11c0558 [ELF] Allow mixed SHF_LINK_ORDER & non-SHF_LINK_ORDER sections and sort within InputSectionDescription
LLD currently does not allow non-contiguous SHF_LINK_ORDER components in an
output section. This makes it infeasible to add SHF_LINK_ORDER to an existing
metadata section if backward compatibility with older object files are
concerned.

We did not allow mixed components (like GNU ld) and D77007 relaxed to allow
non-contiguous SHF_LINK_ORDER components. This patch allows arbitrary mix, with
sorting performed within an InputSectionDescription. For example,
`.rodata : {*(.rodata.foo) *(.rodata.bar)}`, has two InputSectionDescription's.
If there is at least one SHF_LINK_ORDER and at least one non-SHF_LINK_ORDER in
.rodata.foo, they are ordered within `*(.rodata.foo)`: we arbitrarily place
SHF_LINK_ORDER components before non-SHF_LINK_ORDER components (like Solaris ld).

`*(.rodata.bar)` is ordered similarly, but the two InputSectionDescription's
don't interact.  It can be argued that this is more reasonable than the previous
behavior where written order was not respected.

It would be nice if the two different semantics (ordering requirement & garbage
collection) were not overloaded on one section flag, however, it is probably
difficult to obtain a generic flag at this point
(https://groups.google.com/forum/#!topic/generic-abi/hgx_m1aXqUo
"SHF_LINK_ORDER's original semantics make upgrade difficult").

(Actually, without the GC semantics, SHF_LINK_ORDER would still have the
sh_link!=0 & sh_link=0 issue. It is just that people find the GC semantics more
useful and tend to use the feature more often.)

GNU ld feature request: https://sourceware.org/bugzilla/show_bug.cgi?id=16833

Differential Revision: https://reviews.llvm.org/D84001
2020-08-17 11:29:05 -07:00
Matt Morehouse 69721fc9d1 [DFSan] Support fast16labels mode in dfsan_union.
While the instrumentation never calls dfsan_union in fast16labels mode,
the custom wrappers do.  We detect fast16labels mode by checking whether
any labels have been created.  If not, we must be using fast16labels
mode.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D86012
2020-08-17 11:27:28 -07:00
Valentin Clement 3060894bbb [flang][directives] Use TableGen to generate clause unparsing
Use the TableGen directive back-end to generate code for the clauses unparsing.

Reviewed By: sscalpone, kiranchandramohan

Differential Revision: https://reviews.llvm.org/D85851
2020-08-17 14:22:25 -04:00
Jonas Devlieghere 295eb54deb [llvm] Don't create the directory hierarchy in the FileCollector...
... if the collected file doesn't exists.

This fixes the situation where LLDB can't create a file when capturing a
reproducer because the parent path doesn't exist, but can during replay
because the file collector created the directory hierarchy even though
the file doesn't exist.

This is covered by the lldb reproducer test suite.
2020-08-17 11:21:39 -07:00
Matt Arsenault 5ca7c6386f GlobalISel: Fix parameter name in doxygen comment 2020-08-17 13:57:10 -04:00
Matt Arsenault fe171908e9 GlobalISel: Revisit users of other merge opcodes in artifact combiner
The artifact combiner searches for the uses of G_MERGE_VALUES for
unmerge/trunc that need further combining. This also needs to handle
the vector merge opcodes the same way. This fixes leaving behind some
pairs I expected to be removed, that were if the legalizer is run a
second time.
2020-08-17 13:56:53 -04:00
Michael Park e0ec7a0206
[libcxx/variant] Correctly propagate return type of the visitor.
The tests for it were missing so I've added them.

Reviewed By: #libc, EricWF

Differential Revision: https://reviews.llvm.org/D86006
2020-08-17 10:53:59 -07:00
Florian Hahn df4756ec6c [DSE,MemorySSA] Check for underlying objects first.
isWriteAtEndOfFunction needs to check all memory uses of Def, which is
much more expensive than getting the underlying objects in practice.
Switch the call order, as recommended by the TODO, which was added as
per an earlier review.

This shaves off a bit of compile-time.
2020-08-17 18:52:18 +01:00
Matt Arsenault a275acc4a9 GlobalISel: Early continue to reduce loop indentation 2020-08-17 13:51:08 -04:00
Jonas Devlieghere 6dabd267bd [lldb] Skip TestError.test with reproducers
This tests the driver, which is bypassed by the reproducer during
replay.
2020-08-17 10:42:58 -07:00
Jonas Devlieghere e095e98a3a [lldb] Add missing LLDB_REGISTER for GarbageCollectAllocatedModules
Add the missing LLDB_REGISTER_STATIC_METHOD macro and format the file.
2020-08-17 10:14:41 -07:00
Arthur Eubanks b0ceff94d6 [test] Fix aggregate-assign-call.c in preparation for -enable-npm-optnone
Pin the test to use -enable-npm-optnone.
Before, optnone wasn't implemented under NPM, so the LPM and NPM runs produced different IR. Now with -enable-npm-optnone, that is no longer necessary.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D86008
2020-08-17 10:06:40 -07:00
Arthur Eubanks a397319509 [test] Fix thinlto-debug-pm.c in preparation for -enable-npm-optnone
This fails due to the clang invocation running at -O0, producing an optnone function.
Then even with -O2 in the later invocations, LoopVectorizePass doesn't run on the optnone function.
So split this into an -O0 run and an -O2 run.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D86011
2020-08-17 10:06:15 -07:00
Jonas Devlieghere e9b0994012 [lldb] Replace unittest2.expectedFailure with expectedFailure (NFC)
Rename the existing expectedFailure to expectedFailureIfFn to better
describe its purpose and provide an overload for
unittest2.expectedFailure in decorators.py.
2020-08-17 10:05:49 -07:00
Raphael Isemann c6cc566c8a [lldb] Use os.path.sep in TestInvalidArgsLog.py to fix Windows bot 2020-08-17 19:03:27 +02:00
Amy Huang 51c152ca2a Revert "Make compiler-rt/asan tests run with llvm-lit."
This reverts commit 7f84f62ef0.

Seems to be causing a bunch of compiler-rt test failures on
ppc64-linux bots.
2020-08-17 10:00:45 -07:00
Fangrui Song 661c089a40 [ELF] Enforce two-dash form for some LLD specific options and the newer --[no-]pcrel-optimize
Since -[no-]toc-optimize has not ever been used, we can enforce the two-dash form as well.
2020-08-17 10:00:31 -07:00
Florian Hahn 139810449b [DSE,MemorySSA] Account for ScanLimit == 0 on entry.
Currently the code does not account for the fact that getDomMemoryDef
can be called with ScanLimit == 0, if we reached the limit while
processing an earlier access. Also tighten the check a bit more and bump
the scan limit now that it is handled properly.

In some cases, this brings a 2x speedup in terms of compile-time.
2020-08-17 17:55:14 +01:00
Stella Laurenzo 95b77f2eac Adds __str__ support to python mlir.ir.MlirModule.
* Also raises an exception on parse error.
* Removes placeholder smoketest.
* Adds docstrings.

Differential Revision: https://reviews.llvm.org/D86046
2020-08-17 09:46:33 -07:00
Aditya Kumar cb6e6936db NFC: [GVNHoist] Hoist loop invariant code and rename variables for readability
Reviewed By: fhahn

Differential Revision: https://reviews.llvm.org/D86031
2020-08-17 09:43:34 -07:00
Jonas Devlieghere 8b67b707b0 [lldb] Add missing signal include for TestMultipleDebuggers.py
Fixes multi-process-driver.cpp:221:19: error: use of undeclared
identifier 'SIG_IGN'
2020-08-17 09:41:45 -07:00
Jonas Devlieghere 6cc0b00f4d [lldb] Only link against Python 3 when LLDB_ENABLE_PYTHON is set.
Only link against Python3_LIBRARY when LLDB_ENABLE_PYTHON is true. We
have to be more strict now becuase Python3_LIBRARY might be set to
NOTFOUND instead of being not set at all.
2020-08-17 09:31:52 -07:00
Matt Arsenault c8a9872259 AMDGPU/GlobalISel: Look through copies in getPtrBaseWithConstantOffset
We may have an SGPR->VGPR copy if a totally uniform pointer
calculation is used for a VGPR pointer operand.

Also hack around a bug in MUBUF matching which would incorrectly use
MUBUF for global when flat was requested. This should really be a
predicate on the parent pattern, but the DAG always checked this
manually inside the complex pattern.
2020-08-17 12:31:38 -04:00
Amy Huang 7f84f62ef0 Make compiler-rt/asan tests run with llvm-lit.
This sets some config parameters so we can run the asan tests with
llvm-lit,
e.g. `./bin/llvm-lit [...]/compiler-rt/test/asan`

Differential Revision: https://reviews.llvm.org/D83821
2020-08-17 09:24:19 -07:00
Jonas Devlieghere a0a328ed4f [lldb] Fix and re-enable TestMultipleDebuggers
The comment says that TestMultipleDebuggers was XFAILed because it was
failing nondeterministically in which case it should be skipped not
failed (as XPASS will cause the test suite to fail).

The reason it fails is because it was not marked as a no-debug-info test
case. I've ran the test in a loop and it has been passing consistently.
Let's enable it and see if the bots agree, if not we can skip it.
2020-08-17 09:20:20 -07:00
Walter Erquinigo 99614d410c [lldb-vscode] NFC: clang format
Run clang-format on all the c++ file of this project.
2020-08-17 09:18:01 -07:00
Alex Zinenko 47d185784d [mlir] Provide LLVMType::getPrimitiveSizeInBits
This function is available on llvm::Type and has been used by some clients of
the LLVM dialect before the transition. Implement the MLIR counterpart.

Reviewed By: schweitz

Differential Revision: https://reviews.llvm.org/D85847
2020-08-17 18:01:42 +02:00
Rahul Joshi 9a4b30cf84 [MLIR] Add support for defining and using Op specific analysis
- Add variants of getAnalysis() and friends that operate on a specific derived
  operation types.
- Add OpPassManager::getAnalysis() to always call the base getAnalysis() with OpT.
- With this, an OperationPass can call getAnalysis<> using an analysis type that
  is generic (works on Operation *) or specific to the OpT for the pass. Anything
  else will fail to compile.
- Extend AnalysisManager unit test to test this, and add a new PassManager unit
  test to test this functionality in the context of an OperationPass.

Differential Revision: https://reviews.llvm.org/D84897
2020-08-17 09:00:47 -07:00
Jonas Devlieghere 75966ee241 [lldb] Get rid of helper CMake variables for Python
This patch is a big sed to rename the following variables:

  s/PYTHON_LIBRARIES/Python3_LIBRARIES/g
  s/PYTHON_INCLUDE_DIRS/Python3_INCLUDE_DIRS/g
  s/PYTHON_EXECUTABLE/Python3_EXECUTABLE/g
  s/PYTHON_RPATH/Python3_RPATH/g

I've also renamed the CMake module to better express its purpose and for
consistency with FindLuaAndSwig.

Differential revision: https://reviews.llvm.org/D85976
2020-08-17 08:47:52 -07:00
George Rokos 32ebdc70f3 [libomptarget][NFC] Sort list of plugins in chronological order
Differential Revision: https://reviews.llvm.org/D86082
2020-08-17 08:33:36 -07:00