1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

204 Commits

Author SHA1 Message Date
Pete Cooper
f3e4ffec22 Add yaml-bench to the list of tools make check needs to run
llvm-svn: 236792
2015-05-07 22:53:11 +00:00
Matthias Braun
6cedce8963 Lit: Allow overriding llvm tool paths+arguments, make -D an alias for --param
These changes allow usages where you want to pass an additional
commandline option to all invocations of a specific llvm tool. Example:

> llvm-lit -Dllc=llc -enable-misched -verify-machineinstrs

Differential Revision: http://reviews.llvm.org/D9487

llvm-svn: 236461
2015-05-04 21:36:36 +00:00
Yunzhong Gao
130199c4c2 Tell lit.cfg about more Windows triples.
For example, the host triple on my 64-bit PC is x86_64-pc-windows-msvc.

llvm-svn: 232854
2015-03-20 22:08:40 +00:00
Peter Collingbourne
a47e3b75e5 test: Make a start on a test suite for libLTO.
This works in a similar way to the gold plugin tests. We search for a compatible
linker on $PATH and use it to run tests against our just-built libLTO. To start
with, test the just added opt level functionality.

Differential Revision: http://reviews.llvm.org/D8472

llvm-svn: 232785
2015-03-19 23:55:38 +00:00
Peter Collingbourne
0647b83013 gold: Make powerpc support optional for the tests.
Differential Revision: http://reviews.llvm.org/D8400

llvm-svn: 232744
2015-03-19 18:23:31 +00:00
David Majnemer
f1c707db2c llvm-cxxdump: Rename llvm-vtabledump to llvm-cxxdump
llvm-vtabledump has grown enough functionality not related to vtables
that it deserves a name which is more descriptive.

llvm-svn: 232301
2015-03-15 01:30:58 +00:00
David Blaikie
214504554b Change SystemZ large tests to use the existing long_tests property
(this is already used in Clang for a couple of tests)

Reviewers: uweigand

Differential Revision: http://reviews.llvm.org/D7965

llvm-svn: 230998
2015-03-02 19:34:11 +00:00
Chandler Carruth
735d694283 [gold] Consolidate the gold plugin options and actually search for
a gold binary explicitly. Substitute this binary into the tests rather
than just directly executing the 'ld' binary.

This should allow folks to inject a cross compiling gold binary, or in
my case to use a gold binary built and installed somewhere other than
/usr/bin/ld. It should also allow the tests to find 'ld.gold' so that
things work even if gold isn't the default on the system.

I've only stubbed out support in the makefile to preserve the existing
behavior with none of the fancy logic. If someone else wants to add
logic here, they're welcome to do so.

llvm-svn: 229251
2015-02-14 09:43:57 +00:00
Chandler Carruth
4f134e940d [lit] Make the gold plugin support testing work with a python3
interpreter. Seems that's a better path than pinning to python2.7.

Thanks to Justin for prodding me toward a fix. =]

llvm-svn: 229247
2015-02-14 09:05:56 +00:00
Owen Anderson
ec6d708888 Remove a gross usage of environment variables in MachineVerifier, replacing it with support for setting the -verify-machineinstrs flag via an environment variable in LIT.
This preserves the handy functionality of force-enabling the MachineVerifier, without the need to embed usage of environment variables in LLVM client applications.

llvm-svn: 228079
2015-02-04 00:02:59 +00:00
NAKAMURA Takumi
535beaf90d llvm/test/lit.cfg: have_ld_plugin_support(): Use decode() for stdout.
llvm-svn: 225171
2015-01-05 14:18:04 +00:00
Yaron Keren
48c54e0ea2 Teach lit.cfg to recognize -windows-gnu in addition to -mingw32.
llvm-svn: 224421
2014-12-17 09:55:15 +00:00
Frederic Riss
3654a51c98 Initial dsymutil tool commit.
The goal of this tool is to replicate Darwin's dsymutil functionality
based on LLVM. dsymutil is a DWARF linker. Darwin's linker (ld64) does
not link the debug information, it leaves it in the object files in
relocatable form, but embbeds a `debug map` into the executable that
describes where to find the debug information and how to relocate it.
When releasing/archiving a binary, dsymutil is called to link all the DWARF
information into a `dsym bundle` that can distributed/stored along with
the binary.

