1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
Commit Graph

10301 Commits

Author SHA1 Message Date
LLVM GN Syncbot
9865f77f6d [gn build] Port b9c3941cd61d 2021-07-15 01:12:36 +00:00
Djordje Todorovic
c793732c01 [RemoveRedundantDebugValues] Add a Pass that removes redundant DBG_VALUEs
This new MIR pass removes redundant DBG_VALUEs.

After the register allocator is done, more precisely, after
the Virtual Register Rewriter, we end up having duplicated
DBG_VALUEs, since some virtual registers are being rewritten
into the same physical register as some of existing DBG_VALUEs.
Each DBG_VALUE should indicate (at least before the LiveDebugValues)
variables assignment, but it is being clobbered for function
parameters during the SelectionDAG since it generates new DBG_VALUEs
after COPY instructions, even though the parameter has no assignment.
For example, if we had a DBG_VALUE $regX as an entry debug value
representing the parameter, and a COPY and after the COPY,
DBG_VALUE $virt_reg, and after the virtregrewrite the $virt_reg gets
rewritten into $regX, we'd end up having redundant DBG_VALUE.

This breaks the definition of the DBG_VALUE since some analysis passes
might be built on top of that premise..., and this patch tries to fix
the MIR with the respect to that.

This first patch performs bacward scan, by trying to detect a sequence of
consecutive DBG_VALUEs, and to remove all DBG_VALUEs describing one
variable but the last one:

For example:

(1) DBG_VALUE $edi, !"var1", ...
(2) DBG_VALUE $esi, !"var2", ...
(3) DBG_VALUE $edi, !"var1", ...
 ...

in this case, we can remove (1).

By combining the forward scan that will be introduced in the next patch
(from this stack), by inspecting the statistics, the RemoveRedundantDebugValues
removes 15032 instructions by using gdb-7.11 as a testbed.

Differential Revision: https://reviews.llvm.org/D105279
2021-07-14 04:29:42 -07:00
LLVM GN Syncbot
b00ffab852 [gn build] Port c08dabb0f476 2021-07-14 10:49:08 +00:00
Nico Weber
0eb0133948 [gn build] (manually) merge 462d4de35b0c 2021-07-14 06:43:23 -04:00
Nico Weber
fa89c8064f [gn build] (manually) port 303ddb60a2d2 2021-07-13 15:15:38 -04:00
Nikita Popov
495f2550b0 [Attributes] Determine attribute properties from TableGen data
Continuing from D105763, this allows placing certain properties
about attributes in the TableGen definition. In particular, we
store whether an attribute applies to fn/param/ret (or a combination
thereof). This information is used by the Verifier, as well as the
ForceFunctionAttrs pass. I also plan to use this in LLParser,
which also duplicates info on which attributes are valid where.

This keeps metadata about attributes in one place, and makes it
more likely that it stays in sync, rather than in various
functions spread across the codebase.

Differential Revision: https://reviews.llvm.org/D105780
2021-07-12 22:13:38 +02:00
Nikita Popov
28e27a194e [Attributes] Make type attribute handling more generic (NFCI)
Followup to D105658 to make AttrBuilder automatically work with
new type attributes. TableGen is tweaked to emit First/LastTypeAttr
markers, based on which we can handle type attributes
programmatically.

Differential Revision: https://reviews.llvm.org/D105763
2021-07-12 20:49:38 +02:00
Fangrui Song
601cf9f2c4 [llvm-readobj] Switch command line parsing from llvm::cl to OptTable
Users should generally observe no difference as long as they don't use
unintended option forms. Behavior changes:

* `-t=d` is removed. Use `-t d` instead.
* `--demangle=false` and `--demangle=0` cannot be used. Omit the option or use `--no-demangle`. Other flag-style options don't have `--no-` forms.
* `--help-list` is removed. This is a `cl::` specific option.
* llvm-readobj now supports grouped short options as well.
* `--color` is removed. This is generally not useful (only apply to errors/warnings) but was inherited from Support.

Some adjustment to the canonical forms
(usually from GNU readelf; currently llvm-readobj has too many redundant aliases):

