1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
Commit Graph

6996 Commits

Author SHA1 Message Date
Serge Guelton
a749c2ae5c Python compat - no explicit reference to Python version
Update documentation and shebang.

Differential Revision: https://reviews.llvm.org/D56252

llvm-svn: 350327
2019-01-03 15:44:24 +00:00
Serge Guelton
01c86ce50d Python compat - iterator protocol
In Python2 next() is used wile it's __next__ in Python3.

Differential Revision: https://reviews.llvm.org/D56250

llvm-svn: 350326
2019-01-03 15:43:14 +00:00
Serge Guelton
6a77c32524 Python compat - urllib
Differential Revision: https://reviews.llvm.org/D56261

llvm-svn: 350315
2019-01-03 14:12:44 +00:00
Serge Guelton
5aaf03f132 Python compat - has_key vs. in operator
Use portable `in` operator instead of `has_key(...)` method.

Differential Revision: https://reviews.llvm.org/D56260

llvm-svn: 350314
2019-01-03 14:12:37 +00:00
Serge Guelton
503314e807 Python compat - map/filter
Differential Revision: https://reviews.llvm.org/D56259

llvm-svn: 350313
2019-01-03 14:12:30 +00:00
Serge Guelton
0c9eaa5247 Python compat - iteritems() vs. items()
Always use `items()` and introduce extra `list(...)` call when needed.

Differential Revision: https://reviews.llvm.org/D56257

llvm-svn: 350312
2019-01-03 14:12:23 +00:00
Serge Guelton
f594682627 Pythran compat - range vs. xrange
Use range instead of xrange whenever possible. The extra list creation in Python2
is generally not a performance bottleneck.

Differential Revision: https://reviews.llvm.org/D56253

llvm-svn: 350309
2019-01-03 14:11:58 +00:00
Serge Guelton
bc5eec4c75 Python compat - print statement
Make sure all print statements are compatible with Python 2 and Python3 using
the `from __future__ import print_function` statement.

Differential Revision: https://reviews.llvm.org/D56249

llvm-svn: 350307
2019-01-03 14:11:33 +00:00
Mike Spertus
7bf06060fd Fix MSVC visualizer for PointerUnion4
Calculate which item is being held and then display it with the appropriate type. We also 
optimize the display of PointerUnion3 to take advantage of our knowing that the IntMask is
always 1 in PointerUnion types

llvm-svn: 350280
2019-01-03 00:52:54 +00:00
Daniel Sanders
7b5a28078c [tblgen][disasm] Emit record names again when decoder conflicts occur.
And add a test for it.

llvm-svn: 350277
2019-01-03 00:14:33 +00:00
Mike Spertus
a46a7e2652 MSVC Visualizer for PointerUnion3
llvm-svn: 350275
2019-01-02 23:46:59 +00:00
Mike Spertus
3e94a5b005 Fix MSVC PointerUnion visualizer
Differential Revision: https://reviews.llvm.org/D56186

llvm-svn: 350250
2019-01-02 19:26:50 +00:00
Nico Weber
7c8afd2214 [gn build] Add fuzzers in llvm/tools that are needed for check-llvm
Also add a fuzzer() template for defining fuzzers that's similar to
add_llvm_fuzzer in the CMake build, and a build file for dependency
llvm/lib/FuzzMutate.

Also make `assert(defined(...` error strings a bit more self-consistent.

Differential Revision: https://reviews.llvm.org/D56194

llvm-svn: 350238
2019-01-02 18:13:14 +00:00
Nico Weber
5cf4ac8ca9 [gn build] Add build files for bugpoint-passes and LLVMHello plugins
These two plugins are loaded into a host process that contains all LLVM
symbols, so they don't link against anything. This required minor readjustments
to the tablegen() setup of IR.

Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56204

llvm-svn: 350234
2019-01-02 17:38:22 +00:00
Nico Weber
7c1061aacf [gn build] Add some llvm/tools: lli, lli-child-target
Also add build files for dependencies llvm/lib/ExecutionEngine/{Interpreter,Orc}

Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56193

llvm-svn: 350226
2019-01-02 17:36:41 +00:00
Nico Weber
ccd70571fa [gn build] Add some llvm/tools: bugpoint, dsymutil, llvm-opt-report
Also add build file for dependency llvm/lib/OptRemarks.

Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56192

