Commit Graph

8623 Commits

Author SHA1 Message Date
Nico Weber 9e48422035 Revert "[llvm-objdump] Display locations of variables alongside disassembly"
Makes tests fail on Windows, see https://reviews.llvm.org/D70720#1924542

This reverts commit 3a5ddedadb, and
follow-ups:
f4cb9c919e
042eb0482a
c0cf5f5da9
18649f4813
f62b898c1f
2020-03-16 14:04:25 -04:00
Nico Weber 4060016fce Revert "[gn build] (manually) port 8b409eaba"
This reverts commit 85462aefb5
and follow-up 8d6582aa6b.

8b409eaba was reverted.
2020-03-16 11:33:19 -04:00
LLVM GN Syncbot 185b41393d [gn build] Port f62b898c1f 2020-03-16 13:54:40 +00:00
Nico Weber 8d6582aa6b [gn build] (manually) port 8b409eaba more 2020-03-16 09:54:22 -04:00
Nico Weber 85462aefb5 [gn build] (manually) port 8b409eaba 2020-03-16 09:47:06 -04:00
Nico Weber 7f5b8115ac [gn build] don't repeat arm header targets twice. no behavior change. 2020-03-15 18:20:26 -04:00
LLVM GN Syncbot de0011abf5 [gn build] Port 5087ace651 2020-03-15 20:28:52 +00:00
Nico Weber 47df2220a2 [gn build] (manually) port 5087ace651 more 2020-03-15 16:28:19 -04:00
Nico Weber d09a46cdbc [gn build] (manually) port 5087ace651 2020-03-15 16:06:37 -04:00
LLVM GN Syncbot ee04339b7f [gn build] Port 633ea07200 2020-03-14 21:50:50 +00:00
Simon Cook a26bd4ec16 [TableGen] Support combining AssemblerPredicates with ORs
For context, the proposed RISC-V bit manipulation extension has a subset
of instructions which require one of two SubtargetFeatures to be
enabled, 'zbb' or 'zbp', and there is no defined feature which both of
these can imply to use as a constraint either (see comments in D65649).

AssemblerPredicates allow multiple SubtargetFeatures to be declared in
the "AssemblerCondString" field, separated by commas, and this means
that the two features must both be enabled. There is no equivalent to
say that _either_ feature X or feature Y must be enabled, short of
creating a dummy SubtargetFeature for this purpose and having features X
and Y imply the new feature.

To solve the case where X or Y is needed without adding a new feature,
and to better match a typical TableGen style, this replaces the existing
"AssemblerCondString" with a dag "AssemblerCondDag" which represents the
same information. Two operators are defined for use with
AssemblerCondDag, "all_of", which matches the current behaviour, and
"any_of", which adds the new proposed ORing features functionality.

This was originally proposed in the RFC at
http://lists.llvm.org/pipermail/llvm-dev/2020-February/139138.html

Changes to all current backends are mechanical to support the replaced
functionality, and are NFCI.

At this stage, it is illegal to combine features with ands and ors in a
single AssemblerCondDag. I suspect this case is sufficiently rare that
adding more complex changes to support it are unnecessary.

