Commit Graph

7658 Commits

Author SHA1 Message Date
Michael Liao 8a25eabd42 [TableGen] Correct the shift to the proper bit width.
- Replace the previous 32-bit shift with 64-bit one matching `OpInit`.

llvm-svn: 368513
2019-08-10 16:15:06 +00:00
Peter Collingbourne 41ac83de6a gn build: Merge r368432.
llvm-svn: 368470
2019-08-09 19:28:53 +00:00
Peter Collingbourne 57e2d74729 gn build: Merge r368439.
llvm-svn: 368469
2019-08-09 19:28:44 +00:00
Peter Collingbourne 66ad48e97d gn build: Merge r368402.
llvm-svn: 368468
2019-08-09 19:28:35 +00:00
Peter Collingbourne 13dc20ddae gn build: Merge r368392.
llvm-svn: 368467
2019-08-09 19:28:26 +00:00
Peter Collingbourne 353aa77a57 gn build: Merge r368358.
llvm-svn: 368466
2019-08-09 19:28:17 +00:00
Daniel Sanders 1c5542aa9d [TableGen] Add "InitValue": Handle operands with set bit values in decoder methods
Summary:
The problem:
  When an operand had bits explicitly set to "1" (as in the InitValue.td test case attached), the decoder was ignoring those bits, and the DecoderMethod was receiving an input where the bits were still zero.

The solution:
  We added an "InitValue" variable that stores the initial value of the operand based on what bits were explicitly initialized to 1 in TableGen code. The generated decoder code then uses that initial value to initialize the "tmp" variable, then calls fieldFromInstruction to read the values for the remaining bits that were left unknown in TableGen.

This is mainly useful when there are variations of an instruction that differ based on what bits are set in the operands, since this change makes it possible to access those bits in a DecoderMethod. The DecoderMethod can use those bits to know how to handle the input.

Patch by Nicolas Guillemot

Reviewers: craig.topper, dsanders, fhahn

Reviewed By: dsanders

Subscribers: llvm-commits

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

llvm-svn: 368458
2019-08-09 17:30:33 +00:00
Peter Collingbourne 01048033d2 gn build: Merge r368331.
llvm-svn: 368333
2019-08-08 20:11:23 +00:00
Tom Stellard 87e2c9147e lit: Bump version to 0.10.0
Reviewers: hans

Subscribers: hans, delcypher, llvm-commits

Tags: #llvm

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

llvm-svn: 368329
2019-08-08 19:22:23 +00:00
Tom Stellard e77eb50f6d lit: Use a License classifier that pypi will accept
Summary:
'OSI Approved :: Apache-2.0 with LLVM exception' is not a valid
classifier.  'OSI Approved :: Apache Software License' is the closest
fit for the new license, so we've decided to use this one.

The classifiers seem to only be used for searching on the pypi website,
so this does not actually change the license of the code.
We still pass 'Apache-2.0 with LLVM exception' as the license to setup(),
and this appears alongside the classifier on the pypi webpage for lit.

Reviewers: chandlerc, ddunbar, joerg

Reviewed By: joerg

Subscribers: delcypher, llvm-commits

Tags: #llvm

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

llvm-svn: 368315
2019-08-08 17:23:33 +00:00
Nico Weber e75ccf85fe gn build: Merge r368158
llvm-svn: 368179
2019-08-07 15:30:44 +00:00
Nico Weber 3a7c85a8d4 gn build: Merge r368119
llvm-svn: 368178
2019-08-07 15:29:01 +00:00
David Bolvansky 7169ea391a [UpdateTestChecks] Update tests option
Summary:
Port of new feature introduced https://reviews.llvm.org/D65610 to other update scripts.

- update_*_checks.py: add an alias -u for --update-only
- port --update-only to other update_*_test_checks.py scripts
- update script aborts if the test file was generated by another update_*_test_checks.py utility

Reviewers: lebedev.ri, RKSimon, MaskRay, reames, gbedwell

Reviewed By: MaskRay

Subscribers: llvm-commits

Tags: #llvm

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

llvm-svn: 368174
2019-08-07 14:44:50 +00:00
Ilya Biryukov 843280bfe3 [unittests] Mark private gmock headers with IWYU pragmas. NFC
Summary: To prevent clangd from adding #include of those headers.

Reviewers: gribozavr

Reviewed By: gribozavr

Subscribers: kadircet, llvm-commits, cfe-commits

Tags: #llvm

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

llvm-svn: 368135
2019-08-07 08:45:38 +00:00
Craig Topper 29688f4da0 [X86] Limit vpermil2pd/vpermil2ps immediates to 4 bits in the assembly parser.
The upper 4 bits of the immediate byte are used to encode a
register. We need to limit the explicit immediate to fit in the
remaining 4 bits.

