Commit Graph

1295 Commits

Author SHA1 Message Date
LLVM GN Syncbot dd892a33e1 [gn build] Port 820e8d8656 2020-08-05 23:35:59 +00:00
Petr Hosek 1adc494bce [CMake] Simplify CMake handling for zlib
Rather than handling zlib handling manually, use find_package from CMake
to find zlib properly. Use this to normalize the LLVM_ENABLE_ZLIB,
HAVE_ZLIB, HAVE_ZLIB_H. Furthermore, require zlib if LLVM_ENABLE_ZLIB is
set to YES, which requires the distributor to explicitly select whether
zlib is enabled or not. This simplifies the CMake handling and usage in
the rest of the tooling.

This is a reland of abb0075 with all followup changes and fixes that
should address issues that were reported in PR44780.

Differential Revision: https://reviews.llvm.org/D79219
2020-08-05 16:07:11 -07:00
Nico Weber cc26121858 [gn build] (manually) merge 3ab01550b
This reverts commit 0bbaacc8ca and
2ad56119f5 which merged 10b1b4a23
(and follow-ups), since that change was reverted in 3ab01550b.
2020-08-05 08:56:14 -04:00
Nico Weber 6a4fd03698 [gn build] (manually) merge 593e1962 2020-08-04 13:05:31 -04:00
Fangrui Song bcea3a7a28 Add test utility 'split-file'
See https://lists.llvm.org/pipermail/llvm-dev/2020-July/143373.html
"[llvm-dev] Multiple documents in one test file" for some discussions.

This patch has explored several alternatives. The current semantics are similar to
what @dblaikie proposed.
`split-file filename output` splits the input file into multiple parts separated by
regex `^(.|//)--- filename` and write each part to the file `output/filename`
(`filename` can include path separators).

Use case A (organizing input of different formats (e.g. linker
script+assembly) in one file).

```
# RUN: split-file %s %t
# RUN: llvm-mc %t/asm -o %t.o
# RUN: ld.lld -T %t/lds %t.o -o %t
This is sometimes better than the %S/Inputs/ approach because the user
can see the auxiliary files immediately and don't have to open another file.

# asm
...
# lds
...
```

Use case B (for utilities which don't have built-in input splitting
feature):

```
// RUN: split-file %s %t
// RUN: llc < %t/1.ll | FileCheck %s --check-prefix=CASE1
// RUN: llc < %t/2.ll | FileCheck %s --check-prefix=CASE2
Combing tests prudently can improve readability.
For example, when testing parsing errors if the recovery mechanism isn't possible,
grouping the tests in one file can more readily see test coverage/strategy.

//--- 1.ll
...
//--- 2.ll
...
```

Since this is a new utility, there is no git history concerns for
UpperCase variable names. I use lowerCase variable names like mlir/lld.

Reviewed By: jhenderson, lattner

Differential Revision: https://reviews.llvm.org/D83834
2020-08-03 20:42:09 -07:00
LLVM GN Syncbot c12bd8dac9 [gn build] Port f78f509c75 2020-08-03 18:05:15 +00:00
Alex Richardson d23b15cc16 Execute llvm-lit with the python found by CMake by default
The check-* targets run ${Python3_EXECUTABLE} $BUILD/bin/llvm-lit, but
running `./bin/llvm-lit $ARGS` from the build directory currently always
uses "python" to run llvm-lit. On most systems this will be python2.7 even
if we found python3 at CMake time.

Reviewed By: compnerd

Differential Revision: https://reviews.llvm.org/D84625
2020-08-03 10:51:35 +01:00
Fangrui Song c41a18cf61 [CMake] Default ENABLE_X86_RELAX_RELOCATIONS to ON
This makes clang default to -Wa,-mrelax-relocations=yes, which enables
R_386_GOT32X (GNU as enables it regardless of -mrelax-relocations=) and
R_X86_64_[REX_]GOTPCRELX in MC. The produced object files require GNU ld>=2.26
to link. binutils 2.26 is considered a very old release today.
2020-08-02 23:06:31 -07:00
LLVM GN Syncbot 5a4cd55e5d [gn build] Port 160ff83765 2020-08-03 05:55:14 +00:00
Florian Hahn 599955eb56 Recommit "[IPConstProp] Remove and move tests to SCCP."
This reverts commit 59d6e814ce.