Differential Revision: https://reviews.llvm.org/D74338
2020-03-13 17:13:51 +00:00
Matt Arsenault 6bbc1737e0 TableGen: Fix typo 2020-03-13 10:45:28 -04:00
LLVM GN Syncbot 73d8a324ec [gn build] Port 512767eb3f 2020-03-13 14:09:37 +00:00
Nico Weber 5c68043b9f [gn build] (manually) port ce79c4246 2020-03-13 06:08:28 -04:00
Nico Weber 03f5f6bebd [gn build] (manually) port eb41cc6198 2020-03-12 19:29:09 -04:00
LLVM GN Syncbot b93dd67797 [gn build] Port fa8080376e 2020-03-12 16:33:39 +00:00
LLVM GN Syncbot e79397f5e2 [gn build] Port 2c9cf9f4dd 2020-03-12 16:01:56 +00:00
LLVM GN Syncbot f31f22ef0f [gn build] Port d5edcb9064 2020-03-12 11:58:14 +00:00
LLVM GN Syncbot 9dd561d8b1 [gn build] Port 518292dbdf 2020-03-12 05:17:52 +00:00
Christian Sigg f3ad6eb5d3 Change to individual pretty printer classes, remove generic `make_printer`.
Summary: Follow-up from D72589.

Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: merge_guards_bot, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73609
2020-03-11 15:04:03 +01:00
LLVM GN Syncbot 8d9886f893 [gn build] Port 326bc1da45 2020-03-11 10:47:56 +00:00
LLVM GN Syncbot 7ecc743c5d [gn build] Port ebdb98f254 2020-03-10 20:34:28 +00:00
LLVM GN Syncbot a1224432ca [gn build] Port a4cde9ad7b 2020-03-10 17:04:42 +00:00
LLVM GN Syncbot 14219aa442 [gn build] Port 714466bf36 2020-03-10 14:33:04 +00:00
Nico Weber 877073bc1c [gn build] (manually) merge 47edf5bafb 2020-03-10 10:22:39 -04:00
Reid Kleckner d75be4c06a [gn] Use ghash if using clang & LLD together to make PDBs
I noticed my links were a bit slower on Windows than usual.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D75774
2020-03-09 15:23:54 -07:00
LLVM GN Syncbot 78ad24bff6 [gn build] Port 1e0669bfe0 2020-03-09 21:59:49 +00:00
Arthur Eubanks 3262319806 Fix typo in gn files
SKD -> SDK
2020-03-09 13:33:13 -07:00
LLVM GN Syncbot 4a1b6b0057 [gn build] Port 3486cc014b 2020-03-09 17:56:57 +00:00
LLVM GN Syncbot 3b64bf7b01 [gn build] Port 882f589e20 2020-03-09 16:03:39 +00:00
LLVM GN Syncbot 9800543aed [gn build] Port 57c964aaa7 2020-03-08 11:50:36 +00:00
Nico Weber 8fef67a2c5 [gn build] copy compiler-rt headers to clang include dir on all platforms 2020-03-06 21:55:56 -05:00
Yuanfang Chen 1f7badf979 Add some more vscode files
On top of existing TableGen file syntax highlighting, added
- IR syntax highlighting
- LIT test output patterMatcher
- etc.
2020-03-05 19:31:28 -08:00
Fangrui Song 3e851f4a68 [PowerPC] Delete PPCMachObjectWriter and powerpc{,64}-apple-darwin
Reviewed By: #powerpc, sfertile

Differential Revision: https://reviews.llvm.org/D75494
2020-03-05 11:05:26 -08:00
LLVM GN Syncbot 6f1222560b [gn build] Port cada5b881b 2020-03-05 10:56:10 +00:00
Fangrui Song 1a5da3f0b2 [gn build] Fix llvm-gsymutil after D75291 2020-03-03 16:37:52 -08:00
Greg Clayton 90e40a0bda Rename "llvm-gsym" to "llvm-gsymutil" and fix dependencies.
Summary: This patch renames the "llvm-gsym" tool directory to "llvm-gsymutil". Dependencies are also reduced to the bare minimum for llvm-gsymutil.

Reviewers: aprantl, thakis

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D75291
2020-03-03 14:13:29 -08:00
LLVM GN Syncbot 22dd23583a [gn build] Port c84532a70a 2020-03-03 18:25:30 +00:00
LLVM GN Syncbot 680a75e1e4 [gn build] Port ae4d39c9e4 2020-03-03 15:41:46 +00:00
LLVM GN Syncbot f2cd085078 [gn build] Port 613f791131 2020-03-03 14:16:22 +00:00
LLVM GN Syncbot ac8680f0d8 [gn build] Port 3a063d68e3 2020-03-03 13:33:01 +00:00
LLVM GN Syncbot c016e9fbee [gn build] Port 3755039c99 2020-03-03 13:33:01 +00:00
LLVM GN Syncbot a38b49918b [gn build] Port 1454c27b60 2020-03-03 11:18:38 +00:00
Hans Wennborg 93c73d4834 Revert "Reland "[gn build] (manually) merge 68a235d07f9e70""
This reverts commit 94d4ca9004.

I reverted 68a235d07f again in
916be8fd6a.
2020-03-03 11:21:11 +01:00
Joerg Sonnenberger eb812efa12 Explicitly include <cassert> when using assert
Depending on the OS used, a module-enabled build can fail due to the
special handling <cassert> gets as textual header.
2020-03-02 22:45:28 +01:00
LLVM GN Syncbot b9f37e9ace [gn build] Port 49684f9db5 2020-03-02 17:35:47 +00:00
LLVM GN Syncbot 8c7c32b4c9 [gn build] Port 5a1958f267 2020-03-02 09:02:51 +00:00
Reid Kleckner af450eabb9 Avoid including FileSystem.h from MemoryBuffer.h
Lots of headers pass around MemoryBuffer objects, but very few open
them. Let those that do include FileSystem.h.

Saves ~250 includes of Chrono.h & FileSystem.h:

$ diff -u thedeps-before.txt thedeps-after.txt | grep '^[-+] ' | sort | uniq -c | sort -nr
    254 -    ../llvm/include/llvm/Support/FileSystem.h
    253 -    ../llvm/include/llvm/Support/Chrono.h
    237 -    ../llvm/include/llvm/Support/NativeFormatting.h
    237 -    ../llvm/include/llvm/Support/FormatProviders.h
    192 -    ../llvm/include/llvm/ADT/StringSwitch.h
    190 -    ../llvm/include/llvm/Support/FormatVariadicDetails.h
...

This requires duplicating the file_t typedef, which is unfortunate. I
sunk the choice of mapping mode down into the cpp file using variable
template specializations instead of class members in headers.
2020-02-29 12:30:23 -08:00
Jordan Rupprecht d369334270 [NFC] Fix minor python issues.
* llvm-gisel-cov.py: extra `)` after print
* chunk-print-before-all.py: py2-only print method
2020-02-28 14:17:43 -08:00
Jay Foad 395e2c0679 [Utils] Make some scripts directly executable 2020-02-28 13:39:54 +00:00
LLVM GN Syncbot 29fb0b1310 [gn build] Port 6af859dcca 2020-02-28 11:49:23 +00:00
LLVM GN Syncbot 2301a18c1c [gn build] Port b0142cd986 2020-02-27 20:40:16 +00:00
LLVM GN Syncbot 299c3e13fb [gn build] Port 3c36d8dad5 2020-02-26 16:09:48 +00:00
Nico Weber cfbe889af5 [gn build] re-"gn format" all gn files 2020-02-26 08:38:34 -05:00
Nico Weber ce75c3d2b6 [gn build] (manually) port 2f6cc21f44 2020-02-26 08:36:05 -05:00
Nico Weber 1b30b49436 [gn build] (manually) merge e058667a2e 2020-02-26 07:33:32 -05:00
Adrian Prantl 828fb0c51a Fix a null dereference in the LLDB data formatters. 2020-02-25 16:43:55 -08:00
Hans Wennborg edae4be8e2 Fix DfaEmitter::visitDfaState() crash in MSVC x86 debug builds (PR44945)
No functionality change (intended), but this seems to make the code a
bit clearer for the compiler and maybe for human readers too.
2020-02-25 15:18:41 +01:00
Nico Weber 3950093951 [gn build] (manually) merge fee41517fe 2020-02-25 07:19:49 -05:00
Hans Wennborg 4486aa03c5 build_llvm_package.bat: Produce zip files in addition to the installers
Now that the Windows installer no longer does anything besides
self-extract, maybe it would make sense to distribute the toolchain as a
plain zip file in addition to the current installer.

Differential revision: https://reviews.llvm.org/D74896
2020-02-25 12:14:07 +01:00
Peter Collingbourne 0414c56940 Revert "Rework go bindings so that validation works fine"
And add llvm-go back to the test dependencies.

No longer necessary now that llvm-go has been brought back.

This reverts commit e8f8873da5.
2020-02-24 09:20:08 -08:00
Nico Weber 453d54865a [gn build] remove -std=c++11 in libcxx build pending discussion in 80e73f2 review thread 2020-02-24 12:10:40 -05:00
Nico Weber 406a54b65f [gn build] (manually) merge 54fa9ecd30 2020-02-24 11:42:32 -05:00
Bevin Hansson c3f36acc92 [MC] Widen the functional unit type from 32 to 64 bits.
Summary:
The type used to represent functional units in MC is
'unsigned', which is 32 bits wide. This is currently
not a problem in any upstream target as no one seems
to have hit the limit on this yet, but in our
downstream one, we need to define more than 32
functional units.

Increasing the size does not seem to cause a huge
size increase in the binary (an llc debug build went
from 1366497672 to 1366523984, a difference of 26k),
so perhaps it would be acceptable to have this patch
applied upstream as well.

Subscribers: hiraditya, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D71210
2020-02-24 09:37:00 +01:00
LLVM GN Syncbot 8fa776b8ed [gn build] Port 1874dee566 2020-02-21 20:51:44 +00:00
Craig Topper 8875ee18d7 [X86] Add a new format type for instructions that represent named prefix bytes like data16 and rep. Use it to make a simpler version of isPrefix.
isPrefix was added to support the patches to align branches.
it relies on a switch over instruction names.

This moves those opcodes to a new format so the information is
tablegen and we can just check for a specific value in some bits
in TSFlags instead.

