Commit Graph

101 Commits

Author SHA1 Message Date
NAKAMURA Takumi
042795734d 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196329 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-03 23:22:25 +00:00
Alp Toker
1765daa21c 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193559 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-28 23:37:49 +00:00
NAKAMURA Takumi
f7ca7c2a09 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193459 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-26 02:50:20 +00:00
Anders Waldenborg
2bef1a6b25 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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193233 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-23 08:10:20 +00:00
Chandler Carruth
dd5d86d992 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191835 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 15:42:23 +00:00
Chandler Carruth
1a1d7c4f4c 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191828 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-02 14:31:21 +00:00
Eric Christopher
188f96c111 Add llvm-readobj to the list of programs to find in the freshly built
toolchain.

Patch by Richard Pennington.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191706 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-30 21:55:01 +00:00
Andrew Kaylor
d48bd3ca37 Fix some more MCJIT PIC test XFAILs (for i386)
Patch by Dimitry Andric

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191111 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-20 22:12:03 +00:00
Peter Collingbourne
88fae0edcc Fix LTO handling of module-level assembly (PR14152).
Patch by Tom Roeder!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191042 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-19 22:15:52 +00:00
Amaury de la Vieuville
2c9d79beee Add "native" to config.available_features, to make it easier to disable non-x-compile-safe tests
Patch by Artyom Skrobov!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190679 91177308-0d34-0410-b5e6-96231b3b80d8
2013-09-13 10:59:01 +00:00
Alexey Samsonov
e7d0b1d146 Restore llvm-ranlib expansion in RUN-lines removed in r184019
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189665 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-30 12:53:22 +00:00
Daniel Dunbar
51a0b77cbf [tests] Update fma3 check to work with Py3.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188950 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 22:26:44 +00:00
Nadav Rotem
9397683e62 Add the FMA3 feature in order to test FMA encoding using the old jit.
Patch by Chris Bieneman!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188865 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-21 05:02:12 +00:00
Daniel Dunbar
24ec2e5a72 [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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188513 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-16 00:37:11 +00:00
Daniel Dunbar
27c35d980a [tests] Update to use lit_config and lit package, as appropriate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188076 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-09 16:22:05 +00:00
Daniel Dunbar
9d11edb416 [lit] Remove on_clone member, which is no longer used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188006 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-08 20:59:13 +00:00
Daniel Dunbar
f34117d849 [tests] Make string encoding issues explicit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187929 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-07 23:09:24 +00:00
Bob Wilson
9c6d857c61 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187711 91177308-0d34-0410-b5e6-96231b3b80d8
2013-08-04 23:55:24 +00:00
David Dean
2c3c7fd696 Add the ability to use guarded malloc when running llvm lit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186134 91177308-0d34-0410-b5e6-96231b3b80d8
2013-07-11 23:36:57 +00:00
NAKAMURA Takumi
7e980a6845 Suppress llvm/test/Other/can-execute.txt on msys bash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184932 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-26 10:56:44 +00:00
Rafael Espindola
250bfb1745 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".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184019 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 23:25:53 +00:00
Eli Bendersky
dafd1a6311 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183994 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-14 19:14:52 +00:00
Tim Northover
4c8850cd1c AArch64: use MCJIT by default and enable related tests.
This just enables some testing I'd missed after implementing MCJIT
support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181215 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 16:51:08 +00:00
Ulrich Weigand
7207285e65 [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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181207 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06 16:21:50 +00:00
Alexey Samsonov
005159e924 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180088 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-23 10:17:34 +00:00
Nico Rieck
7e87373e91 Remove obsolete object file dumpers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179362 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12 04:07:13 +00:00
Jyotsna Verma
f0ca9a8c94 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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179209 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10 19:53:26 +00:00
Reid Kleckner
3ca3fc5632 [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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179173 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10 13:11:38 +00:00
Alexey Samsonov
3105d85dc4 Propagate path to ASan/MSan symbolizer into test environment to produce useful reports on errors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178749 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-04 07:41:00 +00:00
Evgeniy Stepanov
f647052d5f Disable ASan/MSan symbolization of reports in tests.
It was using an instrumented symbolizer binary, which is a potential fork bomb.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178139 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-27 13:11:12 +00:00
Alexey Samsonov
3fbb8408db Add asan/msan to the list of available features in LIT test runner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177994 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-26 08:27:39 +00:00
Alexey Samsonov
8957f7996c Fixup for r176933: more careful setup of path to llvm-symbolizer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177144 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-15 07:27:49 +00:00
Evgeniy Stepanov
992dbcfbcc Set symbolizer path in the test environment.
This is needed to get symbolized stack traces when running LLVM tests under (A|M)San.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176933 91177308-0d34-0410-b5e6-96231b3b80d8
2013-03-13 06:58:09 +00:00
Peter Collingbourne
fbb662f840 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172627 91177308-0d34-0410-b5e6-96231b3b80d8
2013-01-16 17:27:22 +00:00
Andrew Kaylor
238f34a706 Adding tests for the Intel JIT event listener's MCJIT support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168459 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-21 20:38:26 +00:00
NAKAMURA Takumi
b6843c28ec 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!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167231 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-01 14:28:51 +00:00
Ulrich Weigand
c197a55019 Set %defaultjit to use MCJIT for PowerPC targets.
Update Transforms/LICM/2003-12-11-SinkingToPHI.ll test to use
%defaultjit as well.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167031 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-30 18:07:58 +00:00
Rafael Espindola
d2930d364a Fix unexpected passes. These test do work with LTO on linux. I tested both
a cmake and an autoconf build.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166748 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-26 02:19:02 +00:00
Daniel Dunbar
9f4acd0aab tests: Stop mangling '-vg' into the triple, we don't use this currently.
- Also, lit is going to get a valgrind feature, instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166302 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-19 20:11:56 +00:00
Daniel Dunbar
b288ad8e36 test: Add a lit config variable to check if LTO is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166225 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18 20:43:11 +00:00
Sebastian Pop
92c39cadbc Use pre-python 2.5 syntax in lit.cfg.
Author:    Quentin Neill <qneill@codeaurora.org>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166217 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-18 19:58:28 +00:00
NAKAMURA Takumi
b894f96de4 Enable llvm/test/ExecutionEngine/MCJIT also for cygwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165313 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-05 14:10:29 +00:00
NAKAMURA Takumi
44a1fd4843 test/ExecutionEngine/MCJIT: MCJIT should work also on mingw.
FIXME: Also cygwin?

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165081 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-03 01:42:37 +00:00
Andrew Kaylor
7bbd6e366b 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165030 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02 18:38:34 +00:00
James Molloy
9e36496eb3 Add default JIT LIT variable.
Patch by David Tweed!



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164996 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-02 10:57:08 +00:00
NAKAMURA Takumi
95643d0832 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159641 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-03 03:59:34 +00:00
Chandler Carruth
4177e6fff5 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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159525 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02 12:47:22 +00:00
Chandler Carruth
7e621f3242 Switch a bunch of Linker tests from using elaborate echo productions to
just provide and reference separate input files from an Inputs
subdirectory. This pattern works very well in the Clang tree and is
easier to understand in my opinion. It also has fewer limitations and
will remove one particularly annoying use of TCL-style {} quoting from
the testsuite.

Also teach the LLVM lit configuration to avoid recursing into 'Inputs'
subdirectories. This wasn't required for the previous 'Inputs'
subdirectories used due to fortuitous suffix patterns.

This is the first step to completely removing support for TCL-style tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159520 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-02 10:18:06 +00:00
Chandler Carruth
96f41a1b0f Remove 'site.exp' building from both CMake and configure+make.
This is another vestige of the DejaGNU roots. There were FIXMEs in the
lit setup to add a 'lit.site.cfg', which has been around for quite some
time now, so I've properly switched the handling of the 4 things
actually used in site.exp to go through lit.site.cfg now. No more
parsing of the .exp file, one fewer configure-style generated file,
etc., etc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159313 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-28 00:16:51 +00:00
Michael J. Spencer
75338097c7 Remove llvm-ld and llvm-stub (which is only used by llvm-ld).
llvm-ld is no longer useful and causes confusion and so it is being removed.

* Does not work very well on Windows because it must call a gcc like driver to
  assemble and link.
* Has lots of hard coded paths which are wrong on many systems.
* Does not understand most of ld's options.
* Can be partially replaced by llvm-link | opt | {llc | as, llc -filetype=obj} |
  ld, or fully replaced by Clang.

I know of no production use of llvm-ld, and hacking use should be
replaced by Clang's driver.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155147 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-19 19:27:54 +00:00