12526 Commits

Author SHA1 Message Date
LLVM GN Syncbot
ae63d5be37 [gn build] Port f041b3472a87 2023-05-10 16:23:50 +00:00
LLVM GN Syncbot
7e2fbeb017 [gn build] Port 62a090f958ce 2023-05-10 10:39:33 +00:00
Matt Arsenault
a4610c2064 TableGen: Fix missing C++ mode comments 2023-05-10 08:01:27 +01:00
Alexey Vishnyakov
9c07aa75b9 [TableGen] Fix null pointer dereferences in TreePattern::ParseTreePattern()
Bugs were found by Svace static analysis tool. Null pointers are
dereferenced right after error checking that does not return from
function.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D147706
2023-05-09 18:06:10 -07:00
Arthur Eubanks
16a0a69aad [gn build] Manually port e9569748de 2023-05-09 14:46:02 -07:00
LLVM GN Syncbot
a940c23e7e [gn build] Port 17bbb224f99c 2023-05-09 07:24:20 +00:00
Jon Roelofs
30b4351c7c
cmake: add missing dependencies on Attributes.inc
Differential revision: https://reviews.llvm.org/D150144
2023-05-08 15:35:57 -07:00
Akshay Khadse
5c7c3af1d0 Reapply [Coverity] Fix explicit null dereferences
This change fixes static code analysis errors

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D149506
2023-05-08 21:19:40 +08:00
LLVM GN Syncbot
988f2ee0e9 [gn build] Port 8d657c461a5a 2023-05-08 05:27:42 +00:00
LLVM GN Syncbot
4c457e81c4 [gn build] Port 746cf7e38cc4 2023-05-08 01:38:47 +00:00
Nico Weber
03936c541f [gn] port 3b6bc87 more 2023-05-06 22:43:02 -04:00
LLVM GN Syncbot
67ef3e8228 [gn build] Port 6ab43f9b87ce 2023-05-07 02:22:39 +00:00
LLVM GN Syncbot
ce8409052d [gn build] Port 5902bb9584d6 2023-05-07 02:22:38 +00:00
LLVM GN Syncbot
ab22d435ef [gn build] Port 3b6bc8752027 2023-05-07 02:22:37 +00:00
LLVM GN Syncbot
9dd0ba2b13 [gn build] Port 040a41a85293 2023-05-07 02:22:36 +00:00
Nico Weber
ad8fbc6335 [gn] port e7e3711885133 2023-05-06 22:22:25 -04:00
Nico Weber
f94f5ffcad [gn] port 95bb95ebe448 2023-05-06 22:21:04 -04:00
Jay Foad
caf22ec64a [UpdateTestChecks] More support for X86 exception handling
Differential Revision: https://reviews.llvm.org/D149971
2023-05-06 15:16:54 +01:00
wanglei
2285bc0489 [gn] Move LoongArch target from llvm_all_experimental_targets to llvm_all_stable_targets
Reviewed By: SixWeining

Differential Revision: https://reviews.llvm.org/D147701
2023-05-06 10:21:19 +08:00
LLVM GN Syncbot
3145e60caf [gn build] Port 917b3a7e6206 2023-05-05 05:00:42 +00:00
Arthur Eubanks
5337cd897f [gn build] Fix tblgen CodeGen dependencies
Matches the CMake build, otherwise we're rebuilding tblgen (and everything else) when there's a change almost anywhere in LLVM.
2023-05-04 11:18:55 -07:00
Mehdi Amini
9cb42ef835 Remove obsolete patch for arcanist: this is already in the upstream project now 2023-05-04 09:36:29 -07:00
LLVM GN Syncbot
62cc657339 [gn build] Port f05ce9045af4 2023-05-04 12:14:42 +00:00
Nico Weber
3d5932b114 [gn] Actually reformat files after adding CodeGen deps
This should've been part of 8221c316d524695.
2023-05-02 20:46:31 -04:00
Nico Weber
8221c316d5 [gn build] Port rest of 9cfeba5b12b6 (LowLevelType->Support)
This adds all the CodeGen deps all over the place.