I've left the other function in place for now so that the
existing patches in phabricator will still work. I'll work with
the owner to get them migrated.
2020-02-21 12:34:59 -08:00
Fangrui Song e4df934ca7 [Clang interpreter] Rename Block.{h,cpp} to InterpBlock.{h,cpp}
The Blocks runtime provide a header named Block.h.
It is generally preferable to avoid name collision with system headers
(reducing reliance on -isystem order, more friendly when navigating files in
an editor, etc).

Reviewed By: gribozavr2

Differential Revision: https://reviews.llvm.org/D74934
2020-02-21 09:47:28 -08:00
LLVM GN Syncbot 8c70a2597f [gn build] Port 23444edf30 2020-02-21 17:21:54 +00:00
Sanjay Patel 15e20dcb8f [Utils][x86] add an option to reduce scrubbing of shuffles with memops
I was drafting a patch that would increase broadcast load usage,
but our shuffle scrubbing makes it impossible to see if the memory
operand offset was getting created correctly. I'm proposing to make
that an option (defaulted to 'off' for now to reduce regression
test churn).

The updated files provide examples of tests where we can now verify
that the pointer offset for a loaded memory operand is correct. We
still have stack and constant scrubbing that can obscure the operand
even if we don't scrub the entire instruction.

Differential Revision: https://reviews.llvm.org/D74775
2020-02-20 09:33:05 -05:00
Matt Arsenault de6e968c0d TableGen: Fix logic for default operands
This was checking for default operands in the current DAG instruction,
rather than the correct result operand list. I'm not entirly sure how
this managed to work before, but was failing for me when multiple
default operands were overridden.
2020-02-19 23:41:07 -05:00
Nico Weber 8ea3eb86d6 [gn build] (manually) partially (?) merge 7ff1f55a12 2020-02-19 21:09:44 -05:00
LLVM GN Syncbot 38419b8afa [gn build] Port 85fb997659 2020-02-19 22:58:29 +00:00
Simon Pilgrim 59982a6d8f [UpdateTestChecks] Add support for '.' in ir function names
Will let us regenerate from amdgpu float constant tests
2020-02-19 18:58:44 +00:00
Nico Weber 187204cd74 [gn build] use \bfoo\b instead of \<foo\> in sync script
\<foo\> is more correct, but since we use shell=True on Windows,
the < and > get interpreted as redirection operators.

Rather than adding cmd escaping, just use \bfoo\b, which is Good
Enough Often Enough.
2020-02-19 12:32:02 -05:00
LLVM GN Syncbot 069b85fed1 [gn build] Port a54d81f597 2020-02-19 17:28:29 +00:00
Nico Weber f14f9bd22e [gn build] Set up include_dirs for a54d81f597 (first checker in a subdir) 2020-02-19 12:24:01 -05:00
Nico Weber bde0e320bc [gn build] revert e8e078c8bf
Now that I've updated ancient goma clients on the bots, this should
work. (Internal goma bug: b/139410332, fixed months ago.)
2020-02-19 11:11:25 -05:00
Krzysztof Parzyszek bc23e83e45 Add <128 x i1> as an intrinsic type 2020-02-19 09:38:13 -06:00
Jay Foad a912275864 [TableGen] Diagnose undefined fields when generating searchable tables
Summary:
Previously TableGen would crash trying to print the undefined value as
an integer.

Change-Id: I3900071ceaa07c26acafb33bc49966d7d7a02828

Reviewers: nhaehnle

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74210
2020-02-19 14:03:48 +00:00
LLVM GN Syncbot 7a4ddfb774 [gn build] Port ca9ba76481 2020-02-19 00:02:12 +00:00
Reid Kleckner 0c2b09a9b6 [IR] Lazily number instructions for local dominance queries
Essentially, fold OrderedBasicBlock into BasicBlock, and make it
auto-invalidate the instruction ordering when new instructions are
added. Notably, we don't need to invalidate it when removing
instructions, which is helpful when a pass mostly delete dead
instructions rather than transforming them.

The downside is that Instruction grows from 56 bytes to 64 bytes.  The
resulting LLVM code is substantially simpler and automatically handles
invalidation, which makes me think that this is the right speed and size
tradeoff.

The important change is in SymbolTableTraitsImpl.h, where the numbering
is invalidated. Everything else should be straightforward.

We probably want to implement a fancier re-numbering scheme so that
local updates don't invalidate the ordering, but I plan for that to be
future work, maybe for someone else.

Reviewed By: lattner, vsk, fhahn, dexonsmith

