Commit Graph

8349 Commits

Author SHA1 Message Date
LLVM GN Syncbot debd2dcd09 [gn build] Port e53a9d96e6 2020-01-22 04:19:38 +00:00
LLVM GN Syncbot 65a31a97b4 [gn build] Port fccd0da5ee 2020-01-21 13:36:16 +00:00
LLVM GN Syncbot 65f6ee618e [gn build] Port a80291ce10 2020-01-21 08:19:25 +00:00
LLVM GN Syncbot 0a71ac8494 [gn build] Port a42c3eb599 2020-01-20 17:09:12 +00:00
LLVM GN Syncbot 9ecfaad757 [gn build] Port 24b7b99b7d 2020-01-20 15:32:54 +00:00
Eric Astor 6ccebe0044 Fix build - removing legacy target reference. 2020-01-20 09:54:59 -05:00
Eric Astor 5f6dfa800e [ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc
As discussed on the mailing list, I plan to introduce an ml-compatible MASM assembler as part of providing more of the Windows build tools. This will be similar to llvm-mc, but with different command-line parameters.

This placeholder is purely a stripped-down version of llvm-mc; we'll eventually add support for the Microsoft-style command-line flags, and back it with a MASM parser.

Relanding this revision after fixing ARM-compatibility issues.

Reviewers: rnk, thakis, RKSimon

Reviewed By: thakis, RKSimon

Differential Revision: https://reviews.llvm.org/D72679
2020-01-20 09:19:10 -05:00
LLVM GN Syncbot 4612e48d2f [gn build] Port a0f50d7316 2020-01-19 14:54:02 +00:00
Eric Astor 0eeddf1ac5 Revert "[ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc"
This reverts commit 22af2cbefc, due to breakages on ARM platforms.
2020-01-18 09:51:40 -05:00
LLVM GN Syncbot 49dc3a9467 [gn build] Port d3db13af7e 2020-01-17 23:26:29 +00:00
Nico Weber 6afa0e88e3 [gn build] fix build after 22af2cbefc 2020-01-17 18:26:02 -05:00
Eric Astor 22af2cbefc [ms] [llvm-ml] Add placeholder for llvm-ml, based on llvm-mc
Summary:
As discussed on the mailing list, I plan to introduce an ml-compatible MASM assembler as part of providing more of the Windows build tools. This will be similar to llvm-mc, but with different command-line parameters.

This placeholder is purely a stripped-down version of llvm-mc; we'll eventually add support for the Microsoft-style command-line flags, and back it with a MASM parser.

Reviewers: rnk, thakis

Reviewed By: thakis

Subscribers: merge_guards_bot, mgorny, jfb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72679
2020-01-17 16:14:08 -05:00
LLVM GN Syncbot 73db4f6f11 [gn build] Port 42a0355816 2020-01-17 13:44:44 +00:00
Dmitri Gribenko 10b4aece52 Revert "Avoid creating an immutable map in the Automaton class."
This reverts commit 051d330314. It broke
buildbots, for example,
http://lab.llvm.org:8011/builders/clang-x86_64-debian-fast/builds/21908.
2020-01-17 10:20:36 +01:00
Hans Wennborg 0ab035ae50 Remove old Suversion release scripts 2020-01-17 09:35:34 +01:00
Marcello Maggioni 051d330314 Avoid creating an immutable map in the Automaton class.
Summary:
In the DFAPacketizer we copy the Transitions array
into a map in order to later access the transitions
based on a "Current State/Action" pair as a key.
This map lives in the Automaton object used by the DFAPacketizer.
It is never changed during the life of the object after
having been created during the creation of the Automaton
itself.

This map creation can make the creation of a DFAPacketizer
quite expensive if the target contains a considerable
amount of transition states.

Considering that TableGen already generates a
sorted list of transitions by State/Action pairs
we could just use that directly in our Automaton
and search entries with std::lower_bound instead of copying
it in a map and paying the execution time and memory cost.

Reviewers: jmolloy, ThomasRaoux

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72682
2020-01-16 18:44:20 -08:00
Nico Weber 1645f5e496 [gn build] replace llvm_allow_tardy_revision with llvm_append_vc_rev
Previously, the gn build would create VCSRevision.h / VCSVersion.h
files with some LLD_REVISION / LLVM_REVISION / CLANG_REVISION but
by default wouldn't add a dependency on .git/logs/HEAD so that
the step doesn't rerun after every branch switch or every pull.

That's bad for deterministic builds, and having --version print
some arbitrarily old revision isn't great either.

Instead, move to the model that the cmake build (now) uses fairly
consistently: If llvm_append_vc_rev is set, include the revision,
else don't.

Since the GN build is focused on developers, set llvm_append_vc_rev
to false instead of true by default (different from the cmake build),
so that things don't rebuild after every branch switch and every
pull.

While here, also remove some pre-monorepo code.

Differential Revision: https://reviews.llvm.org/D72859
2020-01-16 19:05:07 -05:00
LLVM GN Syncbot cbc63fbdc4 [gn build] Port d5c6b8407c 2020-01-16 21:35:08 +00:00
Matt Arsenault 03a592f18b TableGen/GlobalISel: Fix srcvalue inputs
Allow using srcvalue for discarding pattern inputs.
2020-01-16 13:49:43 -05:00
Nico Weber d51a15d86a [gn build] (manually) port bed7626f04 2020-01-16 13:19:39 -05:00
Nico Weber 5caa121295 [gn build] include revision information in lld --version output 2020-01-16 13:10:41 -05:00
LLVM GN Syncbot c29a9f64b7 [gn build] Port 6b35786649 2020-01-16 16:56:26 +00:00
Nico Weber 4b6d9ac392 Make lld cmake not compute commit revision twice
r354605 moved LLD to the unified revision handling introduced in
rL353268 / r352729 and removed uses of LLD_REPOSITORY_STRING and
LLD_REVISION_STRING.

After this change, we no longer compute the (now-unused) values
of these two variables.

Since this removes the only use of llvm/utils/GetRepositoryPath,
remove that too (it's redundant with the system added in r354605).

While here, also remove LLD_VERSION_MAJOR and LLD_VERSION_MINOR.
Their uses were removed in r285163.

Also remove LLD_VERSION from Version.inc which as far as I can
tell has been unused since the file was added in r219277.

No behavior change.

Differential Revision: https://reviews.llvm.org/D72803
2020-01-16 09:55:36 -05:00
LLVM GN Syncbot f8269bb072 [gn build] Port ed181efa17 2020-01-16 09:55:55 +00:00
LLVM GN Syncbot cc5efa213d [gn build] Port 8fdafb7dce 2020-01-16 04:13:31 +00:00
Nico Weber 527281a843 [gn build] re-run "gn format" with trunk gn 2020-01-15 13:37:38 -05:00
Nico Weber eadc28274b [gn build] add multi-line forcing comments in more places 2020-01-15 13:36:42 -05:00
Nico Weber aed52fd483 [gn build] make "gn format" comment slightly more concise 2020-01-15 13:36:42 -05:00
Nico Weber 082962dec8 [gn build] Reformat all build files
Ran `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format`.
The motivation is to reformat them with trunk gn again right after.
Trunk gn changed formatting of some single-element lists.
2020-01-15 12:59:45 -05:00
Nico Weber 252c4dce61 [gn build] find mistakes like the one fixed in 72b5989e0d at build time 2020-01-15 10:05:41 -05:00
Nico Weber 72b5989e0d [gn build] (manually) port b4a99a061f better 2020-01-15 09:49:56 -05:00
Matt Arsenault 8931fde869 TableGen: Delete some copy constuctors
Some register related machinery relies on uniqued, static pointers for
register classes and subregisters, so try to make sure these are never
copied.
2020-01-15 08:58:57 -05:00
Matt Arsenault eafa8dbefe TableGen/GlobalISel: Don't take reference to temporary values
These return temporary Optional<> values which are immediately
destroyed. I'm not sure why no sanitizers seem to have caught this,
but I encountered crashes on these in a future patch.
2020-01-15 08:58:57 -05:00
Matt Arsenault 3ab7b7f535 TableGen/GlobalISel: Don't reconstruct CodeGenRegBank
The maps for dealing with the relationships between different register
classes and subregister indexes rely on unique pointers for every
class/index. By constructing a second copy of CodeGenRegBank, two
different pointer values existed for a given subregister depending on
where you were querying.

Use the existing CodeGenRegBank owned by the CodeGenTarget instead of
constructing a second copy. This avoids incorrectly failing map
lookups in a future change.
2020-01-15 08:58:57 -05:00
Djordje Todorovic 3b8ef7876e [llvm-locstats] Add the --compare option
Draw a plot showing the difference in debug loc coverage on two
files provided.

Differential Revision: https://reviews.llvm.org/D71870
2020-01-15 14:35:29 +01:00
Hans Wennborg 5852475e2c Bump the trunk major version to 11
and clear the release notes.
2020-01-15 13:38:01 +01:00
Djordje Todorovic ada964661e [llvm-locstats] Add the --draw-plot option
When using the option, draw the histogram representing the debug
location buckets. The resulting histogram will be saved in a png
file.

Differential Revision: https://reviews.llvm.org/D71869
2020-01-15 12:00:43 +01:00
Djordje Todorovic a3ebc40644 [llvm-locstats][NFC] Support OOP concept
Making these changes, the code becomes more robust and easier for
adding the new features.

  -Introduce the LocationStats class representing the statistics
  -Add the pretty_print() method in the LocationStats class
  -Add additional '-' for the program options
  -Add the verify_program_inputs() function
  -Add the parse_locstats() function
  -Rename 'results' => 'opts'
  -Add more comments

Differential Revision: https://reviews.llvm.org/D71868
2020-01-15 11:41:09 +01:00
LLVM GN Syncbot 4b1d471fa6 [gn build] Port 0dc6c249bf 2020-01-15 09:58:27 +00:00
Tom Stellard 0dbcb36394 CMake: Make most target symbols hidden by default
Summary:
For builds with LLVM_BUILD_LLVM_DYLIB=ON and BUILD_SHARED_LIBS=OFF
this change makes all symbols in the target specific libraries hidden
by default.

A new macro called LLVM_EXTERNAL_VISIBILITY has been added to mark symbols in these
libraries public, which is mainly needed for the definitions of the
LLVMInitialize* functions.

This patch reduces the number of public symbols in libLLVM.so by about
25%.  This should improve load times for the dynamic library and also
make abi checker tools, like abidiff require less memory when analyzing
libLLVM.so

One side-effect of this change is that for builds with
LLVM_BUILD_LLVM_DYLIB=ON and LLVM_LINK_LLVM_DYLIB=ON some unittests that
access symbols that are no longer public will need to be statically linked.

Before and after public symbol counts (using gcc 8.2.1, ld.bfd 2.31.1):
nm before/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
36221
nm after/libLLVM-9svn.so | grep ' [A-Zuvw] ' | wc -l
26278

Reviewers: chandlerc, beanz, mgorny, rnk, hans

Reviewed By: rnk, hans

Subscribers: merge_guards_bot, luismarques, smeenai, ldionne, lenary, s.egerton, pzheng, sameer.abuasal, MaskRay, wuzish, echristo, Jim, hiraditya, michaelplatings, chapuni, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, javed.absar, sbc100, jgravelle-google, aheejin, kbarton, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, zzheng, edward-jones, mgrang, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, kristina, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D54439
2020-01-14 19:46:52 -08:00
LLVM GN Syncbot 527f5a471e [gn build] Port 36fcbb838c 2020-01-14 19:06:58 +00:00
Simon Tatham e3ed63e83a [TableGen] Update editor modes for new keywords.
Summary:
D71407 and D71474 added new keywords to the Tablegen language:
`defvar`, `if`, `then` and `else`. This commit updates the various
editor modes to highlight them appropriately.

Some of the modes also didn't include `defset`, so I've added that too
while I was there.

Reviewers: MaskRay, lebedev.ri, plotfi

Reviewed By: lebedev.ri

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72693
2020-01-14 13:39:00 +00:00
Nico Weber 2b530053e9 [gn build] (manually) port b4a99a061f 2020-01-13 14:13:35 -05:00
Fangrui Song 60cc095ecc [X86][Disassembler] Merge X86DisassemblerDecoder.cpp into X86Disassembler.cpp and refactor 2020-01-12 00:53:36 -08:00
Fangrui Song f719c540bb [X86][Disassembler] Shrink X86GenDisassemblerTables.inc from 36M to 6.1M
In x86Disassembler{OneByte,TwoByte,...}Codes,
"/* EmptyTable */" is very common. Omitting it saves lots of space.
Also, there is no need to display a table entry in multiple lines.

It is also common that the whole OpcodeDecision is { MODRM_ONEENTRY, 0}.
Make use of zero-initialization.
2020-01-11 17:28:22 -08:00
Vedant Kumar a9052b4dfc [AArch64] Add isAuthenticated predicate to MCInstDesc
Add a predicate to MCInstDesc that allows tools to determine whether an
instruction authenticates a pointer. This can be used by diagnostic
tools to hint at pointer authentication failures.

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

rdar://55089604
2020-01-10 14:30:52 -08:00
LLVM GN Syncbot 504b3fe5bf [gn build] Port 5e7beb0a41 2020-01-10 17:10:25 +00:00
Matt Arsenault 10edb1d0d4 TableGen/GlobalISel: Fix pattern matching of immarg literals
For arguments that are not expected to be materialized with
G_CONSTANT, this was emitting predicates which could never match. It
was first adding a meaningless LLT check, which would always fail due
to the operand not being a register.

Infer the cases where a literal should check for an immediate operand,
instead of a register This avoids needing to invent a special way of
representing timm literal values.

Also handle immediate arguments in GIM_CheckLiteralInt. The comments
stated it handled isImm() and isCImm(), but that wasn't really true.

This unblocks work on the selection of all of the complicated AMDGPU
intrinsics in future commits.
2020-01-09 17:37:52 -05:00
Matt Arsenault b4a647449f TableGen/GlobalISel: Add way for SDNodeXForm to work on timm
The current implementation assumes there is an instruction associated
with the transform, but this is not the case for
timm/TargetConstant/immarg values. These transforms should directly
operate on a specific MachineOperand in the source
instruction. TableGen would assert if you attempted to define an
equivalent GISDNodeXFormEquiv using timm when it failed to find the
instruction matcher.

Specially recognize SDNodeXForms on timm, and pass the operand index
to the render function.

Ideally this would be a separate render function type that looks like
void renderFoo(MachineInstrBuilder, const MachineOperand&), but this
proved to be somewhat mechanically painful. Add an optional operand
index which will only be passed if the transform should only look at
the one source operand.

Theoretically it would also be possible to only ever pass the
MachineOperand, and the existing renderers would check the parent. I
think that would be somewhat ugly for the standard usage which may
want to inspect other operands, and I also think MachineOperand should
eventually not carry a pointer to the parent instruction.

Use it in one sample pattern. This isn't a great example, since the
transform exists to satisfy DAG type constraints. This could also be
avoided by just changing the MachineInstr's arbitrary choice of
operand type from i16 to i32. Other patterns have nontrivial uses, but
this serves as the simplest example.

One flaw this still has is if you try to use an SDNodeXForm defined
for imm, but the source pattern uses timm, you still see the "Failed
to lookup instruction" assert. However, there is now a way to avoid
it.
2020-01-09 17:37:52 -05:00
Christian Sigg 0f5f28d000 Add gdb pretty printer for MutableArrayRef, remove ConstArrayRef.
Reviewers: dblaikie

Reviewed By: dblaikie

Subscribers: merge_guards_bot, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72136
2020-01-09 22:43:45 +01:00