* --dyn-syms is canonical. --dyn-symbols is a hidden alias
* --file-header is canonical. --file-headers is a hidden alias
* --histogram is canonical. --elf-hash-histogram is a hidden alias
* --relocs is canonical. --relocations is a hidden alias
* --section-groups is canonical. --elf-section-groups is a hidden alias

OptTable avoids global option collision if we decide to support multiplexing for binary utilities.

* Most one-dash long options are still supported. `-dt, -sd, -st, -sr` are dropped due to their conflict with grouped short options.
* `--section-mapping=false` (D57365) is strange but is kept for now.
* Many `cl::opt` variables were unnecessarily external. I added `static` whenever appropriate.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105532
2021-07-12 10:14:42 -07:00
Nico Weber
6e8807b3fb [gn build] port 0da172b1766e more 2021-07-12 08:50:18 -04:00
Nico Weber
a7f8451294 [gn build] (semi-manually) port 0da172b1766e 2021-07-12 08:15:59 -04:00
Nico Weber
fb62f3051e [gn build] fix formatting after 9647a6f719ee 2021-07-09 19:04:46 -04:00
Wouter van Oortmerssen
538b137e0b [WebAssembly] Added initial type checker to MC Assembler
This to protect against non-sensical instruction sequences being assembled,
which would either cause asserts/crashes further down, or a Wasm module being output that doesn't validate.

Unlike a validator, this type checker is able to give type-errors as part of the parsing process, which makes the assembler much friendlier to be used by humans writing manual input.

Because the MC system is single pass (instructions aren't even stored in MC format, they are directly output) the type checker has to be single pass as well, which means that from now on .globaltype and .functype decls must come before their use. An extra pass is added to Codegen to collect information for this purpose, since AsmPrinter is normally single pass / streaming as well, and would otherwise generate this information on the fly.

A `-no-type-check` flag was added to llvm-mc (and any other tools that take asm input) that surpresses type errors, as a quick escape hatch for tests that were not intended to be type correct.

This is a first version of the type checker that ignores control flow, i.e. it checks that types are correct along the linear path, but not the branch path. This will still catch most errors. Branch checking could be added in the future.

Differential Revision: https://reviews.llvm.org/D104945
2021-07-09 14:07:25 -07:00
David Blaikie
6212b5a386 PR51018: A few more explicit conversions from SmallString to StringRef
Follow-up to 1def2579e10dd84405465f403e8c31acebff0c97 with a few more
obscure cases.
2021-07-09 13:54:02 -07:00
Fangrui Song
c63038b191 [llvm-size] Switch command line parsing from llvm::cl to OptTable
Part of https://lists.llvm.org/pipermail/llvm-dev/2021-July/151622.html
"Binary utilities: switch command line parsing from llvm::cl to OptTable"

* `--totals=false` and `--totals=0` cannot be used. Omit the option.
* `--help-list` is removed. This is a `cl::` specific option.

OptTable avoids global option collision if we decide to support multiplexing for binary utilities.

Note: because the tool is simple, and its long options are uncommon, I just drop
the one-dash forms except `-arch <value>` (Darwin style).

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105598
2021-07-09 10:26:53 -07:00
LLVM GN Syncbot
bb1eadd237 [gn build] Port 0e09a41b415b 2021-07-09 17:14:37 +00:00
Fangrui Song
6c0a5fae66 [llvm-cxxfilt] Switch command line parsing from llvm::cl to OptTable
Similar to D104889. The tool is very simple and its long options are uncommon,
so just drop the one-dash form in this patch.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105605
2021-07-09 10:10:45 -07:00
Nico Weber
312c986138 Revert "Revert "Temporarily do not drop volatile stores before unreachable""
This reverts commit 52aeacfbf5ce5f949efe0eae029e56db171ea1f7.
There isn't full agreement on a path forward yet, but there is agreement that
this shouldn't land as-is.  See discussion on https://reviews.llvm.org/D105338

Also reverts unreviewed "[clang] Improve `-Wnull-dereference` diag to be more in-line with reality"
This reverts commit f4877c78c0fc98be47b926439bbfe33d5e1d1b6d.

And all the related changes to tests:
This reverts commit 9a0152799f8e4a59e0483728c9f11c8a7805616f.
This reverts commit 3f7c9cc27422f7302cf5a683eeb3978e6cb84270.
This reverts commit 329f8197ef59f9bd23328b52d623ba768b51dbb2.
This reverts commit aa9f58cc2c48ca6cfc853a2467cd775dc7622746.
This reverts commit 2df37d5ddd38091aafbb7d338660e58836f4ac80.
This reverts commit a72a44181264fd83e05be958c2712cbd4560aba7.
2021-07-09 11:44:34 -04:00
Roman Lebedev
a95e1221a9 Speculatively adjust gtest's UnitTest::AddTestPartResult() to not rely on volatile store to null trapping
This fallback path is used at least on PPC.
If this doesn't work on some compilers that take this path,
then this will have to be changed to either abort,
or partitioned to do different things based on the compiler.

Please refer to https://reviews.llvm.org/D105338.
2021-07-09 13:32:18 +03:00
LLVM GN Syncbot
a3b5c3bb94 [gn build] Port 321c2ea91cb1 2021-07-08 15:35:54 +00:00
Nico Weber
11944c0204 [gn build] (manually) port ef16c8eaa5cd5679759 (MCACustomBehaviorAMDGPU) 2021-07-07 21:59:07 -04:00
Nico Weber
cde6b35842 [gn build] (semi-manually) port 966386514bec 2021-07-07 19:27:19 -04:00
George Burgess IV
6032fd6068 utils: add a revert checker
Chrome OS and Android have found it useful to have an automated revert
checker. It was requested to upstream it, since other folks in the LLVM
community may also find value in it.

The tests depend on having a full (non-shallow) checkout of LLVM. This
seems reasonable to me, since:

- the tests should only be run if the user is developing on this script
- it's kind of hard to develop on this script without local git history
  :)