I ran

    git show 9cfeba5b12b6 > foo2.txt

to get the original patch into a text file and then ran

    #!/usr/bin/env python3
    import os
    in_cmake = False
    for l in open('foo2.txt'):
      if l.startswith('+++ b/'):
        cmake = l[len('+++ b/'):-1]
        in_cmake = 'CMakeLists.txt' in cmake
      if not in_cmake:
        continue
      prefix = 'llvm/utils/gn/secondary/'
      gn_file = os.path.join(prefix, os.path.dirname(cmake), 'BUILD.gn')
      if l.startswith('+ '):
        add = l[1:].strip()
        if add == 'CodeGen':
          try:
            with open(gn_file) as f:
                contents = f.read()
          except:
            print(f'skipping {gn_file}')
            continue
          contents = contents.replace(' deps = [', ' deps = ["//llvm/lib/CodeGen",')
          with open(gn_file, 'w') as f:
              f.write(contents)

to update all the GN files.

(I manually removed the dep on CodeGen that this added to llvm-min-tblgen.)

Finally, I ran

    git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format

to fix up the formatting.
2023-05-02 20:44:21 -04:00
Nico Weber
b9e1e6af39 [gn] reformat all gn files
I ran:

    git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format
2023-05-02 20:42:03 -04:00
Nico Weber
79652fcdbb [gn build] Port some of 9cfeba5b12b6 (LowLevelType->Support, llvm-tblgen->CodeGen)
Doesn't yet add all the CodeGen deps all over the place.
2023-05-02 20:17:19 -04:00
Nico Weber
c9d6ae7809 [gn build] Port 3e3a926be8a9 2023-05-02 20:07:59 -04:00
Nico Weber
3cce68c2b3 [gn] Unbreak sync_source_lists_from_cmake on mac after Xcode update
Apparently `\b` stopped working with --pickaxe-regex for some reason.
2023-05-02 20:05:38 -04:00
Nico Weber
6abcaa078d [gn] Port 631bfdbee5b4 (GenVT.inc) 2023-05-02 20:04:33 -04:00
Nico Weber
cdeb4a0aac [gn] port 243e8f8d23ac71 (llvm-min-tblgen) 2023-05-02 20:04:32 -04:00
Nico Weber
65e63497f9 [gn] port fa43608d1649 (riscv_sifive_vector.td) 2023-05-02 19:06:34 -04:00
NAKAMURA Takumi
631bfdbee5 Switch llvm/CodeGen/MachineValueType.h to the generated one
Prune `SupportTests/MVTTest` since it is no longer needed.

Depends on D148769

Differential Revision: https://reviews.llvm.org/D148770
2023-05-03 00:13:20 +09:00
NAKAMURA Takumi
5d71ec6e44 Split out CodeGenTypes from CodeGen for LLT/MVT
This reduces dependencies on `llvm-tblgen` so much.

`CodeGenTypes` depends on `Support` at the moment.
Be careful to append deps on this, since Targets' tablegens
depend on this.

Depends on D149024

Differential Revision: https://reviews.llvm.org/D148769
2023-05-03 00:13:20 +09:00
NAKAMURA Takumi
c1221251fb Restore CodeGen/MachineValueType.h from Support
This is rework of;

  - rG13e77db2df94 (r328395; MVT)

Since `LowLevelType.h` has been restored to `CodeGen`, `MachinveValueType.h`
can be restored as well.

Depends on D148767

Differential Revision: https://reviews.llvm.org/D149024
2023-05-03 00:13:20 +09:00
NAKAMURA Takumi
9cfeba5b12 Restore CodeGen/LowLevelType from Support
This is rework of;
  - D30046 (LLT)

Since I have introduced `llvm-min-tblgen` as D146352, `llvm-tblgen`
may depend on `CodeGen`.