Differential Revision: https://reviews.llvm.org/D51664
2020-02-18 14:44:24 -08:00
LLVM GN Syncbot e706656af0 [gn build] Port c9e93c84f6 2020-02-18 18:45:25 +00:00
Nico Weber 711caee533 [gn build] (manually) port fc69967a4b 2020-02-18 13:29:13 -05:00
Stanislav Mekhanoshin b2a958a013 [TBLGEN] Emit register pressure set enum
Differential Revision: https://reviews.llvm.org/D74649
2020-02-18 10:09:05 -08:00
Benjamin Kramer 44bbc76700 Drop a constexpr in favor of const, MSVC complains.
lib\Target\Hexagon\HexagonGenDFAPacketizer.inc(109): error C2131: expression did not evaluate to a constant
2020-02-18 17:04:42 +01:00
Benjamin Kramer 9e4b761aba Move DFA tables into the read-only data segmant. 2020-02-18 14:36:56 +01:00
Stanislav Mekhanoshin 8e760e1018 [TBLGEN] Inhibit generation of unneeded psets
Differential Revision: https://reviews.llvm.org/D74744
2020-02-17 15:38:08 -08:00
Nico Weber f4158dceb5 [gn build] (manually) merge e9849d519 2020-02-17 14:37:43 -05:00
Simon Tatham 377b0e2b06 [TableGen] Don't elide bitconverts in PatFrag fragments.
Summary:
In the DAG pattern backend, `SimplifyTree` simplifies a pattern by
removing bitconverts between two identical types. But that function is
also run on the fragments list in instances of `PatFrags`, in which
the types haven't been specified yet. So the input and output of the
bitconvert always evaluate to the empty set of types, which makes them
compare equal. So the test always passes, and bitconverts are
unconditionally removed from the PatFrag RHS.

Fixed by spotting the empty type set and using it to inhibit the
optimization.

Reviewers: nhaehnle, hfinkel

Reviewed By: nhaehnle

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74627
2020-02-17 09:30:45 +00:00
Nico Weber e8e078c8bf [gn build] use -Xclang form for fdebug-comp-dir for now
The driver version of the flag seems to confuse goma.
2020-02-16 21:30:27 -05:00
LLVM GN Syncbot c7c42b4a93 [gn build] Port ee2c0f76d7 2020-02-16 17:32:06 +00:00
Eric Astor ee2c0f76d7 [ms] [llvm-ml] Add a draft MASM parser
Summary:
Many directives are unavailable, and support for others may be limited.

This first draft has preliminary support for:
    - conditional directives (including errors),
    - data allocation (unsigned types up to 8 bytes, and ALIGN),
    - equates/variables (numeric and text),
    - and procedure directives (without parameters),
as well as COMMENT, ECHO, INCLUDE, INCLUDELIB, PUBLIC, and EXTERN. Text variables (aka text macros) are expanded in-place wherever the identifier occurs.

We deliberately ignore all ml.exe processor directives.

Prominent features not yet supported:
    - structs
    - macros (both procedures and functions)
    - procedures (with specified parameters)
    - substitution & expansion operators

Conditional directives are complicated by the fact that "ifdef rax" is a valid way to check if a file is being assembled for a 64-bit x86 processor; we add support for "ifdef <register>" in general, which requires adding a tryParseRegister method to all MCTargetAsmParsers. (Some targets require backtracking in the non-register case.)

Reviewers: rnk, thakis

Reviewed By: thakis

Subscribers: kerbowa, merge_guards_bot, wuzish, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, mgorny, sbc100, jgravelle-google, hiraditya, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Jim, s.egerton, pzheng, sameer.abuasal, apazos, luismarques, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72680
2020-02-16 12:30:46 -05:00
Nico Weber 37d1120572 [gn build] unbreak win build by removing flags that only work with a sysroot 2020-02-15 06:25:21 -05:00
Nico Weber ead0b76382 [gn build] Make build locally deterministic
This follows http://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html
to make the GN build locally deterministic.

With this, I've built lld at two different build paths on my Windows box and got
identical binaries. (I'd expect the same to happen on Linux, and with other
binaries.)

This doesn't have the bits to get universal determinism yet.

Differential Revision: https://reviews.llvm.org/D74519
2020-02-14 21:55:33 -05:00
Stanislav Mekhanoshin 922197d664 [TBLGEN] Allow to override RC weight
Differential Revision: https://reviews.llvm.org/D74509
2020-02-14 15:49:52 -08:00
Nico Weber 09153ab9d2 [windows] Add /Gw to compiler flags
This is like -fdata-sections, and it's not part of /O2 by default for some reason.

In the cmake build, reduces the size of clang.exe from 70,358,016 bytes to 69,982,720 bytes.