Fixes PR42899.

llvm-svn: 368123
2019-08-07 05:34:27 +00:00
Peter Collingbourne 75e557c8e2 gn build: Merge r368065.
llvm-svn: 368099
2019-08-06 21:48:06 +00:00
Peter Collingbourne 0974e2257a gn build: Merge r368052.
llvm-svn: 368098
2019-08-06 21:47:55 +00:00
Peter Collingbourne bd3d6677bc gn build: Merge r368054.
llvm-svn: 368097
2019-08-06 21:47:46 +00:00
Peter Collingbourne 9272a3c04f gn build: Merge r368086.
llvm-svn: 368096
2019-08-06 21:47:37 +00:00
Peter Collingbourne 7ae4713771 gn build: Merge r368070.
llvm-svn: 368095
2019-08-06 21:47:27 +00:00
Dmitri Gribenko bd1721e534 Revert "gn build: Merge r368021"
This reverts commit r368025, which depends on r368021, which needs to be
reverted.

llvm-svn: 368034
2019-08-06 13:39:27 +00:00
Nico Weber b2ec7a0da6 gn build: Merge r368024
llvm-svn: 368027
2019-08-06 13:12:26 +00:00
Nico Weber 87951c89d7 gn build: Merge r368021
llvm-svn: 368025
2019-08-06 13:08:54 +00:00
Fangrui Song 1eb84c4d06 [UpdateTestChecks] Fix an incorrect %s added in r368006
llvm-svn: 368007
2019-08-06 09:44:18 +00:00
Fangrui Song d24e6d7bf5 [UpdateTestChecks] Apply some string concatenation cleanup
Some were what I suggested in D65610.

llvm-svn: 368006
2019-08-06 09:42:00 +00:00
Hans Wennborg 757ac1ffd5 test-release.sh: Reorder sed commands for the binary comparison
llvm-svn: 368004
2019-08-06 09:30:10 +00:00
Nico Weber 96dd95fd95 gn build: Add AMDGPU target
Differential Revision: https://reviews.llvm.org/D65767