llvm-svn: 350217
2019-01-02 12:43:56 +00:00
Nico Weber
37c7c3a80d [gn build] Add some llvm/tools: llvm-c-test, llvm-cfi-verify, llvm-cov, llvm-cvtres
Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56191

llvm-svn: 350216
2019-01-02 12:42:39 +00:00
Nico Weber
5741b35ffc [gn build] Add some llvm/tools: llvm-cxxdump, llvm-cxxfilt, llvm-cxxmap
Needed for check-llvm.

This is the last target reading llvm_install_binutils_symlinks.

Differential Revision: https://reviews.llvm.org/D56190

llvm-svn: 350215
2019-01-02 12:40:04 +00:00
Nico Weber
e94ea2ae9d [gn build] Add some llvm/tools: llvm-diff, llvm-dwp
Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56189

llvm-svn: 350214
2019-01-02 12:39:05 +00:00
Nico Weber
3c4bb8f80e [gn build] Add some llvm/tools: llvm-mca, llvm-mt
Also add build file for dependency llvm/lib/MCA.

Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56166

llvm-svn: 350213
2019-01-02 12:37:52 +00:00
Nico Weber
eacf2bc7ff [gn build] Add some llvm/tools: llvm-size, llvm-split, llvm-strings
Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56164

llvm-svn: 350212
2019-01-02 12:34:57 +00:00
Nico Weber
e256a2ef70 [gn build] Add some llvm/tools: llvm-xray, sancov, sanstats, verify-uselistorder, yaml-bench
Also add build file for dependency llvm/lib/XRay.

Needed for check-llvm.

(yaml-bench is an llvm/util, not an llvm/tool.)

Differential Revision: https://reviews.llvm.org/D56163

llvm-svn: 350211
2019-01-02 12:32:49 +00:00
Nico Weber
dda6499ce7 [gn build] Add some llvm/tools: llvm-exegesis, llvm-extract, llvm-link
Also add build file for dependency llvm/lib/ExecutionEngine/MCJIT.

The exegesis stuff is pretty hairy and knows a lot about Target internals (in
general, not specifically in the GN build). I put the llvm-tblgen -gen-exegesis
call in llvm/tools/llvm-exegesis/lib/X86, instead of in llvm/lib/Target/X86
where it is in CMake land, and asked on D52932 why it's in that place in the
CMake build.

Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56167

llvm-svn: 350184
2018-12-31 23:48:22 +00:00
Nico Weber
661b5a6426 [gn build] Add some llvm/tools: llvm-rc, llvm-rtdyld
Also add build file for dependencies llvm/lib/ExecutionEngine,
llvm/lib/ExecutionEngine/RuntimeDyld.

Needed for check-llvm.

Differential Revision: https://reviews.llvm.org/D56165

llvm-svn: 350183
2018-12-31 23:32:15 +00:00
Nico Weber
1eb4e524dc [gn build] Make ninja check-clang also run Clang's unit tests
Also add a build file for clang/lib/ASTMatchers/Dynamic, which is only needed
by tests (and clang/tools/extra).

Also make llvm/utils/gn/build/sync_source_lists_from_cmake.py check that every
CMakeLists.txt file below {lld,clang}/unittests has a corresponding BUILD.gn
file, so we notice if new test binaries get added (since the failure mode for
missing GN build files for tests is just the tests silently not running in the
GN build).

Also add a unittest() macro for defining unit test targets, and add a lengthy
comment there about where the unit test binaries go and why.

With this, the build files for //clang are complete.

Differential Revision: https://reviews.llvm.org/D56116

llvm-svn: 350171
2018-12-31 00:10:47 +00:00
Nico Weber
1dee8378f2 [gn build] Add check-clang target and make it work
With this, check-clang runs and passes all of clang's lit tests. It doesn't run
any of its unit tests yet.

Like with check-lld, running just ninja -C out/gn will build all prerequisites
needed to run tests, but it won't run the tests (so that the build becomes
clean after one build). Running ninja -C out/gn check-clang will build
prerequisites if needed and run the tests. The check-clang target never becomes
clean and runs tests every time.

Differential Revision: https://reviews.llvm.org/D56095

llvm-svn: 350108
2018-12-27 23:38:58 +00:00
Nico Weber
d82f19ccdc [gn build] Make NOSORT line actually work
GN wants the NOSORT line to be the first line of a comment block, not the last
line.

