1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
Commit Graph

154207 Commits

Author SHA1 Message Date
Adrian Prantl
5aebf77e70 llvm-dwarfdump: support a --show-children option
This will print all children of a DIE when selectively printing only
one DIE at a given offset.

llvm-svn: 313464
2017-09-16 17:28:00 +00:00
Adrian Prantl
3f1c9a6b52 llvm-dwarfdump: Add support for -debug-types=<offset>.
llvm-svn: 313463
2017-09-16 16:58:18 +00:00
Zachary Turner
c0d3e3433c [lit] Fix the lit unit tests.
A few tests were manually constructing a LitConfig object, since
I added a new argument to it this was triggering some failures
I didn't detect.  `ninja check-lit` passes now.

llvm-svn: 313461
2017-09-16 15:48:30 +00:00
Zachary Turner
b44d337cf6 [lit] Add a single process mode.
This is helpful for debugging test failures since it removes
the multiprocessing pool from the picture.  This will obviously
slow down the test suite by a few orders of magnitude, so it
should only be used for debugging specific failures.

llvm-svn: 313460
2017-09-16 15:31:34 +00:00
George Rimar
cd7a7ea75d [llvm-readobj] - Teach tool to report error if some section is in multiple COMDAT groups at once.
readelf tool reports an error when output contains the same section
in multiple COMDAT groups. That can be useful.
Path teaches llvm-readobj to do the same.

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

llvm-svn: 313459
2017-09-16 14:29:51 +00:00
Sanjay Patel
62d8ec1120 [x86] enable storeOfVectorConstantIsCheap() target hook
This allows vector-sized store merging of constants in DAGCombiner using the existing code in MergeConsecutiveStores(). 
All of the twisted logic that decides exactly what vector operations are legal and fast for each particular CPU are 
handled separately in there using the appropriate hooks.

For the motivating tests in merge-store-constants.ll, we already produce the same vector code in IR via the SLP vectorizer. 
So this is just providing a backend backstop for code that doesn't go through that pass (-O1). More details in PR24449:
https://bugs.llvm.org/show_bug.cgi?id=24449 (this change should be the last step to resolve that bug)

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

llvm-svn: 313458
2017-09-16 13:29:12 +00:00
NAKAMURA Takumi
2733d852d4 Reformat.
llvm-svn: 313457
2017-09-16 12:13:03 +00:00
NAKAMURA Takumi
b78e2a72b9 llvm/IR/DiagnosticHandler.h: Add include guard, or -fmodules would be confused.
llvm-svn: 313456
2017-09-16 12:13:00 +00:00
Craig Topper
0b5789f3cc [X86] Add isel patterns to be able to fold loads into VPERM2F128 even when the load is on the first input to the SDNode.
We just need to toggle bits 1 and 5 of the immediate and swap the sources. The peephole pass could trigger commuting/folding for this later, but its easy enough to fix in isel.

Disable the peephole pass on the main vperm2x128 test so we know we're doing this through isel.

llvm-svn: 313455
2017-09-16 09:16:48 +00:00
Craig Topper
eba16bf7fe [X86] Remove unused check lines that got left behind when I moved tests to the instrinsic upgrade file and regenerated.
llvm-svn: 313454
2017-09-16 09:16:46 +00:00
Craig Topper
7542d6cd2e [X86] Remove VPERM2X128 isel patterns with 32-bit elements.
Now that the intrinsics are gone we only need 64-bit elements since that's what shuffle lowering uses.

llvm-svn: 313453
2017-09-16 08:15:52 +00:00
Craig Topper
31a3cdd6ec [X86] Remove the vperm2f128 test file I just added in r313450.
I missed the we already had a pretty thorough test file for these instructions.

llvm-svn: 313451
2017-09-16 07:51:01 +00:00
Craig Topper
9f5737a6bd [X86] Remove VPERM2F128/VPERM2I128 intrinsics and autoupgrade to native shuffles.
I've moved the test cases from the InstCombine optimizations to the backend to keep the coverage we had there. It covered every possible immediate so I've preserved the resulting shuffle mask for each of those immediates.

llvm-svn: 313450
2017-09-16 07:36:14 +00:00
Craig Topper
1c7a2bfb5e [X86] Fix some FileCheck lines that use the wrong prefix.
Assume they were moved during autoupgrading and not changed.

llvm-svn: 313448
2017-09-16 07:13:39 +00:00
Chandler Carruth
87be303362 [git] Update the llvm git helper script to work correctly with the
latest Python versions.