If people really want, the tests' dependency on LLVM's history can be
removed. It's mostly just effort/complexity that doesn't seem necessary.

Differential Revision: https://reviews.llvm.org/D105578
2021-07-07 14:20:01 -07:00
Fangrui Song
3586ecfc1a [llvm-nm] Switch command line parsing from llvm::cl to OptTable
Part of https://lists.llvm.org/pipermail/llvm-dev/2021-July/151622.html
"Binary utilities: switch command line parsing from llvm::cl to OptTable"

Users should generally observe no difference as long as they only use intended
option forms. Behavior changes:

* `-t=d` is removed. Use `-t d` instead.
* `--demangle=0` cannot be used. Omit the option or use `--no-demangle` instead.
* `--help-list` is removed. This is a `cl::` specific option.

Note:

* `-t` diagnostic gets improved.
* This patch avoids cl::opt collision if we decide to support multiplexing for binary utilities
* One-dash long options are still supported.
* The `-s` collision (`-s segment section` for Mach-O) is unfortunate. `-s` means `--print-armap` in GNU nm.
* This patch removes the last `cl::multi_val` use case from the `llvm/lib/Support/CommandLine.cpp` library

`-M` (`--print-armap`), `-U` (`--defined-only`), and `-W` (`--no-weak`)
are now deprecated. They could conflict with future GNU nm options.
(--print-armap has an existing alias -s, so GNU will unlikely add a new one.
--no-weak (not in GNU nm) is rarely used anyway.)

`--just-symbol-name` is now deprecated in favor of
`--format=just-symbols` and `-j`.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D105330
2021-07-07 13:34:33 -07:00
LLVM GN Syncbot
a67e94b8ca [gn build] Port 6829db727e9e 2021-07-07 10:14:59 +00:00
LLVM GN Syncbot
7ae669846a [gn build] Port 8517a26d442f 2021-07-06 18:17:43 +00:00
Nico Weber
27befb62e0 [gn build] (manually) port 98f078324fc5 (llvm-strings Opts.td) 2021-07-05 14:43:05 -04:00
LLVM GN Syncbot
15c9cd07da [gn build] Port 99f00635d7ac 2021-07-02 17:03:49 +00:00
LLVM GN Syncbot
18f6051a4c [gn build] Port bf64210fd88f 2021-07-02 16:12:54 +00:00
Sam McCall
f01feb00be Revert "[clangd] Unbreak mac build differently 0c96a92d8666b8"
This reverts commit 2f79acb7b701c41494abff588b5f03a74ea2e11d.

