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

68 Commits

Author SHA1 Message Date
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
Chandler Carruth
11714e13d3 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.

llvm-svn: 159520
2012-07-02 10:18:06 +00:00
Chandler Carruth
f40c0fc048 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.

llvm-svn: 159313
2012-06-28 00:16:51 +00:00
Michael J. Spencer
e6c28a171e 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.

llvm-svn: 155147
2012-04-19 19:27:54 +00:00
Sylvestre Ledru
53db93eead Catch the Python exception when subprocess.Popen is failing.
For example, if llc cannot be found, the full python stacktrace is displayed
and no interesting information are provided.
+ fail the process when an exception occurs

llvm-svn: 154665
2012-04-13 11:22:18 +00:00
Eli Bendersky
3ef88c1833 Continue cleanup of LIT, getting rid of the remaining artifacts from dejagnu
* Removed test/lib/llvm.exp - it is no longer needed 
* Deleted the dg.exp reading code from test/lit.cfg. There are no dg.exp files
  left in the test suite so this code is no longer required. test/lit.cfg is
  now much shorter and clearer 
* Removed a lot of duplicate code in lit.local.cfg files that need access to
  the root configuration, by adding a "root" attribute to the TestingConfig
  object. This attribute is dynamically computed to provide the same
  information as was previously provided by the custom getRoot functions. 
* Documented the config.root attribute in docs/CommandGuide/lit.pod

llvm-svn: 153408
2012-03-25 09:02:19 +00:00
Eli Bendersky
4afdeeb682 Replace all instances of dg.exp file with lit.local.cfg, since all tests are run with LIT now and now Dejagnu. dg.exp is no longer needed.
Patch reviewed by Daniel Dunbar. It will be followed by additional cleanup patches.

llvm-svn: 150664
2012-02-16 06:28:33 +00:00
Eli Bendersky
973d44eb7c Adding a basic ELF dynamic loader and MC-JIT for ELF. Functionality is currently basic and will be enhanced with future patches.
Patch developed by Andy Kaylor and Daniel Malea. Reviewed on llvm-commits.

llvm-svn: 148231
2012-01-16 08:56:09 +00:00
NAKAMURA Takumi
85ad69c8df test/lit.cfg: Enable the feature 'asserts' to check output of llc -version.
llc knows whether he is compiled with -DNDEBUG.
|  Optimized build with assertions.

llvm-svn: 145230
2011-11-28 05:09:15 +00:00
Benjamin Kramer
fde45fcf3c Update lit's list of tools.
llvm-svn: 143815
2011-11-05 16:20:52 +00:00
Daniel Dunbar
9ca0ee457c tests: Rip out a bunch of now unused test code relating to use of llvm-gcc in LLVM tests.
llvm-svn: 143143
2011-10-27 20:59:26 +00:00
Peter Collingbourne
78a1609fa2 s/tblgen/llvm-tblgen/g in a few missed places, including the tests
llvm-svn: 141294
2011-10-06 13:39:59 +00:00
David Dean
b0f6751041 Fix PR9833/PR11054 (patch provided by Patrik Hägglund)
llvm-svn: 141092
2011-10-04 16:26:41 +00:00
Eric Christopher
9b721ff19e Remove llvm-gcc and various compiler handling from llvm. It's not needed
here anymore and has been migrated to the test-suite project.

llvm-svn: 140216
2011-09-20 23:58:15 +00:00
Andrew Trick
e1de7514f3 Lit option for ignoring stderr output.
This is useful for testing a build a temporarily hand instrumented
build.
Patch by arrowdodger!