llvm-svn: 313435
2017-09-16 02:13:35 +00:00
Craig Topper
ba533dd56f [X86] Don't set reserved bits in the immediate in the test cases for vperm2f128.
I'm going to autoupgrade these intrinsics in a future commit. This bit will never be set in the resulting output so pre-removing the bit.

llvm-svn: 313434
2017-09-16 02:11:21 +00:00
Craig Topper
3970d1d489 [X86] Remove slash in front of a CHECK line in a test.
llvm-svn: 313433
2017-09-16 01:43:21 +00:00
Eric Beckmann
7da768a52e Revert "Fix Bug 30978 by emitting cv file checksums."
This reverts commit 6389e7aa724ea7671d096f4770f016c3d86b0d54.

There is a bug in this implementation where the string value of the
checksum is outputted, instead of the actual hex bytes.  Therefore the
checksum is incorrect, and this prevent pdbs from being loaded by visual
studio.  Revert this until the checksum is emitted correctly.

llvm-svn: 313431
2017-09-16 01:14:36 +00:00
Zachary Turner
e6c2effc3f Revert lit changes related to lit.llvm module.
It looks like this is going to be non-trivial to get working
in both Py2 and Py3, so for now I'm reverting until I have time
to fully test it under Python 3.

llvm-svn: 313429
2017-09-16 00:52:49 +00:00
Zachary Turner
4735a2032e [lit] Fix another Python 3 error.
Apparently we have a buildbot running Python 3.  This is going
to be fun :-/

llvm-svn: 313428
2017-09-16 00:43:16 +00:00
Zachary Turner
363a95ae02 [lit] Better check for integral value.
Some versions of python don't have 'long'.  Use numbers.Number
instead.

llvm-svn: 313427
2017-09-16 00:38:20 +00:00
Zachary Turner
49da297d64 Resubmit "[lit] Add a lit.llvm module that all llvm projects can use"
This was reverted alongside the revert of the lit/llvm-lit refactor,
but now that that has re-landed, I'm relanding this as well.

llvm-svn: 313426
2017-09-16 00:25:58 +00:00
Craig Topper
c4e64d2f93 [X86] Remove usages of vperm2f intrinsics from fast isel tests to match what clang generates after r313418.
llvm-svn: 313424
2017-09-15 23:53:43 +00:00
Vedant Kumar
9bf41686e1 [llvm-cov] Fix a bot failure due to r313417
There's a type mismatch issue with the arguments to a call to std::min
introduced in r313417.

http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/11174

llvm-svn: 313422
2017-09-15 23:14:22 +00:00
Craig Topper
948dca7019 [X86] Remove GCCBuiltin names from perm2f128/perm2i128 intrinsics so we can provide a custom implementation in clang.
llvm-svn: 313420
2017-09-15 23:05:51 +00:00
Adrian Prantl
978de38747 llvm-dwarfdump: Add support for -debug-info=<offset>.
This is the first of many commits that enable selectively dumping just
one record from the debug info.

This reapplies r313412 with some extra qualification to appease GCC and MSVC.

llvm-svn: 313419
2017-09-15 23:04:04 +00:00
Vedant Kumar
b939a54424 [llvm-cov] Avoid over-counting covered lines and regions
* Fix an unsigned integer overflow in the logic that computes the
  number of uncovered lines in a function.

* When aggregating region and line coverage summaries, take into account
  that different instantiations may have a different number of regions.

The new test case provides test coverage for both bugs. I also verified
this change by preparing a coverage report for a stage2 build of llc --
the new assertions should detect any outstanding over-counting bugs.

Fixes PR34613.

llvm-svn: 313417
2017-09-15 23:00:02 +00:00
Vedant Kumar
a4cb081af1 [llvm-cov] Make some summary info fields private. NFC.
There's a bug in the way the line and region summary objects are merged.
It would have been less likely to occur if those objects kept some data
private.

llvm-svn: 313416
2017-09-15 23:00:01 +00:00
Vedant Kumar
9a91c24748 [llvm-cov] Remove a redundant field. NFC.
The "NotCovered" fields in the region and line summary structs are
redundant. We should remove them to make the code clearer.

As a follow-up, the "NotCovered" entries should be removed from the
reports as well.

llvm-svn: 313415
2017-09-15 23:00:00 +00:00
Adrian Prantl
fb4efe8f9b Revert "llvm-dwarfdump: Add support for -debug-info=<offset>."
This reverts commit r313412 because of a g++ incompatibility.