Should no longer be needed after 26e1553a107f52667be879e99739a4153f8799d8
2021-07-02 16:29:48 +02:00
LLVM GN Syncbot
62f1d32559 [gn build] Port a92964779cb5 2021-07-02 13:05:44 +00:00
LLVM GN Syncbot
a3a9d61236 [gn build] Port 33a7b4d9d8e6 2021-07-01 22:26:09 +00:00
Joel E. Denny
4a1757d821 [lit] Extend --xfail/LIT_XFAIL to take full test name
The new documentation entry gives an example use case from
libomptarget.

Reviewed By: yln, jhenderson, davezarzycki

Differential Revision: https://reviews.llvm.org/D105208
2021-07-01 15:46:37 -04:00
Nico Weber
856c1b08d5 [gn build] Port 050b064f15ee 2021-07-01 14:52:21 -04:00
Nico Weber
394ac62585 [clangd] Unbreak mac build differently 0c96a92d8666b8
This reverts b56e5f8a10c1 (and follow-up f6db88535cb) and instead
restores the state we had before 0c96a92d8666b8: ClangdMain.cpp
includes Features.inc before including Transport.h.

This is a bit ugly, but it matches the former state and making Transport.h
include Features.h means that xpc/ needs to be able to find the generated
Features.inc, wich is also a bit ugly.
2021-07-01 10:51:27 -04:00
LLVM GN Syncbot
81673f2df8 [gn build] Port 39f64c4c8375 2021-07-01 08:31:00 +00:00
LLVM GN Syncbot
4a2c6265d9 [gn build] Port 28b01c59c93d 2021-07-01 04:00:13 +00:00
LLVM GN Syncbot
d69d14b00d [gn build] Port 662c55442f17 2021-07-01 03:45:41 +00:00
LLVM GN Syncbot
a277ada21c [gn build] Port 381ded345bdd 2021-06-30 18:49:16 +00:00
Nico Weber
c59b205c9c [gn build] (manually) port f617ab104451 (DoublerPlugin) 2021-06-30 14:49:06 -04:00
Nico Weber
f604789ef5 [gn build] add dep needed after b56e5f8a10c1e 2021-06-30 12:58:59 -04:00
LLVM GN Syncbot
4addd52a45 [gn build] Port 0c96a92d8666 2021-06-30 15:57:43 +00:00
Louis Dionne
6766b6d75d [lit] Add the ability to parse regexes in Lit boolean expressions
This patch augments Lit with the ability to parse regular expressions
in boolean expressions. This includes REQUIRES:, XFAIL:, UNSUPPORTED:,
and all other special Lit markup that evaluates to a boolean expression.

Regular expressions can be specified by enclosing them in {{...}},
similarly to how FileCheck handles such regular expressions. The regular
expression can either be on its own, or it can be part of an identifier.
For example, a match expression like {{.+}}-apple-darwin{{.+}} would match
the following variables:

     x86_64-apple-darwin20.0
     arm64-apple-darwin20.0
     arm64-apple-darwin22.0
     etc...

In the long term, this could be used to remove the need to handle the
target triple specially when parsing boolean expressions.

Differential Revision: https://reviews.llvm.org/D104572
2021-06-30 10:52:16 -04:00
Jay Foad
558e354c8d [TableGen] Allow identical MnemonicAliases with no predicate
My use case for this is illustrated in the test case: I want to define
the same instruction twice with different (disjoint) predicates, because
the instruction has different operands on different subtargets. It's
convenient to do this with a multiclass that also defines an alias for
the instruction.

Previously tablegen would complain if this alias was defined twice with
no predicate. One way to fix this would be to add a predicate on each
definition of the alias, matching the predicate on the instruction. But
this (a) is slightly awkward to do in the real world use case I had, and
(b) leads to an inefficient matcher that will do something like this:

  if (Mnemonic == "foo_alias") {
    if (Features.test(Feature_Subtarget1Bit))
      Mnemonic == "foo";
    else if (Features.test(Feature_Subtarget2Bit))
      Mnemonic == "foo";
    return;
  }

