Commit Graph

12067 Commits

Author SHA1 Message Date
LLVM GN Syncbot
de3f0f7fa0 [gn build] Port 59b029238a 2023-01-09 09:00:23 +00:00
Guillaume Chatelet
59b029238a [reland][NFC] Vastly simplifies TypeSize
Simplifies the implementation of `TypeSize` while retaining its interface.
There is no need for abstract concepts like `LinearPolyBase`, `UnivariateLinearPolyBase` or `LinearPolySize`.

Differential Revision: https://reviews.llvm.org/D140263
2023-01-09 08:43:37 +00:00
Nico Weber
2cc30c4ee8 [gn] port b712aef5b3 2023-01-08 13:24:53 -05:00
Nico Weber
a9775e00f0 [gn build] Port 86aac87fe4 2023-01-08 13:22:35 -05:00
LLVM GN Syncbot
f9a0d045ca [gn build] Port 16c1c9fdcc 2023-01-06 15:46:03 +00:00
Guillaume Chatelet
16c1c9fdcc Revert D140263 "[NFC] Vastly simplifies TypeSize"
This broke some build bots : https://lab.llvm.org/buildbot/#/builders/16/builds/41419/steps/5/logs/stdio

This reverts commit 4670d5ece5.
2023-01-06 15:33:00 +00:00
Guillaume Chatelet
87b6b347fc Revert D141134 "[NFC] Only expose getXXXSize functions in TypeSize"
The patch should be discussed further.

This reverts commit dd56e1c92b.
2023-01-06 15:27:50 +00:00
Guillaume Chatelet
dd56e1c92b [NFC] Only expose getXXXSize functions in TypeSize
Currently 'TypeSize' exposes two functions that serve the same purpose:
 - getFixedSize / getFixedValue
 - getKnownMinSize / getKnownMinValue

source : bf82070ea4/llvm/include/llvm/Support/TypeSize.h (L337-L338)

This patch offers to remove one of the two and stick to a single function in the code base.

Differential Revision: https://reviews.llvm.org/D141134
2023-01-06 15:24:52 +00:00
Alex Richardson
9b2276c004 [UpdateTestChecks] Do not add --force-update to UTC_ARGS
Persisting this flag only introduces test churn.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D141124
2023-01-06 13:35:43 +00:00
LLVM GN Syncbot
cd4de53be7 [gn build] Port 4670d5ece5 2023-01-06 13:20:13 +00:00
Guillaume Chatelet
4670d5ece5 [NFC] Vastly simplifies TypeSize
Simplifies the implementation of `TypeSize` while retaining its interface.
There is no need for abstract concepts like `LinearPolyBase`, `UnivariateLinearPolyBase` or `LinearPolySize`.

Differential Revision: https://reviews.llvm.org/D140263
2023-01-06 13:19:32 +00:00
Aaron Ballman
b4993bea29 Remove documentation about the Go bindings
We removed the Go bindings in https://reviews.llvm.org/D135436 but
missed documentation that talks about the bindings.
2023-01-05 14:49:28 -05:00
LLVM GN Syncbot
c9bce9fea0 [gn build] Port b06b248ad9 2023-01-05 14:03:43 +00:00
serge-sans-paille
38818b60c5 Move from llvm::makeArrayRef to ArrayRef deduction guides - llvm/ part
Use deduction guides instead of helper functions.

The only non-automatic changes have been:

1. ArrayRef(some_uint8_pointer, 0) needs to be changed into ArrayRef(some_uint8_pointer, (size_t)0) to avoid an ambiguous call with ArrayRef((uint8_t*), (uint8_t*))
2. CVSymbol sym(makeArrayRef(symStorage)); needed to be rewritten as CVSymbol sym{ArrayRef(symStorage)}; otherwise the compiler is confused and thinks we have a (bad) function prototype. There was a few similar situation across the codebase.
3. ADL doesn't seem to work the same for deduction-guides and functions, so at some point the llvm namespace must be explicitly stated.
4. The "reference mode" of makeArrayRef(ArrayRef<T> &) that acts as no-op is not supported (a constructor cannot achieve that).

Per reviewers' comment, some useless makeArrayRef have been removed in the process.

This is a follow-up to https://reviews.llvm.org/D140896 that introduced
the deduction guides.