The cause for the revert (3 clang tests running opt -ipconstprop) was
fixed by removing those lines.
2020-08-02 22:23:54 +01:00
LLVM GN Syncbot 09746fbfb9 [gn build] Port b7cfa6ca92 2020-07-31 18:32:54 +00:00
LLVM GN Syncbot c75c7d5196 [gn build] Port df69492cdf 2020-07-31 16:23:24 +00:00
Nico Weber 2da9b44415 [gn build] (manually) merge 63d3aeb529 2020-07-31 09:54:39 -04:00
LLVM GN Syncbot b811736f8b [gn build] Port 763671f387 2020-07-30 22:29:22 +00:00
Florian Hahn 59d6e814ce Revert "[IPConstProp] Remove and move tests to SCCP."
This reverts commit e77624a3be.

Looks like some clang tests manually invoke -ipconstprop via opt.....
2020-07-30 13:06:54 +01:00
Florian Hahn e77624a3be [IPConstProp] Remove and move tests to SCCP.
As far as I know, ipconstprop has not been used in years and ipsccp has
been used instead. This has the potential for confusion and sometimes
leads people to spend time finding & reporting bugs as well as
updating it to work with the latest API changes.

This patch moves the tests over to SCCP. There's one functional difference
I am aware of: ipconstprop propagates for each call-site individually, so
for functions that are called with different constant arguments it can sometimes
produce better results than ipsccp (at much higher compile-time cost).But
IPSCCP can be thought to do so as well for internal functions and as mentioned
earlier, the pass seems unused in practice (and there are no plans on working
towards enabling it anytime).

Also discussed on llvm-dev:
http://lists.llvm.org/pipermail/llvm-dev/2020-July/143773.html

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D84447
2020-07-30 12:36:27 +01:00
LLVM GN Syncbot 0c4ea27510 [gn build] Port 276f9e8cfa 2020-07-29 17:37:10 +00:00
Roman Lebedev e1dd212c87
[X86] Remove disabled miscompiling X86CondBrFolding pass
As briefly discussed in IRC with @craig.topper,
the pass is disabled basically since it's original introduction (nov 2018)
due to  known correctness issues (miscompilations),
and there hasn't been much work done to fix that.

While i won't promise that i will "fix" the pass,
i have looked at it previously, and i'm sure i won't try to fix it
if that requires actually fixing this existing code.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D84775
2020-07-28 23:35:04 +03:00
Fangrui Song 26fc91eb5d Revert "[gn build] (manually) merge d054c7ee2e9"
This reverts commit ab73b6da95.
2020-07-28 13:30:29 -07:00
Jinsong Ji d28f86723f Re-land "[PowerPC] Remove QPX/A2Q BGQ/BGP CNK support"
This reverts commit bf544fa1c3.

Fixed the typo in PPCInstrInfo.cpp.
2020-07-28 14:00:11 +00:00
Jinsong Ji bf544fa1c3 Revert "[PowerPC] Remove QPX/A2Q BGQ/BGP CNK support"
This reverts commit adffce7153.

This is breaking test-suite, revert while investigation.
2020-07-27 21:07:00 +00:00
Jinsong Ji adffce7153 [PowerPC] Remove QPX/A2Q BGQ/BGP CNK support
Per RFC http://lists.llvm.org/pipermail/llvm-dev/2020-April/141295.html
no one is making use of QPX/A2Q/BGQ/BGP CNK anymore.

This patch remove the support of QPX/A2Q in llvm, BGQ/BGP in clang,
CNK support in openmp/polly.

Reviewed By: hfinkel