It would be more efficient to skip the feature tests and return "foo"
unconditionally.

Overall it seems better to allow multiple definitions of the identical
alias with no predicate.

Differential Revision: https://reviews.llvm.org/D105033
2021-06-30 10:53:39 +01:00
LLVM GN Syncbot
93f53bac4a [gn build] Port d03aa7d6b66f 2021-06-29 15:41:00 +00:00
LLVM GN Syncbot
9bb30676fd [gn build] Port 9b02a9b40150 2021-06-29 09:44:27 +00:00
LLVM GN Syncbot
c68d0345e7 [gn build] Port 159024ce2315 2021-06-29 09:44:26 +00:00
LLVM GN Syncbot
8356e90c32 [gn build] Port f32f3db9fcbf 2021-06-28 16:30:29 +00:00
Sander de Smalen
a82143ea32 Reland [GlobalISel] NFC: Have LLT::getSizeInBits/Bytes return a TypeSize.
This patch relands https://reviews.llvm.org/D104454, but fixes some failing
builds on Mac OS which apparently has a different definition for size_t,
that caused 'ambiguous operator overload' for the implicit conversion
of TypeSize to a scalar value.

This reverts commit b732e6c9a8438e5204ac96c8ca76f9b11abf98ff.
2021-06-28 15:24:27 +01:00
LLVM GN Syncbot
39ed7fe00e [gn build] Port 499e39c5983d 2021-06-28 08:50:56 +00:00
LLVM GN Syncbot
4d0d5cf124 [gn build] Port 8b7881a084d0 2021-06-26 14:20:52 +00:00
LLVM GN Syncbot
769467b21f [gn build] Port aff57ff24aca 2021-06-26 11:38:00 +00:00
Joel E. Denny
6ae82bea96 [UpdateCCTestChecks] Support --check-globals
This option is already supported by update_test_checks.py, but it can
also be useful in update_cc_test_checks.py.  For example, I'd like to
use it in OpenMP offload codegen tests to check global variables like
`.offload_maptypes*`.

Reviewed By: jdoerfert, arichardson, ggeorgakoudis

Differential Revision: https://reviews.llvm.org/D104714
2021-06-25 13:17:56 -04:00
Sander de Smalen
4d07cbe876 Revert "[GlobalISel] NFC: Have LLT::getSizeInBits/Bytes return a TypeSize."
This patch seems to be causing build errors, reverting it for now.

This reverts commit aeab9d9570ac8cb554aff6e1af24a471fdf5b4e5.
2021-06-25 17:37:16 +01:00
Sander de Smalen
9d34fb6e49 [GlobalISel] NFC: Have LLT::getSizeInBits/Bytes return a TypeSize.
To reflect that the size may be scalable, a TypeSize is returned
instead of an unsigned. In places where the result is used,
it currently relies on an implicit cast of TypeSize -> uint64_t,
which asserts that the type is not scalable.

This patch is NFC for fixed-width vectors.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D104454
2021-06-25 17:06:50 +01:00
LLVM GN Syncbot
8f1d8367e8 [gn build] Port 69d5a6662115 2021-06-25 00:29:34 +00:00
Martin Storsjö
9d14adb9f6 [llvm] Rename StringRef _lower() method calls to _insensitive()
This is a mechanical change. This actually also renames the
similarly named methods in the SmallString class, however these
methods don't seem to be used outside of the llvm subproject, so
this doesn't break building of the rest of the monorepo.
2021-06-25 00:22:01 +03:00
LLVM GN Syncbot
0394084380 [gn build] Port 6adbc83ee9e4 2021-06-24 18:02:44 +00:00
Nico Weber
15adc02ee3 [gn build] Fix a comment typo and a comment copy-pasto 2021-06-24 11:06:48 -04:00
Nico Weber
64fb2ced44 [gn build] Remove an unneeded -I flag
Everything includes clang/Config/config.h by qualified "clang/Config/config.h"
path, so there's no need for `-Igen/clang/include/clang/Config/clang/include`.