clang-format.exe goes from 3,703,296 bytes to 3,331,072 bytes.

Differential Revision: https://reviews.llvm.org/D74573
2020-02-14 15:15:00 -05:00
Alex Richardson c29310707e Fix line endings produced by update_cc_test_checks.py
Use the same appraoch as update_llc_test_checks.py to always write \n
line endings. This should fix the Windows buildbots.
2020-02-14 15:17:27 +00:00
serge-sans-paille f8b8a1ca8b Fix lit version test
Looks like on some system, version is printed on stderr, on some it's on stdout...
2020-02-13 21:49:48 +01:00
LLVM GN Syncbot f888ae7262 [gn build] Port 49bffa5f8b 2020-02-13 20:43:19 +00:00
serge-sans-paille 1d4849379f Fix handling of --version in lit
There's no reason why we should require a directory when asking for the version.

Differential Revision: https://reviews.llvm.org/D74553
2020-02-13 21:36:12 +01:00
LLVM GN Syncbot 1bafd2be06 [gn build] Port 19602b7194 2020-02-13 18:52:48 +00:00
Nico Weber 0bd6be9c3d [gn build] Fix sync script on renames like "Foo.cpp" -> "LLVMFoo.cpp"
Before, the script used `git log -SFoo.cpp` to find a commit where
the number of occurrences of "Foo.cpp" changed -- but since
a patch with

  + LLVMFoo.cpp
  - Foo.cpp

contains the same number of instances of "Foo.cpp", the script
incorrectly skipped this type of rename.

As fix, look for '\bFoo\.cpp\b' instead and pass --pickaxe-regex
so that we can grep for word boundaries.

To test, check out 7531a5039f (which renamed in llvm/lib/IR
RemarkStreamer.cpp to LLVMRemarkStreamer.cpp) and look at the output of
the script.  Before this change, it correctly assigned the addition
of LLVMRemarkStreamer.cpp to 7531a5039f but incorrectly assigned
the removal of RemarkStreamer.cpp to b8a847c.  With this, it
correctly assigns both to 7531a5039f.
2020-02-13 09:26:47 -05:00
serge-sans-paille e8f8873da5 Rework go bindings so that validation works fine
Basically change the layout to please `go build` and remove references to
`llvm-go`.

Update llvm/test/Bindings/Go/ to use the system go compiler

Differential Revision: https://reviews.llvm.org/D74540
2020-02-13 14:13:03 +01:00
Stanislav Mekhanoshin f8d044bbcf [TBLGEN] Fix subreg value overflow in DAGISelMatcher
Tablegen's DAGISelMatcher emits integers in a VBR format,
so if an integer is below 128 it can fit into a single
byte, otherwise high bit is set, next byte is used etc.
MatcherTable is essentially an unsigned char table. When
SelectionDAGISel parses the table it does a reverse translation.

In a situation when numeric value of an integer to emit is
unknown it can be emitted not as OPC_EmitInteger but as
OPC_EmitStringInteger using a symbolic name of the value.
In this situation the value should not exceed 127.

One of the situations when OPC_EmitStringInteger is used is
if we need to emit a subreg into a matcher table. However,
number of subregs can exceed 127. Currently last defined subreg
for AMDGPU is 192. That results in a silent bug in the ISel
with matcher reading from an invalid offset.

Fixed this bug to emit actual VBR encoded value for a subregs
which value exceeds 127.

Differential Revision: https://reviews.llvm.org/D74368
2020-02-12 13:29:57 -08:00
LLVM GN Syncbot 5ed15ff6b4 [gn build] Port 6030fe01f4 2020-02-12 18:34:39 +00:00
Derek Schuff b2c44de956 [llvm-objcopy][WebAssembly] Add dump/add/remove-section support
Add support for adding, removing, and dumping wasm sections to objcopy

Differential Revision: https://reviews.llvm.org/D70970
2020-02-11 15:17:18 -08:00
Justin Lebar 1bd6123b78 Use std::foo_t rather than std::foo in LLVM.
Summary: C++14 migration. No functional change.

Reviewers: bkramer, JDevlieghere, lebedev.ri

Subscribers: MatzeB, hiraditya, jkorous, dexonsmith, arphaman, kadircet, lebedev.ri, usaxena95, cfe-commits, llvm-commits

Tags: #clang, #llvm

Differential Revision: https://reviews.llvm.org/D74384
2020-02-11 15:12:51 -08:00
Johannes Doerfert 1217ea502e [NFC] Fix spelling 2020-02-11 16:44:04 -06:00
Johannes Doerfert 1698cc7eba [Utils] Allow "on-the-fly" argument changes for update_test_check scripts
Update test scripts were limited because they performed a single action
on the entire file and if that action was controlled by arguments, like
the one introduced in D68819, there was no record of it.

