3429 Commits

Author SHA1 Message Date
Jordan Rupprecht
ca30c1a99c [llvm-ar] Implement the V modifier as an alias for --version
Summary: Also update the help modifier (h) so that it works as a modifier and not just as a standalone `h`. For example, `llvm-ar h` prints the help message, but `llvm-ar xh` currently prints `unknown option h`.

Reviewers: MaskRay, gbreynoo

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375028 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-16 18:39:52 +00:00
Joel E. Denny
e65499709f [lit] Fix internal diff's --strip-trailing-cr and use it
Using GNU diff, `--strip-trailing-cr` removes a `\r` appearing before
a `\n` at the end of a line.  Without this patch, lit's internal diff
only removes `\r` if it appears as the last character.  That seems
useless.  This patch fixes that.

This patch also adds `--strip-trailing-cr` to some tests that fail on
Windows bots when D68664 is applied.  Based on what I see in the bot
logs, I think the following is happening.  In each test there, lit
diff is comparing a file with `\r\n` line endings to a file with `\n`
line endings.  Without D68664, lit diff reads those files in text
mode, which in Windows causes `\r\n` to be replaced with `\n`.
However, with D68664, lit diff reads the files in binary mode instead
and thus reports that every line is different, just as GNU diff does
(at least under Ubuntu).  Adding `--strip-trailing-cr` to those tests
restores the previous behavior while permitting the behavior of lit
diff to be more like GNU diff.

Reviewed By: rnk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375020 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-16 17:21:57 +00:00
Owen Reynolds
4f04974098 [llvm-ar] Make paths case insensitive when on windows
When on windows gnu-ar treats member names as case insensitive. This
commit implements the same behaviour.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@375002 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-16 14:07:57 +00:00
Jonas Devlieghere
cd6834c109 [dsymutil] Support and relocate base address selection entries for debug_loc
Since r374600 clang emits base address selection entries. Currently
dsymutil does not support these entries and incorrectly interprets them
as location list entries.

This patch adds support for base address selection entries in dsymutil
and makes sure they are relocated correctly.

Thanks to Dave for coming up with the test case!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374957 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-15 23:43:37 +00:00
Digger Lin
5ab2259bcf [XCOFF]implement parsing relocation information for 32-bit xcoff object file
Summary:
    Parsing the relocation entry information for 32-bit xcoff object file
including deal with the relocation overflow.

Reviewers: hubert.reinterpretcast, jasonliu, sfertile, xingxue.

Subscribers: hiraditya, rupprecht, seiya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374946 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-15 20:42:11 +00:00
Digger Lin
382c1a971c [llvm-readobj][xcoff] implement parsing overflow section header.
SUMMARY:
in the xcoff, if the number of relocation entries or line number entries is
overflow(large than or equal 65535) , there will be overflow section for it.
The interpret of overflow section is different with generic section header,
the patch implement parsing the overflow section.

Reviewers: hubert.reinterpretcast,sfertile,jasonliu
Subscribers: rupprecht, seiya

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374941 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-15 19:28:11 +00:00
Jordan Rupprecht
06d4c0251f [llvm-objdump] Use a counter for llvm-objdump -h instead of the section index.
Summary:
When listing the index in `llvm-objdump -h`, use a zero-based counter instead of the actual section index (e.g. shdr->sh_index for ELF).

While this is effectively a noop for now (except one unit test for XCOFF), the index values will change in a future patch that filters certain sections out (e.g. symbol tables). See D68669 for more context. Note: the test case in `test/tools/llvm-objdump/X86/section-index.s` already covers the case of incrementing the section index counter when sections are skipped.

Reviewers: grimar, jhenderson, espindola

Reviewed By: grimar

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

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374931 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-15 18:13:20 +00:00
Vedant Kumar
005139adc8 [llvm-profdata] Reinstate tools/llvm-profdata/malformed-ptr-to-counter-array.test
I removed this test to unblock the ARM bots while looking into failures
(r374915), and am reinstating it now with a fix.