No behavior change.
2021-06-24 10:18:49 -04:00
Sander de Smalen
ac11cfc716 [GlobalISel] NFC: Change LLT::vector to take ElementCount.
This also adds new interfaces for the fixed- and scalable case:
* LLT::fixed_vector
* LLT::scalable_vector

The strategy for migrating to the new interfaces was as follows:
* If the new LLT is a (modified) clone of another LLT, taking the
  same number of elements, then use LLT::vector(OtherTy.getElementCount())
  or if the number of elements is halfed/doubled, it uses .divideCoefficientBy(2)
  or operator*. That is because there is no reason to specifically restrict
  the types to 'fixed_vector'.
* If the algorithm works on the number of elements (as unsigned), then
  just use fixed_vector. This will need to be fixed up in the future when
  modifying the algorithm to also work for scalable vectors, and will need
  then need additional tests to confirm the behaviour works the same for
  scalable vectors.
* If the test used the '/*Scalable=*/true` flag of LLT::vector, then
  this is replaced by LLT::scalable_vector.

Reviewed By: aemerson

Differential Revision: https://reviews.llvm.org/D104451
2021-06-24 11:26:12 +01:00
Carl Ritson
e6a4177023 [ValueTypes] Define MVTs for v3i64/v3f64 to complement v6i32/v6f32
Having type symmetry with these is somewhat necessary when implementing support for 192-bit values.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D104621
2021-06-24 12:41:22 +09:00
Peter Collingbourne
1f2c61f362 gn build: Build ubsan_minimal on Android. 2021-06-23 19:25:21 -07:00
Andrew Litteken
6cfd76633f [IRSim] Adding basic implementation of llvm-sim.
This is a similarity visualization tool that accepts a Module and
passes it to the IRSimilarityIdentifier.  The resulting SimilarityGroups
are output in a JSON file.

Tests are found in test/tools/llvm-sim and check for the file not found,
a bad module, and that the JSON is created correctly.

Reviewers: paquette, jroelofs, MaskRay

Recommit of: 15645d044bcfe2a0f63156048b302f997a717688 to fix linking
errors and GN build system.

Differential Revision: https://reviews.llvm.org/D86974
2021-06-23 14:38:58 -05:00
LLVM GN Syncbot
5b75cf9bf8 [gn build] Port 560170fa2de5 2021-06-23 17:11:10 +00:00
Joel E. Denny
c4a535aaff [UpdateCCTestChecks][NFC] Permit other comments in common.py
Some parts of common.py already permit comment styles besides `;`.
Handle the remaining cases.  Specifically, a future patch will extend
update_cc_test_checks.py to call add_global_checks.

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D104713
2021-06-23 11:12:42 -04:00
Roman Lebedev
3b18af59bd [NFC][ARM] Fix update_llc_test_checks for thumbv7-apple-darwin, autogenerate thumb2-ifcvt1.ll 2021-06-23 16:31:19 +03:00
Roman Lebedev
033b3a9ef6 [NFC][ARM] Fix update_llc_test_checks for aarch64-apple-ios/thumbv7s-apple-darwin, autogenerate a few tests 2021-06-23 16:31:19 +03:00
Roman Lebedev
4e033a7fbd [NFC][ARM] Fix update_llc_test_checks for thumbv7-apple-ios, autogenerate switch-minsize.ll 2021-06-23 16:31:19 +03:00
Roman Lebedev
06e1305748 [NFC][ARM] Fix update_llc_test_checks for armv7-apple-ios, autogenerate ifcvt5.ll/ifcvt6.ll 2021-06-23 16:31:19 +03:00
Igor Kudrin
dc6a85256b [TableGen] Fix printing second PC-relative operand
If an instruction has several operands and a PC-relative one is not the
first of them, the generator may produce the code that does not pass the
'Address' parameter to the printout method. For example, for an Arm
instruction 'LE LR, $imm', it reuses the same code as for other
instructions where the second operand is not PC-relative:

