12549 Commits

Author SHA1 Message Date
LLVM GN Syncbot
4e092d9be6 [gn build] Port 544e38ca439f 2023-05-17 06:22:04 +00:00
XinWang10
744b12adb4 [X86]check that Uses, Defs are same for entries in memory folding table
Add expensive check that Uses, Defs are same for entries in memory folding table.
MemFolding could not change the Uses/Defs.

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D150633
2023-05-16 22:53:52 -04:00
LLVM GN Syncbot
649cbe48a7 [gn build] Port fcaccf817d31 2023-05-16 21:33:17 +00:00
LLVM GN Syncbot
9d202bfed1 [gn build] Port dc95245e69a1 2023-05-16 18:32:17 +00:00
LLVM GN Syncbot
364e455937 [gn build] Port 7158fd381a0b 2023-05-16 13:22:38 +00:00
Nico Weber
a7752e85cf [gn build] Port a423b7f1d7ca (ClangReplInterpreterTests -rdynamic) 2023-05-16 09:02:36 -04:00
Wang, Xin10
8a5450d322 Fix regression after D150436
llvm-clang-x86_64-expensive-checks-debian will fail after D150436 merged.
The fail occurred in X86, I changed the sort rule in AsmMatcher in Patch D150436, so x86 code will arrive line 633 first(will not affect other targets).
The logic here want to use the order record written in source file to make AsmMatcher to first use AVX instructions, it used field HasPositionOrder.
But the condition here just makes sure one of the compared record is subclass of Instruction and has field HasPositionOrder true, and didn't check another.

(Committing on behalf of @XinWang10 to unblock broken expensive-cjhecks builds)

Differential Revision: https://reviews.llvm.org/D150651
2023-05-16 13:04:44 +01:00
Wang, Xin10
9a24ba2397 Correct the sort logic in AsmMatcherEmmitter.cpp
The logic from line 633 to 640 is specific for ARM as the comments said, it will make all the targets will prefer to using instruction with more predicates when compiler do AsmMatching.
And for code from line 642 to 649, X86 want to use the order records written in source file to sort the instructions. So X86 could be affected by this logic. (These code could be arrived only by X86)
After change this, seems AVX instructions have not be affected but it exposed some other errors for instruction push and call.
CALLpcrel16 could not be used in 64 bit mode, we need add Predicate for it. And for push instruction, previously because pushi32 has predicates = [Not64bitmode], so it precede pushi16, which is incorrect here, we should get pushw here and it also align with gcc.

Reviewed By: skan

Differential Revision: https://reviews.llvm.org/D150436
2023-05-16 02:44:02 -04:00
Igor Kudrin
f649599ea9 [CMake] Use LLVM own tools in extract_symbols.py
As for now, 'extract_symbols.py' can use several tools to extract
symbols from object files and libraries and to guess if the target is
32-bit Windows. The tools are being found via PATH, so in most cases,
they are just system tools. This approach has a number of limitations,
in particular:

* System tools may not be able to handle the target format in case of
  cross-platform builds,
* They cannot read symbols from LLVM bitcode files, so the staged LTO
  build with plugins is not supported,
* The auto-selected tools may be suboptimal (see D113557),
* Support for multiple tools for a single task increases the complexity
  of the script code.

The patch proposes using LLVM's own tools to solve these issues.
Specifically, 'llvm-readobj' detects the target platform, and 'llvm-nm'
reads symbols from all supported formats, including bitcode files. The
tools can be built in Release mode for the host platform or overridden
using CMake settings 'LLVM_READOBJ' and 'LLVM_NM' respectively. The
implementation also supports using precompiled tools via
'LLVM_NATIVE_TOOL_DIR'.

Differential Revision: https://reviews.llvm.org/D149119
2023-05-15 16:20:19 -07:00
LLVM GN Syncbot
528a9e46bd [gn build] Port 7ace54e64bb6 2023-05-15 21:49:25 +00:00
LLVM GN Syncbot
9f3283fcdc [gn build] Port 61d5671c1697 2023-05-15 18:29:44 +00:00
LLVM GN Syncbot
fce318ae4f [gn build] Port 205175578e0d 2023-05-15 18:29:43 +00:00
LLVM GN Syncbot
fee61d50ab [gn build] Port b049fc0481bc 2023-05-15 17:38:45 +00:00
LLVM GN Syncbot
08dcd4c01e [gn build] Port 6851d078c54e 2023-05-15 16:58:34 +00:00
Francesco Petrogalli
4bfe410802 [TableGen][SubtargetEmitter] Add the StartAtCycles field in the WriteRes class.
Conditions that need to be met:

1. count(StartAtCycle) == count(ReservedCycles);
2. For each i: StartAtCycles[i] < ReservedCycles[i];
3. For each i: StartAtCycles[i] >= 0;
4. If left unspecified, the elements are set to 0.

Differential Revision: https://reviews.llvm.org/D150310
2023-05-15 10:39:45 +02:00
LLVM GN Syncbot
709f59e2b9 [gn build] Port b7932803dede 2023-05-14 19:26:19 +00:00
Nico Weber
c19c248466 [gn] port 88c1242ed7e1 (begone, LLVMExegesisARMTests) 2023-05-13 17:16:23 +02:00
LLVM GN Syncbot
b354028fc6 [gn build] Port b97859b67416 2023-05-13 06:40:42 +00:00
LLVM GN Syncbot
8ceda4d1a3 [gn build] Port 6cf993e59bd2 2023-05-12 04:34:40 +00:00
Nico Weber
0a70d20c07 [gn] port c45ee7c0fba8 2023-05-12 02:31:52 +02:00
LLVM GN Syncbot
1c3a2069ca [gn build] Port 8e2d09c33938 2023-05-11 21:33:57 +00:00
Aaron Ballman
26fee39c25 Fixed NATVIS debug visualizers for LLVM
This fixes the visualizers for:
PointerIntPair
PointerUnion
PointerIntPair<PointerUnion<*>, *>
StringMapEntry

and adds a visualizer for:
PunnedPointer
2023-05-11 09:28:57 -04:00
Krzysztof Parzyszek
1b18064069 [TableGen] Print message about dropped patterns with -debug
A selection pattern can be silently dropped if type inference fails to
deduce some types. Print a message when that happens, and -debug was
applied.
2023-05-10 14:51:57 -07:00
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