I sent https://gn-review.googlesource.com/c/gn/+/3560 to support having it in
the last line too, but since it will be a while until everyone has that change
even if it's expected, use the form that works today.

Differential Revision: https://reviews.llvm.org/D56065

llvm-svn: 350060
2018-12-24 23:06:29 +00:00
Nico Weber
38a7fa562e [gn build] Add build files for clang/tools/{c-arcmt-test,c-index-test} and their dependency clang/tools/libclang
libclang is somewhat incomplete. It's just enough to get check-clang to pass,
but that requires it to be pretty complete. The biggest thing is that it's not
built as a shared library on Linux. The libclang/BUILD.gn file has a comment
with details on what else is missing.

Differential Revision: https://reviews.llvm.org/D56059

llvm-svn: 350054
2018-12-24 15:45:04 +00:00
Nico Weber
a204febe66 [gn build] Add build files for clang/tools/{arcmt-test,clang-check,clang-func-mapping}
Needed for check-clang.

Differential Revision: https://reviews.llvm.org/D56056

llvm-svn: 350026
2018-12-23 14:19:53 +00:00
Nico Weber
ec933a7b14 [gn build] Add build files for clang/tools/{clang-refactor,clang-rename}, clang/utils/hmaptool, clang/lib/Tooling/Refactoring
Needed for check-clang.

Differential Revision: https://reviews.llvm.org/D56055