`LowLevlType.h` originally belonged to `CodeGen`. Almost all userse are
still under `CodeGen` or `Target`. I think `CodeGen` is the right place
to put `LowLevelType.h`.

`MachineValueType.h` may be moved as well. (later, D149024)

I have made many modules depend on `CodeGen`. It is consistent but
inefficient. It will be split out later, D148769

Besides, I had to isolate MVT and LLT in modmap, since
`llvm::PredicateInfo` clashes between `TableGen/CodeGenSchedule.h`
and `Transforms/Utils/PredicateInfo.h`.
(I think better to introduce namespace llvm::TableGen)

Depends on D145937, D146352, and D148768.

Differential Revision: https://reviews.llvm.org/D148767
2023-05-03 00:13:19 +09:00
LLVM GN Syncbot
7cf7ebd917 [gn build] Port 852bf52cc957 2023-05-02 10:31:09 +00:00
LLVM GN Syncbot
61cfb96fd3 [gn build] Port 7b7a6b641afd 2023-05-02 09:28:16 +00:00
LLVM GN Syncbot
aa8a08976b [gn build] Port 1aa36da15369 2023-05-02 09:11:37 +00:00
NAKAMURA Takumi
65365cff3b Add deps on LLVMTableGenCommon even if it is actually unused. 2023-05-02 12:43:16 +09:00
NAKAMURA Takumi
137d8039e4 llvm-tblgen: Split out obj.LLVMTableGenCommon
`$<TARGET_OBJECTS:llvm-min-tblgen>` was too lazy.
It has `rc.res` in the list with MS toolchain.

Fixup for D146352
2023-05-02 12:25:28 +09:00
NAKAMURA Takumi
243e8f8d23 Introduce llvm-min-tblgen to build public header files
`llvm-min-tblgen` is capable of building `llvm/include/llvm`;

- `-gen-attrs`
- `-gen-directive-*`
- `-gen-intrinsics-*`
- `-gen-riscv-target-def`

`llvm-min-tblgen` is built and used only when `llvm-tblgen` is built in-tree.
This is not installed.

`llvm-tblgen` is built with complete set and may be installed.
`check-llvm` uses not `llvm-min-tblgen` but `llvm-tblgen`.

`LLVM_TABLEGEN_PROJECT` overrides the definition of `tablegen(project)`.
`LLVM_HEADERS` is used as the overridden prefix for LLVM header generators.

If `EXPORT` is not specified in `add_tablegen`, its tablegen is treated as internal.

Let `llvm-tblgen` depend on `intrinsics_gen`

Depends on D149072

Differential Revision: https://reviews.llvm.org/D146352
2023-05-02 11:32:22 +09:00
LLVM GN Syncbot
7868d67830 [gn build] Port a50e54fbeb48 2023-05-01 23:27:58 +00:00
Craig Topper
09f6bdda24 [RISCV] Remove INVALID from the list of CPUs in RISCVTargetParser. NFC
This value is never used outside and is only used as a sentinel
internally which we can solve with other means.
2023-05-01 15:26:09 -07:00
LLVM GN Syncbot
c9d14b2329 [gn build] Port ade9c3bdca2c 2023-05-01 21:30:38 +00:00
LLVM GN Syncbot
5a49fee329 [gn build] Port 13fe6733019a 2023-05-01 19:12:51 +00:00
LLVM GN Syncbot
9809eb32a4 [gn build] Port a595b931f1f9 2023-05-01 18:48:32 +00:00
LLVM GN Syncbot
ce357fd4ee [gn build] Port 824391693cbb 2023-05-01 16:04:47 +00:00
LLVM GN Syncbot
a543e14250 [gn build] Port 68ee014b15d3 2023-04-30 20:27:26 +00:00
Sergei Barannikov
60f815d241 [TableGen] Forward declare CodeGenRegister et al. (NFC) 2023-04-30 07:01:00 +03:00