llvm-svn: 367972
2019-08-06 02:25:49 +00:00
Nico Weber 08fd65964f gn build: Leave a comment why "-gen-searchable-table" tablegen()s are not called FooGenSearchableTable
llvm-svn: 367971
2019-08-06 02:21:50 +00:00
Nico Weber 139fb5d478 gn build: Merge r367917
llvm-svn: 367970
2019-08-06 02:17:05 +00:00
Philip Reames 9bf59384c6 Robustify update_test_checks.py to non-autogened tests, and add a mode to skip non-autogenerated ones
Intended use case is:
./utils/update_test_checks.py test/Transform/PassDir/* --update-only
(i.e. rapidly be able to see changes in autogened filed, before handing non-autogened tests individually)

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

llvm-svn: 367900
2019-08-05 18:25:08 +00:00
Nico Weber 2f238bd5ba gn build: run "gn format"
llvm-svn: 367890
2019-08-05 16:55:04 +00:00
Nico Weber 0039f87fa5 gn build: Merge r367864
llvm-svn: 367868
2019-08-05 14:22:21 +00:00
Hans Wennborg 5a4b41f146 test-release.sh: Perform the sed substitution on both files (PR42739)
The comparison would otherwise fail if Phase2 occurrs naturally in the
object file. It would get replaced with Phase3 in the one .o, but not
in the other.

We were already running both files through sed to have them processed in
this same way; this is a logical extension of that.

llvm-svn: 367847
2019-08-05 13:04:12 +00:00
Hans Wennborg f75dae9f5c Write the RequiredLibraries for 'all' in LibraryDependencies.inc in a deterministic order (PR42739)
llvm-svn: 367846
2019-08-05 13:04:07 +00:00
Nico Weber e4bb2b181f gn build: Merge r367839
llvm-svn: 367844
2019-08-05 12:44:53 +00:00
Hans Wennborg 76bdcab1ca build_llvm_package.bat: Set PYTHON_EXECUTABLE (PR42724)
llvm-svn: 367815
2019-08-05 08:51:45 +00:00
Nico Weber 2ca1548299 gn build: Merge r367756
llvm-svn: 367795
2019-08-04 23:34:27 +00:00
Simon Pilgrim 6d2e8eb9ca [UpdateTestChecks] Add end_function directive to regex matcher for wasm32 function body
llvm-svn: 367786
2019-08-04 16:28:37 +00:00
Mehdi Amini 4197d1c366 Fixup r367321 "Ask confirmation when `git llvm push` will push multiple commits"
I unfortunately commited an obsolete revision in r367321 that didn't
have all the changes the reviewers suggested.

llvm-svn: 367761
2019-08-03 18:53:52 +00:00
Tim Northover a009a60a91 IR: print value numbers for unnamed function arguments
For consistency with normal instructions and clarity when reading IR,
it's best to print the %0, %1, ... names of function arguments in
definitions.

Also modifies the parser to accept IR in that form for obvious reasons.

llvm-svn: 367755
2019-08-03 14:28:34 +00:00
Joel E. Denny a67d81e4e2 [lit] Print internal env commands
Without this patch, the internal `env` command removes `env` and its
args from the command line while parsing it.  This patch modifies a
copy instead so that the original command line is printed.

Reviewed By: stella.stamenova, rnk

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

llvm-svn: 367752
2019-08-03 06:08:19 +00:00
Joel E. Denny 2c5a60f1dc [lit] Actually run tests for internal env command
Put the main test script in the right directory, and fix a python bug
in a local script.

Reviewed By: stella.stamenova

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

llvm-svn: 367751
2019-08-03 06:08:04 +00:00
Amara Emerson 52e6d52f10 [GlobalISel] Check LLT size matches memory size for non-truncating stores.
This was causing a bug where non-truncating stores would be selected instead of truncating ones.

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

llvm-svn: 367737
2019-08-02 23:33:13 +00:00
Stella Stamenova df1b00a7cb [lit] Fix 42812: lit test suite can no longer be run stand-alone
Summary:
This change updates the lit.cfg file to use llvm_config when it is available, but when it is not, it directly modifies the config object. This makes it possible to run the lit tests standalone without having built llvm (as long as the correct binaries are present in the path such as FileCheck and not).

Because the lit tests don't take a hard dependency on llvm_config, some features such as system-windows have to have definitions in lit's cfg file as well. This is a potential issue as the os features sometimes change names (for example, we went from windows to system-windows, etc.). This can cause drift between lit's tests and the rest of the llvm tests.

Reviewers: probinson, mgorny

Reviewed By: mgorny

Subscribers: delcypher, llvm-commits, asmith

Tags: #llvm

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

llvm-svn: 367730
2019-08-02 22:03:12 +00:00
James Y Knight 383d760ffe Fix git-llvm to not delete non-empty directories.
Previously, if a directory contained only other sub-directories, one
of which was being removed, git llvm would delete the parent and all
its subdirs, even though only one should've been deleted.

This error occurred in r366590, where the commit attempted to remove
lldb/packages/Python/lldbsuite/test/tools/lldb-mi, but git-llvm
erroneously removed the entire contents of
lldb/packages/Python/lldbsuite/test/tools.

This happened because "git apply" automatically removes empty
directories locally, and the absence of a local directory was
previously taken as an indication to call 'svn rm' on that
directory. However, an empty local directory does not necessarily
indicate that the directory is truly empty.

Fix that by removing directories only when they're empty on the git
side.

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

llvm-svn: 367693
2019-08-02 17:10:04 +00:00
Peter Collingbourne a13a827c99 gn build: Merge r367667.
llvm-svn: 367692
2019-08-02 17:02:05 +00:00
Rui Ueyama 4d41c332ef Revert r367649: Improve raw_ostream so that you can "write" colors using operator<<
This reverts commit r367649 in an attempt to unbreak Windows bots.

llvm-svn: 367658
2019-08-02 07:22:34 +00:00
Rui Ueyama a52f982f1c Improve raw_ostream so that you can "write" colors using operator<<
1. raw_ostream supports ANSI colors so that you can write messages to
the termina with colors. Previously, in order to change and reset
color, you had to call `changeColor` and `resetColor` functions,
respectively.

So, if you print out "error: " in red, for example, you had to do
something like this:

  OS.changeColor(raw_ostream::RED);
  OS << "error: ";
  OS.resetColor();

With this patch, you can write the same code as follows:

  OS << raw_ostream::RED << "error: " << raw_ostream::RESET;

2. Add a boolean flag to raw_ostream so that you can disable colored
output. If you disable colors, changeColor, operator<<(Color),
resetColor and other color-related functions have no effect.

Most LLVM tools automatically prints out messages using colors, and
you can disable it by passing a flag such as `--disable-colors`.
This new flag makes it easy to write code that works that way.

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

llvm-svn: 367649
2019-08-02 04:48:30 +00:00
Joel E. Denny c69c46ff7a Revert r366980: "[lit] Protect full test suite from FILECHECK_OPTS"
Windows bots are broken.  See recent D65335 and D65156 comments.

llvm-svn: 367627
2019-08-01 22:26:51 +00:00
Joel E. Denny 7f7b3f1131 Revert r367123: "[llvm] [lit/tests] Replace 'env -u' with more portable construct"
Must be reverted in order to revert r366980, which breaks windows
bots.  See recent D65335 and D65156 comments.

llvm-svn: 367626
2019-08-01 22:26:37 +00:00