llvm-svn: 350025
2018-12-23 14:17:13 +00:00
Nico Weber
a76bc96714 [gn build] Add build files for clang/tools/{clang-diff,clang-import-test,diagtool and clang/lib/Tooling, clang/lib/Tooling/ASTDiff
Needed for check-clang.

Differential Revision: https://reviews.llvm.org/D56054

llvm-svn: 350024
2018-12-23 14:15:26 +00:00
Nico Weber
f7bc814186 [gn build] Embed __TEXT __info_plist section into clang binary on macOS
Verified by comparing the output of `otool -P bin/clang` between the GN and the
CMake build.

Differential Revision: https://reviews.llvm.org/D55984

llvm-svn: 349992
2018-12-22 03:51:10 +00:00
Nico Weber
2d3594ed11 [gn build] Add build files for clang, clang-offload-bundler, and clang/lib/Headers
With this, the GN build can build clang!

Differential Revision: https://reviews.llvm.org/D55981

llvm-svn: 349991
2018-12-22 03:49:44 +00:00
Nico Weber
222d48e1ba [gn build] Add build files for llvm-cat, llvm-lto, llvm-lto2, llvm-modextract, llvm-profdata, llvm-symbolizer
These are the llvm/tools needed by check-clang.

Differential Revision: https://reviews.llvm.org/D56018

llvm-svn: 349989
2018-12-22 03:40:35 +00:00
Nico Weber
e42054f5d8 [gn build] Add build file for clang/lib/FrontendTool
Differential Revision: https://reviews.llvm.org/D55980

llvm-svn: 349988
2018-12-22 03:15:56 +00:00
Nico Weber
4adebfbdb7 [gn build] Add build file for clang/lib/ARCMigrate
Differential Revision: https://reviews.llvm.org/D55979

llvm-svn: 349987
2018-12-22 03:15:08 +00:00
Nico Weber
97fcd6712f [gn build] Add build files for clang/lib/{ASTMatchers,CrossTU}, clang/lib/StaticAnalyzer/{Checkers,Core,Frontend}
The intent is to add the build file for clang/lib/StaticAnalyzer/Frontend; everything else is pulled in by that.

Differential Revision: https://reviews.llvm.org/D55978

llvm-svn: 349986
2018-12-22 03:14:05 +00:00
Nico Weber
b40a638b3b [gn check] Unbreak check-lld if llvm_install_binutils_symlinks is false
The check-lld target was missing the dependency on llvm-nm and llvm-objdump in that case.

Differential Revision: https://reviews.llvm.org/D55941

llvm-svn: 349836
2018-12-20 21:57:12 +00:00
Nico Weber
b77734a037 [gn build] Add build file for clang/lib/CodeGen and llvm/lib/ProfileData/Coverage
Differential Revision: https://reviews.llvm.org/D55931

llvm-svn: 349834
2018-12-20 21:56:16 +00:00
Nico Weber
59c115d06d [gn build] Add build files for clang/lib/{Frontend,Frontend/Rewrite,Serialization}
Differential Revision: https://reviews.llvm.org/D55930

llvm-svn: 349833
2018-12-20 21:55:28 +00:00
Nico Weber
fb5d608939 [gn build] Add build file for clang/lib/Driver
Mostly boring, except for the spurious dependency on StaticAnalyzer/Checkers --
see comments in the code.

Differential Revision: https://reviews.llvm.org/D55927

llvm-svn: 349832
2018-12-20 21:54:13 +00:00
Nico Weber
77d86f21fc [gn build] Add build file for clang/lib/Parse
Nothing really interesting. One thing to consider is where the clang_tablegen()
invocations that generate files that are private to a library should be. The
CMake build puts them in clang/include/clang/Parse (in this case), but maybe
putting them right in clang/lib/Parse/BUILD.gn makes mor sense. (For
clang_tablegen() calls that generate .inc files used by the public headers,
putting the call in the public BUILD file makes sense.)

For now, I've put the build file in the public header folder, since that
matches CMake and what I did in the last 2 clang patches, but I'm not sure I
like this.

Differential Revision: https://reviews.llvm.org/D55925

llvm-svn: 349831
2018-12-20 21:53:05 +00:00
Nico Weber
45bca46cc8 [gn build] Add build files for clang-format and lib/{Format,Rewrite,Tooling/Core,Tooling/Inclusions}
Differential Revision: https://reviews.llvm.org/D55924

llvm-svn: 349830
2018-12-20 21:51:46 +00:00
Nico Weber
b969ccfaaa [gn build] Add build files for clang/lib/{Analysis,Edit,Sema}
Differential Revision: https://reviews.llvm.org/D55913

llvm-svn: 349757
2018-12-20 13:39:25 +00:00
Nico Weber
6e271260e5 [gn build] Add build files for clang/lib/Lex and clang/lib/AST
Differential Revision: https://reviews.llvm.org/D55912

llvm-svn: 349756
2018-12-20 13:38:36 +00:00
Nico Weber
4ca15610d7 [gn build] Make ninja check-lld also run LLD's unit tests
And add build files for gtest.

With this, the build files for //lld are complete.

Differential Revision: https://reviews.llvm.org/D55838

llvm-svn: 349704
2018-12-20 00:04:10 +00:00
Nico Weber
4a9897ae62 [gn build] Add check-lld target and make it work
Also add a build file for llvm-lit, which in turn needs llvm/tools/llvm-config.

With this, check-lld runs and passes all of lld's lit tests. It doesn't run any
of its unit tests yet.

Running just ninja -C out/gn will build all prerequisites needed to run tests,
but it won't run the tests (so that the build becomes clean after one build).
Running ninja -C out/gn check-lld will build prerequisites if needed and run
the tests. The check-lld target never becomes clean and runs tests every time.

llvm-config's build file is a bit gnarly: Everything not needed to run tests is
basically stubbed out. Also, to generate LibraryDependencies.inc we shell out
to llvm-build at build-time. It would be much nicer to get the library
dependencies by using the dependency data the GN build contains
(http://llvm-cs.pcc.me.uk/gen/tools/llvm-config/LibraryDependencies.inc#1).

Differential Revision: https://reviews.llvm.org/D55836

llvm-svn: 349702
2018-12-19 23:52:16 +00:00
Nico Weber
bfb43d499e [gn build] Add build file for clang/lib/Basic and dependencies, 2nd try
Adds a build file for clang-tblgen and an action for running it, and uses that
to process all the .td files in include/clang/Basic.

Also adds an action to write include/clang/Config/config.h and
include/clang/Basic/Version.inc.

Differential Revision: https://reviews.llvm.org/D55847

(The previous commit of this contained unrelated changes, so I reverted the
whole previous commit and I'm now landing only what I intended to land.)

llvm-svn: 349679
2018-12-19 20:21:49 +00:00
Nico Weber
098c087057 Revert 349677, it contained a whole bunch of stuff I did not mean to commit
llvm-svn: 349678
2018-12-19 20:19:58 +00:00
Nico Weber
095ff4074a [gn build] Add build file for clang/lib/Basic and dependencies
Adds a build file for clang-tblgen and an action for running it, and uses that
to process all the .td files in include/clang/Basic.

Also adds an action to write include/clang/Config/config.h and
include/clang/Basic/Version.inc.

Differential Revision: https://reviews.llvm.org/D55847

llvm-svn: 349677
2018-12-19 20:18:59 +00:00