llvm-svn: 313413
2017-09-15 22:47:16 +00:00
Adrian Prantl
8da0c20511 llvm-dwarfdump: Add support for -debug-info=<offset>.
This is the first of many commits that enable selectively dumping just
one record from the debug info.

llvm-svn: 313412
2017-09-15 22:37:56 +00:00
Guozhi Wei
24cd70c139 [TargetTransformInfo] Static alloca has 0 cost
Static alloca usually doesn't generate any machine instructions, so it has 0 cost.

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

llvm-svn: 313410
2017-09-15 22:28:12 +00:00
Chandler Carruth
4a434efc2a [SLP] Revert r312791 and other necessary commits, except for TTI and
CostModel.

The original patch added support for horizontal min/max reductions to
the SLP vectorizer.

This patch causes LLVM to miscompile fairly simple signed min
reductions. I have attached a test progrom to http://llvm.org/PR34635
that shows the behavior change after this patch. We found this in a test
for the open source Eigen library, but also in other code.

Unfortunately, the revert is moderately challenging. It required
reverting:
r313042: [SLP] Test with multiple uses of conditional op and wrong parent.
r312853: [SLP] Fix buildbots, NFC.
r312793: [SLP] Fix the warning about paths not returning the value, NFC.
r312791: [SLP] Support for horizontal min/max reduction.

And even then, I had to completely skip reverting the changes to TTI and
CostModel because r312832 rewrote so much of this code. Plus, the cost
modeling changes aren implicated in the miscompile, so they should be
fine and will just not be used until this gets re-introduced.

llvm-svn: 313409
2017-09-15 22:23:27 +00:00
Zachary Turner
34baee188e Resubmit "[lit] Force site configs to run before source-tree configs"
This is a resubmission of r313270.  It broke standalone builds of
compiler-rt because we were not correctly generating the llvm-lit
script in the standalone build directory.

The fixes incorporated here attempt to find llvm/utils/llvm-lit
from the source tree returned by llvm-config.  If present, it
will generate llvm-lit into the output directory.  Regardless,
the user can specify -DLLVM_EXTERNAL_LIT to point to a specific
lit.py on their file system.  This supports the use case of
someone installing lit via a package manager.  If it cannot find
a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or
invalid, then we print a warning that tests will not be able
to run.

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

llvm-svn: 313407
2017-09-15 22:10:46 +00:00
Reid Kleckner
828ccd75fb Name the sentinel value used for the location number of the undefined register NFC
llvm-svn: 313405
2017-09-15 22:08:50 +00:00
Jake Ehrlich
f5ef94ca90 Test patch to check my commit access
llvm-svn: 313404
2017-09-15 22:04:09 +00:00
Reid Kleckner
4d55207ede [DebugInfo] Insert DW_OP_deref when spilling indirect DBG_VALUEs
Summary:
This comes up in optimized debug info for C++ programs that pass and
return objects indirectly by address. In these programs,
llvm.dbg.declare survives optimization, which causes us to emit indirect
DBG_VALUE instructions. The fast register allocator knows to insert
DW_OP_deref when spilling indirect DBG_VALUE instructions, but the
LiveDebugVariables did not until this change.

This fixes part of PR34513. I need to look into why this doesn't work at
-O0 and I'll send follow up patches to handle that.

Reviewers: aprantl, dblaikie, probinson

Subscribers: qcolombet, hiraditya, llvm-commits

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

llvm-svn: 313400
2017-09-15 21:54:38 +00:00
Reid Kleckner
8b03488b24 [DebugInfo] Add missing DW_OP_deref when an NRVO pointer is spilled
Summary:
Fixes PR34513.

Indirect DBG_VALUEs typically come from dbg.declares of non-trivially
copyable C++ objects that must be passed by address. We were already
handling the case where the virtual register gets allocated to a
physical register and is later spilled. That's what usually happens for
normal parameters that aren't NRVO variables: they usually appear in
physical register parameters, and are spilled later in the function,
which would correctly add deref.

NRVO variables are different because the dbg.declare can come much later
after earlier instructions cause the incoming virtual register to be
spilled.

Also, clean up this code. We only need to look at the first operand of a
DBG_VALUE, which eliminates the operand loop.

Reviewers: aprantl, dblaikie, probinson

Subscribers: MatzeB, qcolombet, llvm-commits, hiraditya

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