With this commit, the LLVM based dsymutil is just able to parse the STABS
debug maps embedded by ld64 in linked binaries (and not all of them, for
example archives aren't supported yet).

Note that the tool directory is called dsymutil, but the executable is
currently called llvm-dsymutil. This discrepancy will disappear once the
tool will be feature complete. At this point the executable will be renamed
to dsymutil, but until then you do not want it to override the system one.

    Differential Revision: http://reviews.llvm.org/D6242

llvm-svn: 224134
2014-12-12 17:31:24 +00:00
Peter Zotov
a05f11b29b [OCaml] [cmake] Add CMake buildsystem for OCaml.
Closes PR15325.

llvm-svn: 223071
2014-12-01 19:50:23 +00:00
Rafael Espindola
b2da355215 Only run the gold plugin tests if gold supports the targets we test with.
This fixes pr21345.

llvm-svn: 221669
2014-11-11 05:27:12 +00:00
David Majnemer
f979142efd test: Restore llvm-lit (at least for my machine)
r221137 feeds None into os.path.join which is not valid.

llvm-svn: 221242
2014-11-04 05:54:50 +00:00
Rafael Espindola
00a6342814 Handle ASAN_OPTIONS and UBSAN_OPTIONS in TestingConfig.py
Currently they are passed to tests of llvm itself, but not, for example, lld.

With this patch the options are visible in every test.

llvm-svn: 221198
2014-11-03 23:04:56 +00:00
Peter Zotov
1f0156a335 Unbreak build.
A bug in lit.cfg was introduced in r221137.

llvm-svn: 221144
2014-11-03 09:58:41 +00:00
Peter Zotov
3c929e8a6a [OCaml] Avoid embedding absolute paths into executables.
Bindings built out-of-tree, e.g. via OPAM, should append
a line to META.llvm like the following:

linkopts = "-cclib -L$libdir -cclib -Wl,-rpath,$libdir"

where $libdir is the lib/ directory where LLVM libraries are
installed.

llvm-svn: 221139
2014-11-03 09:51:34 +00:00
Peter Zotov
7ce2bb9583 [OCaml] Run tests twice, with ocamlc and ocamlopt (if available)
ocamlc and ocamlopt expose a distinct set of buildsystem bugs, e.g.
only ocamlc would detect -custom or -dllib-related bugs, and as all
buildbots will have ocamlopt, these bugs will stay hidden.

This change should add no more than 30 seconds of testing time.

llvm-svn: 221137
2014-11-03 09:50:53 +00:00
Peter Zotov
15e605a3a7 lit: PR21417: don't try to update OCAMLPATH if LibDir is empty.
llvm-svn: 220919
2014-10-30 19:26:42 +00:00
Peter Zotov
a82eb3aeff [OCaml] Enable backtraces in tests.
llvm-svn: 220900
2014-10-30 08:29:57 +00:00
Peter Zotov
c22ad454f5 [OCaml] [autoconf] Migrate to ocamlfind.
This commit updates the OCaml bindings and tests to use ocamlfind.
The bindings are migrated in order to use ctypes, which are now
required for MCJIT-backed Llvm_executionengine.
The tests are migrated in order to use OUnit and to verify that
the distributed META.llvm allows to build working executables.

Every OCaml toolchain invocation is now chained through ocamlfind,
which (in theory) allows to cross-compile the OCaml bindings.

The configure script now checks for ctypes (>= 0.2.3) and
OUnit (>= 2). The code depending on these libraries will be added
later. The configure script does not check the package versions
in order to keep changes less invasive.

Additionally, OCaml bindings will now be automatically enabled
if ocamlfind is detected on the system, rather than ocamlc, as it
was before.

llvm-svn: 220899
2014-10-30 08:29:45 +00:00
Peter Zotov
a51ff2779b [OCaml] PR9719, PR14727: Make tests run without ocamlopt.
Previously, tests hardcoded ocamlopt and cmxa, which broke builds on
machines without ocamlopt. Instead, they now fall back to ocamlc.

As a side effect this fixes PR14727, which was caused by a crude hack
that replaced gcc with g++ everywhere in the ocamlopt native compiler
path and passes it back using -cc. Now the tests use the same
technique as META, i.e. -cclib -lstdc++. It might be more fragile
than using g++ explicitly, but it will break when the installed
package will also break, which is good.

llvm-svn: 220828
2014-10-28 22:39:36 +00:00
Peter Collingbourne
65b92cb354 Add llvm-go tool.
This tool lets us build LLVM components within the tree by setting up a
$GOPATH that resembles a tree fetched in the normal way with "go get".

It is intended that components such as the Go frontend will be built in-tree
using this tool.

Differential Revision: http://reviews.llvm.org/D5902

llvm-svn: 220462
2014-10-23 02:33:23 +00:00
Peter Collingbourne
22590da2c9 Initial version of Go bindings.
This code is based on the existing LLVM Go bindings project hosted at:
https://github.com/go-llvm/llvm

Note that all contributors to the gollvm project have agreed to relicense
their changes under the LLVM license and submit them to the LLVM project.

Differential Revision: http://reviews.llvm.org/D5684

llvm-svn: 219976
2014-10-16 22:48:02 +00:00
NAKAMURA Takumi
3a52e789b7 llvm/test/lit.cfg: Suppress dwarf stuff for targeting x86_64-mingw32 while investigating since r219108.
llvm-svn: 219171
2014-10-06 23:29:06 +00:00
Scott Douglass
a5e8408b16 pass environment when invoking llvm-config from lit.cfg
Use the same environment when invoking llvm-config from lit.cfg as
will be used when running tests, so that ASAN_OPTIONS, INCLUDE, etc.
are present.

llvm-svn: 218403
2014-09-24 18:37:48 +00:00
Alexey Samsonov
2f4b76b5b8 Exclude known and bugzilled failures from UBSan bootstrap
llvm-svn: 217979
2014-09-17 20:17:52 +00:00
Eric Christopher
2f6f860aaa Reinstate "Nuke the old JIT."
Approved by Jim Grosbach, Lang Hames, Rafael Espindola.

This reinstates commits r215111, 215115, 215116, 215117, 215136.

llvm-svn: 216982
2014-09-02 22:28:02 +00:00
Alexey Samsonov
e3176abfc7 Introduce -DLLVM_USE_SANITIZER=Undefined CMake option to build UBSan-ified version of LLVM/Clang.
I've fixed most of the simple bugs and currently "check-llvm" test suite
has 26 failures, and "check-clang" suite has 5 failures.

llvm-svn: 216701
2014-08-29 00:50:36 +00:00
Eric Christopher
378bc328f0 Temporarily Revert "Nuke the old JIT." as it's not quite ready to
be deleted. This will be reapplied as soon as possible and before
the 3.6 branch date at any rate.

Approved by Jim Grosbach, Lang Hames, Rafael Espindola.

This reverts commits r215111, 215115, 215116, 215117, 215136.

llvm-svn: 215154
2014-08-07 22:02:54 +00:00
Rafael Espindola
e9ebbe5559 Nuke the old JIT.
I am sure we will be finding bits and pieces of dead code for years to
come, but this is a good start.

Thanks to Lang Hames for making MCJIT a good replacement!

llvm-svn: 215111
2014-08-07 14:21:18 +00:00
Duncan P. N. Exon Smith
4af7ebf31b Rename llvm-uselistorder => verify-uselistorder
llvm-svn: 214318
2014-07-30 17:11:27 +00:00
Rafael Espindola
69fc62dba7 Start adding some tests for the gold plugin.
These are only used when the 'ld' in the path is gold and the plugin has
been built, but it is already a start to make sure we don't regress features
that cannot be tested with llvm-lto.

llvm-svn: 214058
2014-07-27 23:11:06 +00:00
Duncan P. N. Exon Smith
3f8034a1c9 Move -verify-use-list-order into llvm-uselistorder
Ugh.  Turns out not even transformation passes link in how to read IR.
I sincerely believe the buildbots will finally agree with my system
after this though.  (I don't really understand why all of this has been
working on my system, but not on all the buildbots.)

Create a new tool called llvm-uselistorder to use for verifying use-list
order.  For now, just dump everything from the (now defunct)
-verify-use-list-order pass into the tool.

This might be a better way to test use-list order anyway.

Part of PR5680.

llvm-svn: 213957
2014-07-25 17:13:03 +00:00
David Majnemer
01f1c0273b Opportunistically fix the builders
A builder complained that it couldn't find llvm-vtabledump, this is
probably because it wasn't a dependency of the 'test' target.

llvm-svn: 213905
2014-07-24 23:26:54 +00:00
Rafael Espindola
4adf12d859 Remove unused substitution.
llvm-svn: 213839
2014-07-24 04:09:04 +00:00
NAKAMURA Takumi
a0e8d5dc7e llvm/test/lit.cfg: Let %python available.
llvm-svn: 212819
2014-07-11 14:36:39 +00:00
Rafael Espindola
5a1d31311f Delete utils/FileUpdate.
It is unused and it looks like it was never used.

llvm-svn: 211508
2014-06-23 17:58:39 +00:00
NAKAMURA Takumi
dfa4b6bfab Introduce a Lit feature "debug_frame" and apply it to llvm/test/MC/ELF/cfi-version.ll.
.debug_frame is not emitted for targeting Windows x64.

llvm-svn: 211466
2014-06-22 12:35:39 +00:00
Alp Toker
03b6e12fae Reduce verbiage of lit.local.cfg files
We can just split targets_to_build in one place and make it immutable.

llvm-svn: 210496
2014-06-09 22:42:55 +00:00
Adam Nemet
9c5e483a57 [Test] Remove c-index-test from the list of substitutions
All the tests are under the clang tests and none should be under llvm moving
forward.

The topic was discussed in this thread:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140428/214905.html

llvm-svn: 208234
2014-05-07 18:16:02 +00:00
Adam Nemet
288472e5d4 [Test] Remove substitution for clang
clang should not be used in the llvm tests.  The topic was discussed in this
thread:

http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140428/214905.html

llvm-svn: 207976
2014-05-05 17:17:27 +00:00
Chandler Carruth
adc216d983 [sanitizers] Propagate the sanitizer options through to the lit context.
This makes it *really* easy to debug leaks FYI:

ASAN_OPTIONS=detect_leaks=1 ./bin/llvm-lit -v <path to test>

llvm-svn: 207874
2014-05-02 21:47:35 +00:00
Alexey Samsonov
aca9f1c40f Don't expect to find fpcmp and PerfectShuffle when running lit tests
llvm-svn: 207704
2014-04-30 21:26:35 +00:00
Saleem Abdulrasool
61c5d7a3ff tests: Windows ARM now supports object emission
Update lit.cfg with the fact that LLVM can now generate WoA PE/COFF objects.

llvm-svn: 207347
2014-04-27 04:29:36 +00:00
Saleem Abdulrasool
859dccec1f ARM: update even more tests
More updating of tests to be explicit about the target triple rather than
relying on the default target triple supporting ARM mode.

Indicate to lit that object emission is not yet available for Windows on ARM.

llvm-svn: 205545
2014-04-03 17:35:22 +00:00
David Blaikie
4c1be74337 llvm-mc: error when -compress-debug-sections is requested and zlib is not linked
This is a bit of a stab in the dark, since I have zlib on my machine.
Just going to bounce it off the bots & see if it sticks.

Do we have some convention for negative REQUIRES: checks? Or do I just
need to add a feature like I've done here?

llvm-svn: 205050
2014-03-28 20:45:24 +00:00
Paul Robinson
18823f79a1 Refactor llvm/test/lit.cfg to use lit.util.which.
llvm-svn: 204486
2014-03-21 17:31:35 +00:00
Duncan P. N. Exon Smith
73eacbb02b PGO: llvm-profdata: tool for merging profiles
Introducing llvm-profdata, a tool for merging profile data generated by
PGO instrumentation in clang.

- The name indicates a file extension of <name>.profdata.  Eventually
  profile data output by clang should be changed to that extension.

- llvm-profdata merges two profiles.  However, the name is more general,
  since it will likely pick up more tasks (such as summarizing a single
  profile).

- llvm-profdata parses the current text-based format, but will be
  updated once we settle on a binary format.

<rdar://problem/15949645>

llvm-svn: 201535
2014-02-17 23:22:49 +00:00
Timur Iskhodzhanov
2cf4619945 Reland r200340 - 'Add line table debug info to COFF files when using a win32 triple'
This incorporates a couple of fixes reviewed at http://llvm-reviews.chandlerc.com/D2651

llvm-svn: 200440
2014-01-30 01:39:17 +00:00
Alp Toker
c7f817a228 Eliminate inappropriate use of FindProgramByName() from lli
llvm-svn: 199835
2014-01-22 21:52:35 +00:00
NAKAMURA Takumi
63cd9136f2 check-llvm: Ask llvm-config about assertion mode, instead of llc.
Add --assertion-mode to llvm-config. It emits ON or OFF according to NDEBUG.

llvm-svn: 196329
2013-12-03 23:22:25 +00:00
Alp Toker
f8c6f156f9 lit: add missing substitutions for recently added tools
llvm-mcmarkup, obj2yaml and yaml2obj were missing from the substitutions list,
causing the test suite to fail in a sandboxed environment.

llvm-svn: 193559
2013-10-28 23:37:49 +00:00
NAKAMURA Takumi
3b6edaae54 llvm/test/lit.cfg: Tighten conditions to enable 'native'.
I saw the case that 'native' was mis-enabled when x86_64-pc-win32 on x86_64-linux.

FIXME: Consider cases that target can be executed even if host_triple were different from target_triple.
llvm-svn: 193459
2013-10-26 02:50:20 +00:00
Anders Waldenborg
94fc29186e Add llvm-c-test tool for testing llvm-c
This provides rudimentary testing of the llvm-c api.

The following commands are implemented:

  * --module-dump
    Read bytecode from stdin - print ir

  * --module-list-functions
    Read bytecode from stdin - list summary of functions

  * --module-list-globals
    Read bytecode from stdin - list summary of globals

  * --targets-list
    List available targets

  * --object-list-sections
    Read object file from stdin - list sections

  * --object-list-symbols
    Read object file from stdin - list symbols (like nm)

  * --disassemble
    Read lines of triple, hex ascii machine code from stdin - print disassembly

  * --calc
    Read lines of name, rpn from stdin - print generated module ir

Differential-Revision: http://llvm-reviews.chandlerc.com/D1776
llvm-svn: 193233
2013-10-23 08:10:20 +00:00
Chandler Carruth
ee12d58370 Remove the very substantial, largely unmaintained legacy PGO
infrastructure.

This was essentially work toward PGO based on a design that had several
flaws, partially dating from a time when LLVM had a different
architecture, and with an effort to modernize it abandoned without being
completed. Since then, it has bitrotted for several years further. The
result is nearly unusable, and isn't helping any of the modern PGO
efforts. Instead, it is getting in the way, adding confusion about PGO
in LLVM and distracting everyone with maintenance on essentially dead
code. Removing it paves the way for modern efforts around PGO.

Among other effects, this removes the last of the runtime libraries from
LLVM. Those are being developed in the separate 'compiler-rt' project
now, with somewhat different licensing specifically more approriate for
runtimes.

llvm-svn: 191835
2013-10-02 15:42:23 +00:00
Chandler Carruth
33de408c73 Don't layout items in a list in columns. That requires changing every
line just to add or remove a single element. What I wouldn't give to
have clang-format here an be able to format this more densely without
caring...

Re-group and sort the entries while here to make the whole thing more
clear.

llvm-svn: 191828
2013-10-02 14:31:21 +00:00
Eric Christopher
aa86376c19 Add llvm-readobj to the list of programs to find in the freshly built
toolchain.

Patch by Richard Pennington.

llvm-svn: 191706
2013-09-30 21:55:01 +00:00
Andrew Kaylor
6360b74df8 Fix some more MCJIT PIC test XFAILs (for i386)
Patch by Dimitry Andric

llvm-svn: 191111
2013-09-20 22:12:03 +00:00
Peter Collingbourne
2a807b9eca Fix LTO handling of module-level assembly (PR14152).
Patch by Tom Roeder!

llvm-svn: 191042
2013-09-19 22:15:52 +00:00
Amaury de la Vieuville
c3c5a4a8aa Add "native" to config.available_features, to make it easier to disable non-x-compile-safe tests
Patch by Artyom Skrobov!

llvm-svn: 190679
2013-09-13 10:59:01 +00:00
Alexey Samsonov
e58dca6c37 Restore llvm-ranlib expansion in RUN-lines removed in r184019
llvm-svn: 189665
2013-08-30 12:53:22 +00:00
Daniel Dunbar
4f51896690 [tests] Update fma3 check to work with Py3.
llvm-svn: 188950
2013-08-21 22:26:44 +00:00
Nadav Rotem
aa3ca5312e Add the FMA3 feature in order to test FMA encoding using the old jit.
Patch by Chris Bieneman!

llvm-svn: 188865
2013-08-21 05:02:12 +00:00
Daniel Dunbar
a496d61c01 [tests] Cleanup initialization of test suffixes.
- Instead of setting the suffixes in a bunch of places, just set one master
   list in the top-level config. We now only modify the suffix list in a few
   suites that have one particular unique suffix (.ml, .mc, .yaml, .td, .py).

 - Aside from removing the need for a bunch of lit.local.cfg files, this enables
   4 tests that were inadvertently being skipped (one in
   Transforms/BranchFolding, a .s file each in DebugInfo/AArch64 and
   CodeGen/PowerPC, and one in CodeGen/SI which is now failing and has been
   XFAILED).

 - This commit also fixes a bunch of config files to use config.root instead of
   older copy-pasted code.

llvm-svn: 188513
2013-08-16 00:37:11 +00:00
Daniel Dunbar
b46c740f23 [tests] Update to use lit_config and lit package, as appropriate.
llvm-svn: 188076
2013-08-09 16:22:05 +00:00
Daniel Dunbar
a172055173 [lit] Remove on_clone member, which is no longer used.
llvm-svn: 188006
2013-08-08 20:59:13 +00:00
Daniel Dunbar
f1869550ea [tests] Make string encoding issues explicit.
llvm-svn: 187929
2013-08-07 23:09:24 +00:00
Bob Wilson
24b2d75ac5 Remove "lto_on_osx" xfails, now that -rdynamic works on Darwin.
Note that this will require a recent version of the linker for Darwin
builds with LTO to pass these tests.

llvm-svn: 187711
2013-08-04 23:55:24 +00:00
David Dean
64322d7020 Add the ability to use guarded malloc when running llvm lit tests.
llvm-svn: 186134
2013-07-11 23:36:57 +00:00
NAKAMURA Takumi
927f436b5d Suppress llvm/test/Other/can-execute.txt on msys bash.
llvm-svn: 184932
2013-06-26 10:56:44 +00:00
Rafael Espindola
daa7f712a2 Remove the LLVM specific archive index.
Archive files (.a) can have a symbol table indicating which object
files in them define which symbols. The purpose of this symbol table
is to speed up linking by allowing the linker the read only the .o
files it is actually going to use instead of having to parse every
object's symbol table.

LLVM's archive library currently supports a LLVM specific format for
such table. It is hard to see any value in that now that llvm-ld is
gone:

* System linkers don't use it: GNU ar uses the same plugin as the
linker to create archive files with a regular index. The OS X ar
creates no symbol table for IL files, I assume the linker just parses
all IL files.

* It doesn't interact well with archives having both IL and native objects.

* We probably don't want to be responsible for yet another archive
format variant.

This patch then:

* Removes support for creating and reading such index from lib/Archive.
* Remove llvm-ranlib, since there is nothing left for it to do.

We should in the future add support for regular indexes to llvm-ar for
both native and IL objects. When we do that, llvm-ranlib should be
reimplemented as a symlink to llvm-ar, as it is equivalent to "ar s".

llvm-svn: 184019
2013-06-14 23:25:53 +00:00
Eli Bendersky
f0afc10dda Do not to perform RUN line substitution of llc if that's prefixed by a hypnen
(-llc), similarly to the way it was done for clang and llvmc. 

This doesn't affect the upstream llvm tests but helps when developing custom
LLVM-based tools and testing them within the LLVM regression framework.

llvm-svn: 183994
2013-06-14 19:14:52 +00:00
Tim Northover
eb518c7918 AArch64: use MCJIT by default and enable related tests.
This just enables some testing I'd missed after implementing MCJIT
support.

llvm-svn: 181215
2013-05-06 16:51:08 +00:00
Ulrich Weigand
dbdc6e0306 [SystemZ] Set up JIT/MCJIT test cases
This patch adds the necessary configuration bits and #ifdef's to set up
the JIT/MCJIT test cases for SystemZ.  Like other recent targets, we do
fully support MCJIT, but do not support the old JIT at all.  Set up the
lit config files accordingly, and disable old-JIT unit tests.

Patch by Richard Sandiford.

llvm-svn: 181207
2013-05-06 16:21:50 +00:00
Alexey Samsonov
cb820bd0a4 Use zlib to uncompress debug sections in DWARF parser.
This makes llvm-dwarfdump and llvm-symbolizer understand
debug info sections compressed by ld.gold linker.

llvm-svn: 180088
2013-04-23 10:17:34 +00:00
Nico Rieck
a1dea0c714 Remove obsolete object file dumpers
llvm-svn: 179362
2013-04-12 04:07:13 +00:00
Jyotsna Verma
b244dff2f1 Add object-emission flag for lit tests. This flag is used
to disable following tests for Hexagon that require direct object
generation support.

DebugInfo/dwarf-public-names.ll
DebugInfo/dwarf-version.ll
DebugInfo/member-pointers.ll
DebugInfo/namespace.ll
DebugInfo/two-cus-from-same-file.ll

Fixes bug 15616 - http://llvm.org/bugs/show_bug.cgi?id=15616

llvm-svn: 179209
2013-04-10 19:53:26 +00:00
Reid Kleckner
724d65c212 [test] Use lit's shell test runner on Windows
Summary:
I did a local comparison between using bash and using lit's runner, and
more of the suite passes with lit than passes with bash.  Most of the
bash failures have to do with /dev/null, which is nonsensical on
Windows, but the lit runner handles it.

The lit shell runner is also much faster than bash, so I would expect
most Windows devs would want it by default.

The behavior can be overridden on any OS by setting
LIT_USE_INTERNAL_SHELL to 0 or 1 in the environment.

Reviewers: chapuni, ddunbar

CC: llvm-commits, timurrrr

Differential Revision: http://llvm-reviews.chandlerc.com/D559

llvm-svn: 179173
2013-04-10 13:11:38 +00:00
Alexey Samsonov
9e33512a49 Propagate path to ASan/MSan symbolizer into test environment to produce useful reports on errors.
llvm-svn: 178749
2013-04-04 07:41:00 +00:00
Evgeniy Stepanov
7077ad37ab Disable ASan/MSan symbolization of reports in tests.
It was using an instrumented symbolizer binary, which is a potential fork bomb.

llvm-svn: 178139
2013-03-27 13:11:12 +00:00
Alexey Samsonov
c6266a88ad Add asan/msan to the list of available features in LIT test runner
llvm-svn: 177994
2013-03-26 08:27:39 +00:00
Alexey Samsonov
2b83cbf9ab Fixup for r176933: more careful setup of path to llvm-symbolizer
llvm-svn: 177144
2013-03-15 07:27:49 +00:00
Evgeniy Stepanov
e8857c7379 Set symbolizer path in the test environment.
This is needed to get symbolized stack traces when running LLVM tests under (A|M)San.

llvm-svn: 176933
2013-03-13 06:58:09 +00:00
Peter Collingbourne
5f190b5e4e Introduce llvm::sys::getProcessTriple() function.
In r143502, we renamed getHostTriple() to getDefaultTargetTriple()
as part of work to allow the user to supply a different default
target triple at configure time.  This change also affected the JIT.
However, it is inappropriate to use the default target triple in the
JIT in most circumstances because this will not necessarily match
the current architecture used by the process, leading to illegal
instruction and other such errors at run time.

Introduce the getProcessTriple() function for use in the JIT and
its clients, and cause the JIT to use it.  On architectures with a
single bitness, the host and process triples are identical.  On other
architectures, the host triple represents the architecture of the
host CPU, while the process triple represents the architecture used
by the host CPU to interpret machine code within the current process.
For example, when executing 32-bit code on a 64-bit Linux machine,
the host triple may be 'x86_64-unknown-linux-gnu', while the process
triple may be 'i386-unknown-linux-gnu'.

This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple
platforms.

Differential Revision: http://llvm-reviews.chandlerc.com/D254

llvm-svn: 172627
2013-01-16 17:27:22 +00:00
Andrew Kaylor
4c7a9eebb0 Adding tests for the Intel JIT event listener's MCJIT support.
llvm-svn: 168459
2012-11-21 20:38:26 +00:00
NAKAMURA Takumi
380d526a6c llvm/test/lit.cfg: Don't use mcjit to ppc32 yet, not ready.
Unsupported CPU type!
UNREACHABLE executed at llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp:553!

llvm-svn: 167231
2012-11-01 14:28:51 +00:00
Ulrich Weigand
418fafa0b8 Set %defaultjit to use MCJIT for PowerPC targets.
Update Transforms/LICM/2003-12-11-SinkingToPHI.ll test to use
%defaultjit as well.

llvm-svn: 167031
2012-10-30 18:07:58 +00:00
Rafael Espindola
32ebb868a5 Fix unexpected passes. These test do work with LTO on linux. I tested both
a cmake and an autoconf build.

llvm-svn: 166748
2012-10-26 02:19:02 +00:00
Daniel Dunbar
9d930b0d06 tests: Stop mangling '-vg' into the triple, we don't use this currently.
- Also, lit is going to get a valgrind feature, instead.

llvm-svn: 166302
2012-10-19 20:11:56 +00:00
Daniel Dunbar
0f4b851ce7 test: Add a lit config variable to check if LTO is enabled.
llvm-svn: 166225
2012-10-18 20:43:11 +00:00
Sebastian Pop
324f8ad699 Use pre-python 2.5 syntax in lit.cfg.
Author:    Quentin Neill <qneill@codeaurora.org>
llvm-svn: 166217
2012-10-18 19:58:28 +00:00
NAKAMURA Takumi
da9a939cdb Enable llvm/test/ExecutionEngine/MCJIT also for cygwin.
llvm-svn: 165313
2012-10-05 14:10:29 +00:00
NAKAMURA Takumi
2c00334731 test/ExecutionEngine/MCJIT: MCJIT should work also on mingw.
FIXME: Also cygwin?
llvm-svn: 165081
2012-10-03 01:42:37 +00:00
Andrew Kaylor
0d06582cd5 Support for generating ELF objects on Windows.
This adds 'elf' as a recognized target triple environment value and overrides the default generated object format on Windows platforms if that value is present.  This patch also enables MCJIT tests on Windows using the new environment value.

llvm-svn: 165030
2012-10-02 18:38:34 +00:00
James Molloy
e2d4fd89a3 Add default JIT LIT variable.
Patch by David Tweed!

llvm-svn: 164996
2012-10-02 10:57:08 +00:00
NAKAMURA Takumi
99db282ba1 llvm/test/lit.cfg: Retweak for Win32 to fix testing.
- execute_external should be;
    - Not on Win32.
    - Using bash.
    In reverse, "execute_internal" shoud be (Win32 && !bash).

  - lit.getBashPath() behaves differently before and after tweaking $PATH.

I will add a few explanations there later.

llvm-svn: 159641
2012-07-03 03:59:34 +00:00
Chandler Carruth
8a358b3669 Convert all tests using TCL-style quoting to use shell-style quoting.
This was done through the aid of a terrible Perl creation. I will not
paste any of the horrors here. Suffice to say, it require multiple
staged rounds of replacements, state carried between, and a few
nested-construct-parsing hacks that I'm not proud of. It happens, by
luck, to be able to deal with all the TCL-quoting patterns in evidence
in the LLVM test suite.

If anyone is maintaining large out-of-tree test trees, feel free to poke
me and I'll send you the steps I used to convert things, as well as
answer any painful questions etc. IRC works best for this type of thing
I find.

Once converted, switch the LLVM lit config to use ShTests the same as
Clang. In addition to being able to delete large amounts of Python code
from 'lit', this will also simplify the entire test suite and some of
lit's architecture.

Finally, the test suite runs 33% faster on Linux now. ;]
For my 16-hardware-thread (2x 4-core xeon e5520): 36s -> 24s

llvm-svn: 159525
2012-07-02 12:47:22 +00:00