void ARMInstPrinter::printInstruction(...) {
...
  case 11:
    // BF16VDOTI_VDOTD, BF16VDOTI_VDOTQ, BF16VDOTS_VDOTD, ...
    printOperand(MI, 1, STI, O);
    O << ", ";
    printOperand(MI, 2, STI, O);
    break;
...

The patch fixes that by considering 'PCRel' when comparing
'AsmWriterOperand' values.

Differential Revision: https://reviews.llvm.org/D104698
2021-06-23 13:27:37 +07:00
Nico Weber
d6577233fa [gn build] don't build ubsan_minimal on mac
It doesn't build there, see http://45.33.8.238/macm1/12180/step_4.txt
2021-06-22 22:21:20 -04:00
Peter Collingbourne
48ca0247f9 gn build: Only build the TSan runtime on 64-bit platforms.
TSan only supports 64-bit platforms.

Differential Revision: https://reviews.llvm.org/D104755
2021-06-22 17:51:00 -07:00
Peter Collingbourne
5b5b35d51b gn build: Add support for building ubsan_minimal.
Differential Revision: https://reviews.llvm.org/D104754
2021-06-22 17:51:00 -07:00
Peter Collingbourne
458d10ff3a gn build: Rebase clang-tblgen include path against root_build_dir instead of root_out_dir.
Fixes clang cross-compilation.

Also remove some redundant include path arguments.
2021-06-22 14:32:24 -07:00
Nico Weber
fe6edd20fe [gn build] manually port c747b7d1d9a2 more (config.osx_sysroot) 2021-06-22 15:33:52 -04:00
LLVM GN Syncbot
1bf34b2165 [gn build] Port 40d6d2c49dd1 2021-06-22 17:03:46 +00:00
Nico Weber
afac7e2fd3 [gn build] manually port c747b7d1d9a2 (config.osx_sysroot) 2021-06-22 12:50:58 -04:00
Fraser Cormack
a876d5dd7e [Utils][vim] Add missing highlights for fast-math flags
This patch adds the `afn`, `contract`, and `reassoc` fast-math flags.

It also fixes up `fneg`'s order in the alphabetized list.

Reviewed By: MaskRay, craig.topper

Differential Revision: https://reviews.llvm.org/D104541
2021-06-22 09:39:15 +01:00
Sander de Smalen
fd053d5ffe [GlobalISel] Add scalable property to LLT types.
This patch aims to add the scalable property to LLT. The rest of the
patch-series changes the interfaces to take/return ElementCount and
TypeSize, which both have the ability to represent the scalable property.

The changes are mostly mechanical and aim to be non-functional changes
for fixed-width vectors.

For scalable vectors some unit tests have been added, but no effort has
been put into making any of the GlobalISel algorithms work with scalable
vectors yet. That will be left as future work.

The work is split into a series of 5 patches to make reviews easier.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D104450
2021-06-22 08:43:34 +01:00
Joel E. Denny
43ea08452a [UpdateCCTestChecks] Fix --replace-value-regex across RUN lines
Without this patch, llvm/utils/update_cc_test_checks.py fails to
perform `--replace-value-regex` replacements when two RUN lines
produce the same output and use the same single FileCheck prefix.  The
problem is that replacements in a RUN line's output are not performed
until after comparing against previous RUN lines' output, where
replacements have already been performed.  This patch fixes that.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D104566
2021-06-21 17:01:17 -04:00
LLVM GN Syncbot
150a090f84 [gn build] Port 208332de8abf 2021-06-21 07:27:34 +00:00
LLVM GN Syncbot
75f1abb9b8 [gn build] Port 80fd5fa5269c 2021-06-21 06:23:08 +00:00
Roman Lebedev
9acde4873f [UpdateTestUtils] Print test filename when complaining about conflicting prefix
Now that FileCheck eagerly complains when prefixes are unused,
the update script does the same, and  is becoming very common
to need to drop some prefixes, yet figuring out the file
it complains about isn't obvious unless it actually tells us.
2021-06-20 14:12:39 +03:00
Nico Weber
a20aff32da [gn build] (manually) port b9c05aff205b (MIRTests) 2021-06-19 13:04:09 -04:00
LLVM GN Syncbot
db683fa2a1 [gn build] Port 134723edd5bf 2021-06-19 11:49:56 +00:00
LLVM GN Syncbot
55cf55cf08 [gn build] Port f27e4548fc42 2021-06-17 17:09:43 +00:00
Nico Weber
9be684f5d3 [gn build] (manually) port f9aba9a5afe 2021-06-16 18:04:46 -04:00
LLVM GN Syncbot
a4f344271c [gn build] Port ef16c8eaa5cd 2021-06-16 15:57:43 +00:00
LLVM GN Syncbot
a020da51e1 [gn build] Port 6478ef61b1a4 2021-06-15 20:04:02 +00:00
Vitaly Buka
e7f5783c60 [asan] Remove Asan, Ubsan support of RTEMS and Myriad
Differential Revision: https://reviews.llvm.org/D104279
2021-06-15 12:59:05 -07:00
Roman Lebedev
10ca53ce65 [NewPM] Remove SpeculateAroundPHIs pass
Addition of this pass has been botched.
There is no particular reason why it had to be sold as an inseparable part
of new-pm transition. It was added when old-pm was still the default,
and very *very* few users were actually tracking new-pm,
so it's effects weren't measured.

Which means, some of the turnoil of the new-pm transition
are actually likely regressions due to this pass.

Likewise, there has been a number of post-commit feedback
(post new-pm switch), namely
* https://reviews.llvm.org/D37467#2787157 (regresses HW-loops)
* https://reviews.llvm.org/D37467#2787259 (should not be in middle-end, should run after LSR, not before)
* https://reviews.llvm.org/D95789 (an attempt to fix bad loop backedge metadata)
and in the half year past, the pass authors (google) still haven't found time to respond to any of that.

Hereby it is proposed to backout the pass from the pipeline,
until someone who cares about it can address the issues reported,
and properly start the process of adding a new pass into the pipeline,
with proper performance evaluation.

Furthermore, neither google nor facebook reports any perf changes
from this change, so i'm dropping the pass completely.
It can always be re-reverted should/if anyone want to pick it up again.

Reviewed By: aeubanks

Differential Revision: https://reviews.llvm.org/D104099
2021-06-15 20:35:55 +03:00
LLVM GN Syncbot
5b8f203a86 [gn build] Port 4eb9fe2e1a07 2021-06-15 12:01:01 +00:00
LLVM GN Syncbot
d90014c622 [gn build] Port d0a5d8611935 2021-06-15 05:56:32 +00:00
LLVM GN Syncbot
4f6c145c6a [gn build] Port c820b494d6e1 2021-06-14 14:41:33 +00:00
Juneyoung Lee
2f184e9475 [Utils] Add missing freeze and poison keyword highlights
This patch adds missing keyword highlights for freeze and poison

Reviewed By: MaskRay, porglezomp

Differential Revision: https://reviews.llvm.org/D104017
2021-06-14 09:21:26 +09:00
Kristina Bessonova
175bc341a3 [lit] Attempt for fix tests failing because of 'warning: non-portable path to file'
This is an attempt to fix clang test failures due to 'nonportable-include-path'
warnings on Windows when a path to llvm-project's base directory contains some
uppercase letters (excluding a drive letter).

The issue originates from 2 problems:
* discovery.py loads site config in lower case causing all the paths
based on __file__ and requested within the config file to be in lowercase as well,
* neither os.path.abspath() nor os.path.realpath() (both used to obtain paths of
config files, sources, object directories, etc) do not return paths in the correct
case for Windows (at least consistently for all python versions).

As os.path library doesn't seem to provide any relaible way to restore
the case for paths on Windows, this patch proposes to use pathlib.resolve().
pathlib is a part of Python 3.4 while llvm lit requires Python 3.6.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D103014
2021-06-12 12:49:03 +02:00
LLVM GN Syncbot
174f747fbd [gn build] Port 7eba4856c702 2021-06-11 18:04:01 +00:00
LLVM GN Syncbot
c85b97b264 [gn build] Port c54d3050f7b9 2021-06-11 16:57:34 +00:00
LLVM GN Syncbot
0f438067de [gn build] Port 9106047ee3dd 2021-06-11 16:34:49 +00:00
LLVM GN Syncbot
621e1fc902 [gn build] Port 9907746f5db7 2021-06-11 14:01:11 +00:00