llvm-svn: 313399
2017-09-15 21:49:56 +00:00
Steven Wu
f046666142 [AutoUpgrade] Fix a compatibility issue with module flag
Summary:
After r304661, module flag to record objective-c image info section is
encoded without whitespaces after comma. The new name is equivalent to
the old one, except that when LTO a module built by old compiler and a
module built by a new compiler, it will fail with conflicting values.

Fix the issue by removing whitespaces in bitcode upgrade path.

rdar://problem/34416934

Reviewers: compnerd

Reviewed By: compnerd

Subscribers: mehdi_amini, hans, llvm-commits

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

llvm-svn: 313398
2017-09-15 21:12:14 +00:00
Reid Kleckner
3570b141dc Fix build for LLVM unittests
llvm-svn: 313397
2017-09-15 21:12:13 +00:00
Sam Clegg
91f177ea59 [WebAssembly] MC: Create wasm data segments based on MCSections
This means that we can honor -fdata-sections rather than
always creating a segment for each symbol.

It also allows for a followup change to add .init_array and friends.

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

llvm-svn: 313395
2017-09-15 20:54:59 +00:00
Davide Italiano
d75c714e9b [ConstantFold] Return the correct type when folding a GEP with vector indices.
As Eli pointed out (and I got wrong in the first place), langref says: "The
getelementptr returns a vector of pointers, instead of a single address, when one
or more of its arguments is a vector. In such cases, all vector arguments should
have the same number of elements, and every scalar argument will be effectively
broadcast into a vector during address calculation."

Costantfold for gep doesn't really take in account this paragraph, returning a
pointer instead of a vector of pointer which triggers an assertion in RAUW,
as we're trying to replace values with mistmatching types.

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

llvm-svn: 313394
2017-09-15 20:53:05 +00:00
Sam Clegg
980730befa Change encodeU/SLEB128 to pad to certain number of bytes
Previously the 'Padding' argument was the number of padding
bytes to add. However most callers that use 'Padding' know
how many overall bytes they need to write.  With the previous
code this would mean encoding the LEB once to find out how
many bytes it would occupy and then using this to calulate
the 'Padding' value.

See: https://reviews.llvm.org/D36595

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

llvm-svn: 313393
2017-09-15 20:34:47 +00:00
Vivek Pandya
dda17788af This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352
It enables OptimizationRemarkEmitter::allowExtraAnalysis and MachineOptimizationRemarkEmitter::allowExtraAnalysis to return true not only for -fsave-optimization-record but when specific remarks are requested with
command line options.
The diagnostic handler used to be callback now this patch adds a class
DiagnosticHandler. It has virtual method to provide custom diagnostic handler
and methods to control which particular remarks are enabled. 
However LLVM-C API users can still provide callback function for diagnostic handler.

llvm-svn: 313390
2017-09-15 20:10:09 +00:00
Mandeep Singh Grang
324ae49da1 [llvm] Fix some typos. NFC.
Reviewers: mcrosier

Reviewed By: mcrosier

Subscribers: mcrosier, llvm-commits

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

llvm-svn: 313388
2017-09-15 20:01:43 +00:00
Vivek Pandya
d4e6d8ad49 This reverts r313381
llvm-svn: 313387
2017-09-15 19:53:54 +00:00
Sam Clegg
05f9568212 [WebAssembly] Pass ArrayRef rather than SmallVector
This is more flexible and less verbose.

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

llvm-svn: 313384
2017-09-15 19:50:44 +00:00
Adam Nemet
a50ea927c5 Improve comment
llvm-svn: 313383
2017-09-15 19:38:01 +00:00
Vivek Pandya
8ef565859a This patch fixes https://bugs.llvm.org/show_bug.cgi?id=32352
It enables OptimizationRemarkEmitter::allowExtraAnalysis and MachineOptimizationRemarkEmitter::allowExtraAnalysis to return true not only for -fsave-optimization-record but when specific remarks are requested with
command line options.
The diagnostic handler used to be callback now this patch adds a class
DiagnosticHandler. It has virtual method to provide custom diagnostic handler
and methods to control which particular remarks are enabled. 
However LLVM-C API users can still provide callback function for diagnostic handler.

llvm-svn: 313382
2017-09-15 19:30:59 +00:00
Sam Clegg
323fa54f9b [WebAssembly] MC: Fix crash in getProvitionalValue on weak references
- Create helper function for resolving weak references.
- Add test that preproduces the crash.

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

llvm-svn: 313381
2017-09-15 19:22:01 +00:00