llvm-svn: 138804
2011-08-30 17:42:33 +00:00
Andrew Trick
aec8bc23bf lit support for REQUIRES: asserts.
Take #2. Don't piggyback on the existing config.build_mode. Instead,
define a new lit feature for each build feature we need (currently
just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define
this feature within test/lit.site.cfg. This doesn't require any lit
harness changes and should be more robust across build systems.

llvm-svn: 133664
2011-06-22 23:23:19 +00:00
NAKAMURA Takumi
ab9b1d65a4 test/lit.cfg: Add PATHEXT to 'substitution', to recognize tools on Windows hosts. Thanks to Danil Malyshev!
Some tests on Windows use the "not" utility and fail with an error "program not executable". The reason for this error is that the name of the executable file sended to the "not" without the extension.

llvm-svn: 126383
2011-02-24 12:34:34 +00:00
Sean Callanan
6619ddaec6 Fixed lit.cfg to no longer recognize the old
edis name as needing expansion.  This tool was
been replaced by llvm-mc long ago.

llvm-svn: 126180
2011-02-22 02:05:53 +00:00
NAKAMURA Takumi
0c1790b8d2 test/lit.cfg: Seek sane tools(and bash) in directories and set to $PATH.
LitConfig.getBashPath() will not seek in $PATH after LitConfig.getToolsPath() was executed.

llvm-svn: 125176
2011-02-09 04:19:21 +00:00
Frits van Bommel
4c9ed7d055 Fix lit for people whose LLVM path contains 'opt', which is a common directory name on Unix-like systems.
llvm-svn: 122873
2011-01-05 15:10:24 +00:00
Tobias Grosser
e8df8a7c39 Include llvm-gcc dir before llvm_tools_dir
This ensures that always the recently compiled tools are picked for testing.

llvm-svn: 122810
2011-01-04 16:01:17 +00:00
David Greene
3926d82c53 Don't pattern match "/clang" so we don't mangle directory names. Some
tests use absolute paths to clang.

llvm-svn: 122796
2011-01-04 01:05:30 +00:00
David Greene
73d8d1dc69 Don't pattern match "clang-" as it may be part of a tool name with a
triple suffix.

llvm-svn: 122779
2011-01-03 21:55:08 +00:00
David Greene
124695aed0 Reapply 122341 to fix PR8199 now that clang changes are in.
llvm-svn: 122754
2011-01-03 17:30:25 +00:00
David Greene
33a91c0c9a Revert 122341. It breaks some darwin tests.
llvm-svn: 122346
2010-12-21 17:25:43 +00:00
David Greene
28140b5288 Fix PR 8199. This patch prepends the build tool dir to LLVM programs
being tested.  This ensures that we test the tools just built and not
some random tools that might happen to be in the user's PATH.  This
makes LLVM testing much more stable and predictable.

llvm-svn: 122341
2010-12-21 16:55:53 +00:00
NAKAMURA Takumi
63bff1a5d3 test: Add the feature 'shell' on LLVM_ON_UNIX.
llvm-svn: 121104
2010-12-07 02:43:51 +00:00
Michael J. Spencer
4c0dfbd472 Test: Fix Support.Path and _all_ of the unittest death tests. GetTempPath defaults to \Windows\.
If I typed anything else it would just decline into cursing.

llvm-svn: 121095
2010-12-07 01:23:49 +00:00
NAKAMURA Takumi
7352ce8225 test: Use $SharedLibDir for loadable modules. On Cygming, loadable modules are not in lib/ but bin.
llvm-svn: 120274
2010-11-29 00:20:21 +00:00
NAKAMURA Takumi
fc8d4c0024 test: Add the new feature 'loadable_module'.
llvm-svn: 120273
2010-11-29 00:20:09 +00:00
Duncan Sands
b01f1042f2 Use LLVMCC_EMITIR_FLAG rather than hard-coding "-emit-llvm".
llvm-svn: 120156
2010-11-25 21:19:52 +00:00
Duncan Sands
e08df07d11 Spelling fixes in comments.
llvm-svn: 113746
2010-09-13 13:32:22 +00:00
Michael J. Spencer
cd662e3540 Test: Fix LLVMC tests on CMake.
The CMake build didn't define TEST_COMPILE_CXX_CMD. The tests assumed gcc.

llvm-svn: 112480
2010-08-30 14:49:00 +00:00
Bob Wilson
734df9c786 The %ocamlopt setting has embedded quotes. Copy the entire value instead
of stopping at the first embedded quote.

llvm-svn: 111622
2010-08-20 14:19:38 +00:00
Daniel Dunbar
19253c8496 tests: Haste makes waste.
llvm-svn: 111525
2010-08-19 16:47:54 +00:00
Daniel Dunbar
a16b90f240 tests: Ignore whitespace in llvm_supports_binding() and llvm_gcc_supports().
llvm-svn: 111524
2010-08-19 16:46:52 +00:00
Daniel Dunbar
eb15b8b44d tests: Don't error out if HOME isn't present in t the environment.
llvm-svn: 110711
2010-08-10 19:36:25 +00:00