Differential Revision: https://reviews.llvm.org/D140955
2023-01-05 14:11:08 +01:00
Nico Weber
ff66d410fd Revert "[gn] port f29cfab55d1f"
This reverts commit 199563534a.
f29cfab55d was reverted in c6c54132b7.
2023-01-04 21:01:30 -05:00
LLVM GN Syncbot
37228b1baa [gn build] Port ba87448313 2023-01-04 10:40:23 +00:00
LLVM GN Syncbot
2a2b954434 [gn build] Port a455c91601 2023-01-03 22:08:13 +00:00
LLVM GN Syncbot
6a0333a170 [gn build] Port c570287fbf 2023-01-03 05:56:22 +00:00
LLVM GN Syncbot
1e48ed3932 [gn build] Port 89aad1e6a3 2023-01-01 01:57:45 +00:00
Benjamin Kramer
a3d58bbaff Detemplate llvm::EmitGEPOffset and move it into a cpp file. NFC. 2022-12-29 16:24:21 +01:00
serge-sans-paille
d9ab3e82f3 [clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile time.

It has a slight impact on preprocessing / compile time, see

https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u

This a recommit of e953ae5bbc and the subsequent fixes caa713559b and 06b90e2e9c.

The above patchset caused some version of GCC to take eons to compile clang/lib/Basic/Targets/AArch64.cpp, as spotted in aa171833ab.
The fix is to make BuiltinInfo tables a compilation unit static variable, instead of a private static variable.

Differential Revision: https://reviews.llvm.org/D139881
2022-12-27 09:55:19 +01:00
Vitaly Buka
aa171833ab Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
Revert "Fix lldb option handling since e953ae5bbc (part 2)"
Revert "Fix lldb option handling since e953ae5bbc313fd0cc980ce021d487e5b5199ea4"

GCC build hangs on this bot https://lab.llvm.org/buildbot/#/builders/37/builds/19104
compiling CMakeFiles/obj.clangBasic.dir/Targets/AArch64.cpp.d

The bot uses GNU 11.3.0, but I can reproduce locally with gcc (Debian 12.2.0-3) 12.2.0.

This reverts commit caa713559b.
This reverts commit 06b90e2e9c.
This reverts commit e953ae5bbc.
2022-12-25 23:12:47 -08:00
Owen Anderson
f34847e112 [NFC] Elminate some needless nested-map complexity.
Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D140648
2022-12-25 19:36:27 -07:00
LLVM GN Syncbot
3d5db75788 [gn build] Port f0756e0860 2022-12-25 21:05:12 +00:00
LLVM GN Syncbot
d1b930c1fc [gn build] Port 46c94e5067 2022-12-25 02:55:37 +00:00
LLVM GN Syncbot
5610902c5e [gn build] Port 066b492b74 2022-12-25 02:55:36 +00:00
serge-sans-paille
e953ae5bbc [clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile
time.

It has a slight impact on preprocessing / compile time, see

https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u

This is a recommit of 719d98dfa8 that into
account a GGC issue (probably
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92181) when dealing with
intiailizer_list and constant expressions.

Workaround this by avoiding initializer list, at the expense of a
temporary plain old array.

Differential Revision: https://reviews.llvm.org/D139881
2022-12-24 10:25:06 +01:00
Nico Weber
199563534a [gn] port f29cfab55d 2022-12-23 09:30:44 -05:00
Nico Weber
a09e222fd5 [gn] port ba0ec6f15f 2022-12-23 09:08:56 -05:00
serge-sans-paille
07d9ab9aa5 Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
There are still remaining issues with GCC 12, see for instance

https://lab.llvm.org/buildbot/#/builders/93/builds/12669

This reverts commit 5ce4e92264.
2022-12-23 13:29:21 +01:00
serge-sans-paille
5ce4e92264 [clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile
time.

It has a slight impact on preprocessing / compile time, see

https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u

This is a recommit of 719d98dfa8 with a
change to llvm/utils/TableGen/OptParserEmitter.cpp to cope with GCC bug
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108158

Differential Revision: https://reviews.llvm.org/D139881
2022-12-23 12:48:17 +01:00
serge-sans-paille
b7065a31b5 Revert "[clang] Use a StringRef instead of a raw char pointer to store builtin and call information"
Failing builds: https://lab.llvm.org/buildbot#builders/9/builds/19030
This is GCC specific and has been reported upstream: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108158

This reverts commit 719d98dfa8.
2022-12-23 11:36:56 +01:00
serge-sans-paille
719d98dfa8 [clang] Use a StringRef instead of a raw char pointer to store builtin and call information
This avoids recomputing string length that is already known at compile
time.

It has a slight impact on preprocessing / compile time, see

https://llvm-compile-time-tracker.com/compare.php?from=3f36d2d579d8b0e8824d9dd99bfa79f456858f88&to=e49640c507ddc6615b5e503144301c8e41f8f434&stat=instructions:u

Differential Revision: https://reviews.llvm.org/D139881
2022-12-23 10:31:47 +01:00
LLVM GN Syncbot
bab5d36413 [gn build] Port d64d3c5a8f 2022-12-22 22:53:42 +00:00
LLVM GN Syncbot
520a63893e [gn build] Port 17ed8f2928 2022-12-22 21:20:59 +00:00
LLVM GN Syncbot
8861c6dfe0 [gn build] Port eb6e13cb32 2022-12-22 18:42:31 +00:00
LLVM GN Syncbot
31fcabca41 [gn build] Port ec11388b33 2022-12-21 23:32:10 +00:00
Nico Weber
d413938780 [gn] another fixup for 47df55f3ef -- LoongArch is experimental, not RISCV 2022-12-21 18:31:39 -05:00
Nico Weber
39b92b32a1 [gn] fixup for 47df55f3ef 2022-12-21 18:25:45 -05:00
Nico Weber
47df55f3ef [gn] Don't include RISCV in targets build for 'all'
RISCV build and tests are often broken.

You can use `llvm_targets_to_build = "experimental"` to enable
_all_ targets, including the experimental ones. If RISCV is listed
in llvm_targets_to_build, it's built as before.
2022-12-21 18:24:44 -05:00
Kazu Hirata
77c90c8ce0 [llvm] Use std::optional instead of Optional
This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716
2022-12-20 15:42:32 -08:00
Arthur Eubanks
2118b9d39b [llvm-extract] Use new pass manager instead of legacy pass manager
Removes some legacy passes specific to llvm-extract
2022-12-20 12:57:35 -08:00
Nico Weber
4e018c7cbb Revert "[gn] port ae3e228af7"
This reverts commit b65fbf821a.
ae3e228af7 was reverted in f31a36e776.
2022-12-20 13:32:30 -05:00
Nico Weber
2aa998d22f [gn] Add explicit deps on TargetParser
This diff was generated by the following script:

    #!/usr/bin/env python3
    import os, subprocess
    r = subprocess.run('git show --pretty='' --name-only f09cf34d00'.split(),
                       stdout=subprocess.PIPE, text=True)
    for line in r.stdout.splitlines():
      if not line.endswith('CMakeLists.txt'): continue
      gn = 'llvm/utils/gn/secondary/' + os.path.dirname(line) + '/BUILD.gn'
      if not os.path.exists(gn): continue
      with open(gn) as f:
        contents = f.read()
      if contents.count('"//llvm/lib/Support",') == 1:
        contents = contents.replace(
            '"//llvm/lib/Support",',
            '"//llvm/lib/Support", "//llvm/lib/TargetParser",')
      elif contents.count(' deps = [') == 1:
        contents = contents.replace(
            ' deps = [',
            ' deps = [ "//llvm/lib/TargetParser",')
      else:
        print('needs manual fixup:', gn)
        continue
      with open(gn, 'w') as f:
        f.write(contents)

I then manually fixed up the BUILD.gn files for Support (should not depend on
TargetParser) and TargetParser (should depend on Support) and ran `gn format`
on all touched files.
2022-12-20 10:09:43 -05:00
Nico Weber
aa3bd65212 [gn] run gn format on new build file 2022-12-20 10:04:47 -05:00
Nico Weber
4ac51dd53d [gn build] Port core part of f09cf34d00
For now, this adds a dep from Support on the new TargetParser library
instead of the other way round. That'll be fixed in a mechanical follow-up.
2022-12-20 09:46:14 -05:00
Carl Ritson
d393d0d242 [TableGen] Emit table mapping physical registers to base classes
Allow targets to define a mapping from registers to register
classes such that each register has exactly one base class.
As registers may be in multiple register classes the base class
is determined by the container class with the lowest BaseClassOrder.

Only register classes with BaseClassOrder set are considered
when determining the base classes.  By default BaseClassOrder is
unset in RegisterClass so no code is generated unless a target
explicit defines one or more base register classes.

Reviewed By: arsenm, foad

Differential Revision: https://reviews.llvm.org/D139616
2022-12-20 15:22:28 +09:00
LLVM GN Syncbot
d5d14992d0 [gn build] Port 475ce4c200 2022-12-20 01:52:50 +00:00
LLVM GN Syncbot
21c3883cf7 [gn build] Port 2916b99182 2022-12-20 00:03:21 +00:00
Haojian Wu
683451bce3 [lit] Fix a few issues in relative_lines.py
- fixes error: Line: 91  result += contents[pos:m.start(index)] TypeError: can only concatenate str (not "bytes") to str
- fixes the "-code-completion-at=%s:%(lineb'-7')" rewritten results

Differential Revision: https://reviews.llvm.org/D140300
2022-12-19 19:57:12 +01:00