This patch introduces the capability of changing the arguments passed to
the script "on-the-fly" while processing a test file. In addition, an
"on/off" switch was added so that processing can be disabled for parts
of the file where the content is simply copied. The last extension is a
record of the invocation arguments in the auto generated NOTE. These
arguments are also picked up in a subsequent invocation, allowing
updates with special options enabled without user interaction.

To change the arguments the string `UTC_ARGS:` has to be present in a
line, followed by "additional command line arguments". That is
everything that follows `UTC_ARGS:` will be added to a growing list
of "command line arguments" which is reparsed after every update.

Reviewed By: arichardson

Differential Revision: https://reviews.llvm.org/D69701
2020-02-11 16:29:46 -06:00
Reid Kleckner 2040831d05 [gn] Paper over Py3 urllib2 incompatibility in gn/get.py
Tested with both Python 2.7 and Python 3.7.

Reviewed By: thakis

Differential Revision: https://reviews.llvm.org/D73234
2020-02-11 11:39:16 -08:00
LLVM GN Syncbot 9220bbc909 [gn build] Port 453a8f3af7 2020-02-11 19:14:15 +00:00
Peter Collingbourne 76d6bce629 gn build: Make scudo cflags more consistent with the cmake build. 2020-02-11 10:05:48 -08:00
Justin Lebar fb45968e62 Use C++14-style return type deduction in LLVM.
Summary:
Simplifies the C++11-style "-> decltype(...)" return-type deduction.

Note that you have to be careful about whether the function return type
is `auto` or `decltype(auto)`.  The difference is that bare `auto`
strips const and reference, just like lambda return type deduction.  In
some cases that's what we want (or more likely, we know that the return
type is a value type), but whenever we're wrapping a templated function
which might return a reference, we need to be sure that the return type
is decltype(auto).

No functional change.

Subscribers: dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74383
2020-02-11 07:38:42 -08:00
LLVM GN Syncbot f1ceda4bd5 [gn build] Port bb383ae612 2020-02-10 21:43:41 +00:00
Eric Christopher 102814b4d3 Continue removing llgo. 2020-02-10 10:33:58 -08:00
LLVM GN Syncbot 4b1df7356a [gn build] Port 0151ddc2e8 2020-02-10 15:56:57 +00:00
Bill Wendling c55cf4afa9 Revert "Remove redundant "std::move"s in return statements"
The build failed with

  error: call to deleted constructor of 'llvm::Error'

errors.

This reverts commit 1c2241a793.
2020-02-10 07:07:40 -08:00
Bill Wendling 1c2241a793 Remove redundant "std::move"s in return statements 2020-02-10 06:39:44 -08:00
Nico Weber 3dc47979bb [gn build] make 'clang' target depend on libcxx/include on mac
On macOS, libc++ headers are distributed with the compiler, not
the sysroot. Without this, compiling a file that includes something
like <string> won't compile with gn-built clang without manual tweaks.

I used to do the manual tweaks, but now that other people are starting
to use this on mac, let's make it Just Work.