I believe the problem was that counter ptr address I used,
'\0\0\6\0\1\0\0\1', set the high bits of the pointer, not the low bits
like I wanted. On x86_64 this superficially looks like it tests r370826,
but it doesn't, as it would have been caught before r370826. However, on
ARM (or, 32-bit hosts more generally), I suspect the high bits were
cleared, and you get a 'valid' profile.

I verified that setting the *low* bits of the pointer does trigger the
new condition:

-// Note: The CounterPtr here is off-by-one. This should trigger a malformed profile error.
-RUN: printf '\0\0\6\0\1\0\0\1' >> %t.profraw
+// Note: The CounterPtr here is off-by-one.
+//
+// Octal '\11' is 9 in decimal: this should push CounterOffset to 1. As there are two counters,
+// the profile reader should error out.
+RUN: printf '\11\0\6\0\1\0\0\0' >> %t.profraw

This reverts commit c7cf5b3e4b918c9769fd760f28485b8d943ed968.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374927 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-15 17:53:48 +00:00
Vedant Kumar
ab17525131 [llvm-profdata] Remove tools/llvm-profdata/malformed-ptr-to-counter-array.test
This test is still failing on the ARM bots and I need time to
investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374915 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-15 17:10:44 +00:00
Jordan Rupprecht
ba169d8e73 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374795 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-14 17:47:17 +00:00
Jordan Rupprecht
67d83413d0 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374793 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-14 17:29:15 +00:00
Vedant Kumar
90e20e8610 [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/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374792 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-14 17:20:22 +00:00
Nico Weber
852f45a10a Revert r374771 "[llvm-size] Tidy up error messages (PR42970)"
This reverts commit 83e52f5e1150018329b8907bb014c77ac382d611.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374780 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-14 14:44:26 +00:00
Fangrui Song
d24146fb6c [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374771 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-14 12:51:47 +00:00
Andrea Di Biagio
30954cb6a9 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374765 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-14 11:12:18 +00:00
Joel E. Denny
24feaedf06 Revert r374652: "[lit] Fix internal diff's --strip-trailing-cr and use it"
This series of patches still breaks a Windows bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374679 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-12 18:51:51 +00:00
Joel E. Denny
76211a391a [lit] Fix internal diff's --strip-trailing-cr and use it
Using GNU diff, `--strip-trailing-cr` removes a `\r` appearing before
a `\n` at the end of a line.  Without this patch, lit's internal diff
only removes `\r` if it appears as the last character.  That seems
useless.  This patch fixes that.

This patch also adds `--strip-trailing-cr` to some tests that fail on
Windows bots when D68664 is applied.  Based on what I see in the bot
logs, I think the following is happening.  In each test there, lit
diff is comparing a file with `\r\n` line endings to a file with `\n`
line endings.  Without D68664, lit diff reads those files with
Python's universal newlines support activated, causing `\r` to be
dropped.  However, with D68664, lit diff reads the files in binary
mode instead and thus reports that every line is different, just as
GNU diff does (at least under Ubuntu).  Adding `--strip-trailing-cr`
to those tests restores the previous behavior while permitting the
behavior of lit diff to be more like GNU diff.

Reviewed By: rnk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374652 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-12 11:58:30 +00:00
Vitaly Buka
f5557e5aac Revert 374629 "[sancov] Accommodate sancov and coverage report server for use under Windows"
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/27650/steps/ninja%20check%201/logs/stdio
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759
http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/15095
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/21075
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374636 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-12 05:23:43 +00:00
Vitaly Buka
d8a8b4bb7c [sancov] Accommodate sancov and coverage report server for use under Windows
Summary:
This patch makes the following changes to SanCov and its complementary Python script in order to resolve issues pertaining to non-UNIX file paths in JSON symbolization information:
* Convert all paths to use forward slash.
* Update `coverage-report-server.py` to correctly handle paths to sources which contain spaces.
* Remove Linux platform restriction for all SanCov unit tests. All SanCov tests passed when ran on my local Windows machine.

Patch by Douglas Gliner.

Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman

Reviewed By: vitalybuka

Subscribers: vsk, Dor1s, llvm-commits

Tags: #sanitizers, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374629 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-12 02:29:26 +00:00
Vitaly Buka
6dcc8f11e9 [sancov] Use LLVM Support library JSON writer in favor of individual implementation
Summary:
In this diff, I've replaced the individual implementation of `JSONWriter` with `json::OStream` provided by `llvm/Support/JSON.h`.

Important Note: The output format of the JSON is considerably different compared to the original implementation. Important differences include:
* New line for each entry in an array (should make diffs cleaner)
* No space between keys and colon in attributed object entries.
* Attributes with empty strings will now print the attribute name and a quote pair rather than excluding the attribute altogether

Examples of these differences can be seen in the changes to the sancov tests which compare the JSON output.

Patch by Douglas Gliner.

Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman

Subscribers: mehdi_amini, dexonsmith, llvm-commits

Tags: #sanitizers, #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374628 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-12 02:29:24 +00:00
Vedant Kumar
35cba0afc9 [llvm-profdata] Make "malformed-ptr-to-counter-array.test" textual
As pointed out in https://reviews.llvm.org/D66979 post-commit, making
this test textual would make it more maintainable.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374617 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-12 00:23:15 +00:00
David Blaikie
9a6583f43f llvm-dwarfdump: Add verbose printing for debug_loclists
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374582 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-11 19:06:35 +00:00
Kai Nacke
f84bcd1a41 [Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj).
The command `od -t x` is used to dump data in hex format.
The LIT tests assumes that the hex characters are in lowercase.
However, there are also platforms which use uppercase letter.

To solve this issue the tests are updated to use the new
`--ignore-case` option of FileCheck.

Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374547 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-11 12:50:57 +00:00
George Rimar
8726a32c2b [llvm-readobj] - Remove excessive fields when dumping "Version symbols".
This removes a few fields that are not useful:
"Section Name", "Address", "Offset" and "Link"
(they duplicated the information available under
the "Sections [" tag).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374541 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-11 12:27:11 +00:00
Clement Courbet
66d57a8b5c [llvm-exegesis] Show noise cluster in analysis output.
Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374533 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-11 11:33:18 +00:00
Reid Kleckner
be821d9f2d Fix test to avoid check-not matching the temp file absolute path
Fix for PR43636

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374404 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 18:01:27 +00:00
Roman Lebedev
84f8a5f06c [MCA] Show aggregate over Average Wait times for the whole snippet (PR43219)
Summary:
As disscused in https://bugs.llvm.org/show_bug.cgi?id=43219,
i believe it may be somewhat useful to show //some// aggregates
over all the sea of statistics provided.

Example:
```
Average Wait times (based on the timeline view):
[0]: Executions
[1]: Average time spent waiting in a scheduler's queue
[2]: Average time spent waiting in a scheduler's queue while ready
[3]: Average time elapsed from WB until retire stage

      [0]    [1]    [2]    [3]
0.     3     1.0    1.0    4.7       vmulps     %xmm0, %xmm1, %xmm2
1.     3     2.7    0.0    2.3       vhaddps    %xmm2, %xmm2, %xmm3
2.     3     6.0    0.0    0.0       vhaddps    %xmm3, %xmm3, %xmm4
       3     3.2    0.3    2.3       <total>
```
I.e. we average the averages.

Reviewers: andreadb, mattd, RKSimon

Reviewed By: andreadb

Subscribers: gbedwell, arphaman, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374361 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 14:46:21 +00:00
Dmitri Gribenko
c04b607c05 Revert "[Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj)."
This reverts commit r374343. It broke tests:
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/19066

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374358 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 14:26:54 +00:00
Thomas Preud'homme
5e1d4f155a Revert "[test] Use system locale for mri-utf8.test"
This reverts commit r374318 / b6f1d1fa0e3ee0e25f22414bf97c05276b934507.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374349 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 13:39:12 +00:00
George Rimar
d064df308f [llvm-readelf] - Do not enter an infinite loop when printing histogram.
This is similar to D68086.
We are entering an infinite loop when dumping a histogram for a specially crafted
.hash section with a loop in a chain.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374344 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 13:26:26 +00:00
Kai Nacke
f166c806c8 [Tests] Output of od can be lower or upper case (llvm-objcopy/yaml2obj).
The command `od -t x` is used to dump data in hex format.
The LIT tests assumes that the hex characters are in lowercase.
However, there are also platforms which use uppercase letter.

To solve this issue the tests are updated to use the new
`--ignore-case` option of FileCheck.

Reviewers: Bigcheese, jakehehrlich, rupprecht, espindola, alexshap, jhenderson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374343 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 13:24:00 +00:00
Pavel Labath
146f4968ec MinidumpYAML: Add support for the memory info list stream
Summary:
The implementation is fairly straight-forward and uses the same patterns
as the existing streams. The yaml form does not attempt to preserve the
data in the "gaps" that can be created by setting a larger-than-required
header or entry size in the stream header, because the existing consumer
(lldb) does not make use of the information in the gap in any way, and
attempting to preserve that would make the implementation more
complicated.

Reviewers: amccarth, jhenderson, clayborg

Subscribers: llvm-commits, lldb-commits, markmentovai, zturner, JosephTremoulet

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374337 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 13:05:46 +00:00
Thomas Preud'homme
434ca7ad29 [test] Use system locale for mri-utf8.test
Summary:
llvm-ar's mri-utf8.test test relies on the en_US.UTF-8 locale to be
installed for its last RUN line to work. If not installed, the unicode
string gets encoded (interpreted) as ascii which fails since the most
significant byte is non zero. This commit changes the test to only rely
on the system being able to encode the pound sign in its default
encoding (e.g. UTF-16 for Microsoft Windows) by always opening the file
via input/output redirection. This avoids forcing a given locale to be
present and supported. A Byte Order Mark is also added to help
recognizing the encoding of the file and its endianness.

Reviewers: gbreynoo, MaskRay, rupprecht, JamesNagurne, jfb

Subscribers: dexonsmith, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374318 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-10 11:48:30 +00:00
David Blaikie
230cf52e6e llvm-dwarfdump: Support multiple debug_loclists contributions
Also fixing the incorrect "offset" field being computed/printed for each
location list.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374232 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-09 21:25:28 +00:00
Jonas Devlieghere
f4d80f04c0 Re-land "[dsymutil] Fix handling of common symbols in multiple object files."
The original patch got reverted because it hit a long-standing legacy
issue on Windows that prevents files from being named `com`. Thanks
Kristina & Jeremy for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374178 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-09 16:19:13 +00:00
Clement Courbet
bf17945077 [llvm-exegesis] Explore LEA addressing modes.
Summary:
This will help for PR32326.

This shows the well-known issue with `RBP` and `R13` as base registers.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits, RKSimon, andreadb

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374146 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-09 08:49:13 +00:00
Jeremy Morse
33c4130e26 Revert r374139, "[dsymutil] Fix handling of common symbols in multiple object files."
The added test files ("com", "com1.o", "com2.o") are reserved names on
Windows, and makes 'git checkout' fail with a filesystem error.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374144 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-09 08:27:48 +00:00
Jonas Devlieghere
74eabf1da0 [dsymutil] Fix handling of common symbols in multiple object files.
For common symbols the linker emits only a single symbol entry in the
debug map. This caused dsymutil to not relocate common symbols when
linking DWARF coming form object files that did not have this entry.
This patch fixes that by keeping track of common symbols in the object
files and synthesizing a debug map entry for them using the address from
the main binary.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374139 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-09 04:16:18 +00:00
Jonas Devlieghere
eaa022e285 [dsymutil] Improve verbose output (NFC)
The verbose output for finding relocations assumed that we'd always dump
the DIE after (which starts with a newline) and therefore didn't include
one itself. However, this isn't always true, leading to garbled output.

This patch adds a newline to the verbose output and adds a line that
says that the DIE is being kept (which isn't obvious otherwise). It also
adds a 0x prefix to the relocations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374123 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-08 22:03:13 +00:00
Clement Courbet
55589bce20 [llvm-exegesis] Add options to SnippetGenerator.
Summary:
This adds a `-max-configs-per-opcode` option to limit the number of
configs per opcode.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374054 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-08 14:30:24 +00:00
Andrea Di Biagio
c16d7eeac5 [MCA][LSUnit] Track loads and stores until retirement.
Before this patch, loads and stores were only tracked by their corresponding
queues in the LSUnit from dispatch until execute stage. In practice we should be
more conservative and assume that memory opcodes leave their queues at
retirement stage.

Basically, loads should leave the load queue only when they have completed and
delivered their data. We conservatively assume that a load is completed when it
is retired. Stores should be tracked by the store queue from dispatch until
retirement. In practice, stores can only leave the store queue if their data can
be written to the data cache.

This is mostly a mechanical change. With this patch, the retire stage notifies
the LSUnit when a memory instruction is retired. That would triggers the release
of LDQ/STQ entries.  The only visible change is in memory tests for the bdver2
model. That is because bdver2 is the only model that defines the load/store
queue size.

This patch partially addresses PR39830.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374034 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-08 10:46:01 +00:00
Clement Courbet
121dd37fe5 [llvm-exegesis] Finish plumbing the Config field.
Summary:
Right now there are no snippet generators that emit the `Config` Field,
but I plan to add it to investigate LEA operands for PR32326.

What was broken was:
 - `Config` Was not propagated up until the BenchmarkResult::Key.
 - Clustering should really consider different configs as measuring
 different things, so we should stabilize on (Opcode, Config) instead of
 just Opcode.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits, lebedev.ri

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374031 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-08 09:06:48 +00:00
George Rimar
8ce58b98ec [llvm-readobj/llvm-readelf] - Add checks for GNU-style to "all.test" test case.
We do not check the GNU-style output when -all is given.
This patch does that.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374028 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-08 08:59:12 +00:00
Clement Courbet
8de1711f7c [llvm-exegesis] Add stabilization test with config
In preparation for D68629.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374020 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-08 07:08:48 +00:00
Wei Mi
12cf3ff326 [SampleFDO] Add compression support for any section in ExtBinary profile format
Previously ExtBinary profile format only supports compression using zlib for
profile symbol list. In this patch, we extend the compression support to any
section. User can select some or all of the sections to compress. In an
experiment, for a 45M profile in ExtBinary format, compressing name table
reduced its size to 24M, and compressing all the sections reduced its size
to 11M.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373914 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-07 16:12:37 +00:00
George Rimar
dd1eb78ee2 [llvm-readelf/llvm-objdump] - Improve/refactor the implementation of SHT_LLVM_ADDRSIG section dumping.
This patch:

* Adds a llvm-readobj/llvm-readelf test file for SHT_LLVM_ADDRSIG sections. (we do not have any)
* Enables dumping of SHT_LLVM_ADDRSIG with --all.
* Changes the logic to report a warning instead of an error when something goes wrong during dumping
  (allows to continue dumping SHT_LLVM_ADDRSIG and other sections on error).
* Refactors a piece of logic to a new toULEB128Array helper which might be used for GNU-style
  dumping implementation.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373890 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-07 10:29:38 +00:00
Martin Storsjo
d3bb501021 [test] Remove another two unnecessary uses of REQUIRES: target-windows. NFC.
Differential Revision: https://reviews.llvm.org/D68449

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373780 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-04 19:47:48 +00:00
Owen Reynolds
1ec43d2bfc [llvm-ar][test] Clarified comment
The test is dependant on the installation of the en_US.UTF-8
locale. The reasoning for this is clarified in the amended comment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373737 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-04 12:26:25 +00:00
Simon Atanasyan
dbf8bc26c8 [llvm-readobj][mips] Implement GNU-style printing of .MIPS.abiflags section
In this patch `llvm-readobj` prints ASEs flags on a single line
separated by a comma. GNU `readelf` prints each ASEs flag on
a separate line. It will be fixed later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373732 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-04 11:59:16 +00:00
Owen Reynolds
77e36564b1 Revert [test] Remove locale dependency for mri-utf8.test
This reverts r373700 (git commit b455ebf921c5c940c2366bec226959e3a4127fee)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373728 91177308-0d34-0410-b5e6-96231b3b80d8
2019-10-04 11:12:37 +00:00