Differential Revision: https://reviews.llvm.org/D83915
2020-07-27 19:24:39 +00:00
LLVM GN Syncbot e77ff4abb3 [gn build] Port ee7caa7593 2020-07-27 16:45:49 +00:00
Nico Weber b6902d977a [gn build] Make syncing to single-line source files work after 1afd889d0b 2020-07-27 12:44:47 -04:00
Nico Weber 52dd18ab1d [gn build] (manually) merge 48c948abeb 2020-07-27 12:30:09 -04:00
Hans Wennborg 0de629d7ae [gn] Set CLANGD_ENABLE_REMOTE=0
To fix the build after 37ac559fcc.
2020-07-27 14:05:03 +02:00
LLVM GN Syncbot 48c3228c5c [gn build] Port 136c8f50e9 2020-07-25 18:51:58 +00:00
Nico Weber 0bbaacc8ca [gn build] (manually) port 10b1b4a23 more 2020-07-24 08:48:14 -04:00
Nico Weber 2ad56119f5 [gn build] (manually) port 10b1b4a23 2020-07-24 08:37:57 -04:00
Nico Weber 0ed660f9e5 [gn build] (manually) port 228f8d89 2020-07-24 08:29:36 -04:00
Nico Weber ab73b6da95 [gn build] (manually) merge d054c7ee2e 2020-07-23 22:28:23 -04:00
LLVM GN Syncbot 23d1800433 [gn build] Port 92874d2866 2020-07-23 15:07:01 +00:00
LLVM GN Syncbot 23cc19d1cf [gn build] Port 13ad00be98 2020-07-22 23:32:03 +00:00
LLVM GN Syncbot bd9b223770 [gn build] Port 27650ec554 2020-07-22 23:08:46 +00:00
Nico Weber dfecad4ccf [gn build] Remove something I missed in 1afd889d0 2020-07-22 16:36:25 -04:00
LLVM GN Syncbot f3e667bf86 [gn build] Port 418121c30a 2020-07-22 18:37:02 +00:00
Nico Weber d074749423 [gn build] (manually) port 746b5fad5b 2020-07-22 14:10:17 -04:00
LLVM GN Syncbot a1d99aff7c [gn build] Port a5e0194709 2020-07-22 16:56:06 +00:00
LLVM GN Syncbot 28e0298d1d [gn build] Port 2a6c871596 2020-07-22 16:56:05 +00:00
Fangrui Song 0788ba0066 [gn build] Handle X86InstCombineIntrinsic.cpp in 2a6c871596 2020-07-22 09:49:27 -07:00
Fangrui Song 88ba9fa6a4 [gn build] Port 2a6c871596 & 44a6bda19b 2020-07-22 09:40:50 -07:00
Nico Weber 4fe912f186 Build: Move TF source file inclusion from build system to source files
Outside of compiler-rt (where it's arguably an anti-pattern too),
LLVM tries to keep its build files as simple as possible. See e.g.
llvm/docs/SupportLibrary.rst, "Code Organization".

Differential Revision: https://reviews.llvm.org/D84243
2020-07-21 13:02:34 -04:00
Nico Weber e37b220442 [gn build] (manually) hack around 70f8d0ac8a 2020-07-21 06:35:36 -04:00
LLVM GN Syncbot c6f84ebf84 [gn build] Port e1270b16c9 2020-07-20 17:51:57 +00:00
Nico Weber 9551ae22fc [gn build] Run `git ls-files '*.gn' '*.gni' | xargs llvm/utils/gn/gn.py format` 2020-07-17 12:31:42 -04:00
Nico Weber 16458b5a6d [gn build] (manually) merge 6c43ed608 2020-07-17 12:27:21 -04:00
Nico Weber 1afd889d0b [gn build] Make sync_source_lists_from_cmake handle one-line sources lines
sync_source_lists_from_cmake now also looks for source files in
`sources += [ "foo.cc" ]` lines, which allows us to remove most
`# Make `gn format` not collapse this` comments.

(sync_source_lists_from_cmake doesn't look for `foo_headers += [...]`
still, so the comment is still needed in two places for that.)

No intentional behavior change.
2020-07-17 11:53:42 -04:00
Nico Weber 63f0b10b8c [gn format] (manually) merge 6bddd099ac 2020-07-17 11:21:42 -04:00
LLVM GN Syncbot 6831f8ae58 [gn build] Port 6bddd099ac 2020-07-17 14:58:08 +00:00
LLVM GN Syncbot 8475981b30 [gn build] Port c7562e77b3 2020-07-17 14:38:56 +00:00