(This is marginally nicer than the cmake build now in that you can
just build 'clang' and it'll do the right thing.)

Differential Revision: https://reviews.llvm.org/D74247
2020-02-10 07:43:42 -05:00
LLVM GN Syncbot 628462e30a [gn build] Port a17f03bd93 2020-02-09 15:41:05 +00:00
Nico Weber 8df173f399 [gn build] (manually) port 72277ecd62 and the LLVMBuild bit of 9548b74a83 2020-02-08 19:01:55 -05:00
Fangrui Song 280f15cb41 [gn build] Add OpenMPOpt.cpp to LLVMipo after D69930/9548b74a831e 2020-02-08 14:18:43 -08:00
LLVM GN Syncbot 1ea2723eb5 [gn build] Port 446268a223 2020-02-07 13:35:48 +00:00
LLVM GN Syncbot 4fb10be4b8 [gn build] Port b12176d2aa 2020-02-05 19:16:15 +00:00
LLVM GN Syncbot d2182d6c2c [gn build] Port fc62b36a00 2020-02-05 18:06:25 +00:00
LLVM GN Syncbot 622ef91b18 [gn build] Port b198f16e1e 2020-02-05 17:03:12 +00:00
LLVM GN Syncbot f722284cdf [gn build] Port b8a847c0a3 2020-02-05 01:27:20 +00:00
LLVM GN Syncbot 2406a06e67 [gn build] Port 7531a5039f 2020-02-05 01:27:19 +00:00
David Bozier 6e01cd6795 Improve error message of FileCheck when stdin is empty
Summary: Replace '-' in the error message with <stdin>. This is also consistent with another error message in the code.

Reviewers: jhenderson, probinson, jdenny, grimar, arichardson

Reviewed By: jhenderson

Subscribers: thopre, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D73793
2020-02-04 11:14:55 +00:00
Alex Richardson 1132f87fbf [update_cc_test_checks] Don't attach CHECK lines to function declarations
Previously we were adding the CHECK lines to both definitions and
declarations. Update the JSON AST dump parsing code to skip all
FunctionDecls without an "inner" node (i.e. no body).

Reviewed By: MaskRay, greened
Differential Revision: https://reviews.llvm.org/D73708
2020-02-04 08:41:26 +00:00
Hans Wennborg 1cc3db1a66 build_llvm_package.bat: Use a short form of the git revision 2020-02-03 16:40:10 +01:00
LLVM GN Syncbot 47f309d963 [gn build] Port c953409ff8 2020-02-03 05:24:55 +00:00
LLVM GN Syncbot 928090f5fe [gn build] Port a7bbe45a3e 2020-02-02 18:45:50 +00:00
Fangrui Song 9288bb8d20 [gn build] Delete stale AttributesCompatFunc after D72455/cfe87a4a16b73652dc06f9fa334137656991f13f 2020-02-02 10:07:05 -08:00
Tyker cfe87a4a16 [NFC] Refactor TableGen for attributes
Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes:  make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Reviewers: jdoerfert, thakis, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72455
2020-02-02 15:12:20 +01:00
Tyker 89d3b070c1 Revert "[NFC] Refactor TableGen for attributes"
This reverts commit 4dba14cf37.
2020-02-02 15:05:33 +01:00
Tyker 4dba14cf37 [NFC] Refactor TableGen for attributes
Summary:
this patch makes tablegen generate llvm attributes in a more generic and simpler (at least to me).

changes:  make tablegen generate
...
ATTRIBUTE_ENUM(Alignment,align)
ATTRIBUTE_ENUM(AllocSize,allocsize)
...
which can be used to generate most of what was previously used and more.

Tablegen was also generating attributes from 2 identical files leading to identical output. so I removed one of them and made user use the other.

Reviewers: jdoerfert, thakis, aaron.ballman

Reviewed By: aaron.ballman

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72455
2020-02-02 14:50:31 +01:00
Nico Weber fac4bd26c3 [gn build] unbreak mac build after 133a31cef6 2020-01-31 21:25:56 -05:00
Nico Weber 133a31cef6 [gn build] add asan runtime on linux and mac
This produces a seemingly-working dynamic (x64-only) asan dylib on macOS
and static libraries on Linux.

I've had this sitting in a branch for a long time and wanted to get
check-asan working before landing it, but smaller patches and fewer
local branches is probably better.
2020-01-31 21:23:43 -05:00
LLVM GN Syncbot bf8357d420 [gn build] Port 16a0313ee3 2020-01-31 09:18:27 +00:00
LLVM GN Syncbot 8bb9642fd7 [gn build] Port 601687bf73 2020-01-30 15:06:10 +00:00
Hans Wennborg ef465d0ad2 test-release.sh: Add MLIR to the projects list 2020-01-30 14:31:02 +01:00
LLVM GN Syncbot 13e28b6a9a [gn build] Port f00be8da62 2020-01-30 12:56:31 +00:00
Christian Sigg a03ec58da6 Add GDB pretty printers for llvm::ilist, llvm::simple_ilist, and llvm::ilist_node.
Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: merge_guards_bot, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72589
2020-01-30 09:35:49 +01:00
LLVM GN Syncbot f0654875fb [gn build] Port f2af060700 2020-01-30 01:35:57 +00:00
Nico Weber 442d8e7a91 [gn build] add a FIXME about using /Gw on win 2020-01-29 19:12:08 -05:00
LLVM GN Syncbot e8e6e13176 [gn build] Port 5ea83eef4d 2020-01-29 21:19:26 +00:00
LLVM GN Syncbot 363289b542 [gn build] Port 24962ced81 2020-01-29 21:06:15 +00:00
LLVM GN Syncbot df8f2774b6 [gn build] Port 9a08a3fab9 2020-01-29 15:15:45 +00:00
Benjamin Kramer 8b6320c79d Address implicit conversions detected by g++ 5 only. 2020-01-29 01:01:09 +01:00