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

900 Commits

Author SHA1 Message Date
Rafael Espindola
ac62522b9b Add a convenience createUniqueDirectory function.
There are a few valid situation where we care about the structure inside a
directory, but not about the directory itself. A simple example is for unit
testing directory traversal.

PathV1 had a function like this, add one to V2 and port existing users of the
created temp file and delete it hack to using it.

llvm-svn: 185059
2013-06-27 03:45:31 +00:00
Michael Gottesman
6fb80a527d [APFloat] Added unittest for APFloat.divide that checks special cases, result categories, and result statuses.
llvm-svn: 185050
2013-06-27 00:42:00 +00:00
Michael Gottesman
e83cdadda7 Removed two logging printf statements from the APFloat tests... = /.
llvm-svn: 185045
2013-06-27 00:00:45 +00:00
Michael Gottesman
34f626681a [APFloat] Added unittest for APFloat.multiply that checks special cases, result categories, and result status.
llvm-svn: 185044
2013-06-26 23:55:26 +00:00
Michael Gottesman
78c7b539c6 [APFloat] Added unittest for APFloat.subtract that checks special cases, result categories, and result status.
llvm-svn: 185043
2013-06-26 23:55:23 +00:00
Michael Gottesman
e1dcbcd7a2 [APFloat] Removed debugging cruft that snuck in.
llvm-svn: 184974
2013-06-26 17:59:36 +00:00
Rafael Espindola
50996b2c4d Remove unused includes.
llvm itself is now PathV1 clean.

llvm-svn: 184947
2013-06-26 13:54:34 +00:00
Rafael Espindola
07ffa7d08b Port GetMainExecutable over to PathV2.
I will remove the V1 version as soon as I change clang in the next commit.

llvm-svn: 184914
2013-06-26 05:01:35 +00:00
Michael Gottesman
85c75137ce [APFloat] Removed trailing whitespace from unittests.
llvm-svn: 184715
2013-06-24 09:58:09 +00:00
Michael Gottesman
69c24d2254 [APFloat] Added a large unittest for APFloat.add that checks that special values are computed correctly.
llvm-svn: 184714
2013-06-24 09:58:07 +00:00
Benjamin Kramer
30c35d5305 Revert "BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch probability."
This reverts commit r184584. Breaks PPC selfhost.

llvm-svn: 184590
2013-06-21 20:20:27 +00:00
Benjamin Kramer
3315e168ee BlockFrequency: Saturate at 1 instead of 0 when multiplying a frequency with a branch probability.
Zero is used by BlockFrequencyInfo as a special "don't know" value. It also
causes a sink for frequencies as you can't ever get off a zero frequency with
more multiplies.

This recovers a 10% regression on MultiSource/Benchmarks/7zip. A zero frequency
was propagated into an inner loop causing excessive spilling.

PR16402.

llvm-svn: 184584
2013-06-21 19:30:05 +00:00
Akira Hatanaka
28386f0db3 [mips] Remove Triple:mips from SupportedArchs in MCJIT unittests
MIPS does not handle multiple relocations correctly, so two tests from the
unittests are expected to fail. These are:
 - MCJITTest.return_global and
 - MCJITTest.multiple_functions.

Until the multiple relocations are fixed, XFAIL the MCJIT unittests for
MIPS. This issue is tracked as Bug 16250.

Patch by Petar Jovanovic.

llvm-svn: 184461
2013-06-20 20:33:06 +00:00
Michael Gottesman
5982da1002 [APFloat] Rename isIEEENormal => isNormal and remove old isNormal method.
The old isNormal is already functionally replaced by the method isFiniteNonZero
in r184350 and all references to said method were replaced in LLVM/clang in
r184356/134366.

llvm-svn: 184449
2013-06-20 18:34:38 +00:00
Michael Gottesman
c03c0f1f1b [APFloat] Fix typo in test so we actually test if we handle denormals.
llvm-svn: 184447
2013-06-20 18:25:16 +00:00
Rafael Espindola
dc37cdb22d Rename fs::GetUniqueID to fs::getUniqueID to match the style guide.
llvm-svn: 184431
2013-06-20 15:06:35 +00:00
Michael Gottesman
7af8cd5aad [APFloat] Changed APFloat::isNormal => APFloat::isFiniteNonZero for all tests in unittests.
I forgot to to do this in r184356. The only references were in APFloatTest.cpp.

llvm-svn: 184366
2013-06-19 21:53:45 +00:00
Aaron Ballman
406fa22a89 Modified the implementation of fs::GetUniqueID on Windows such that it actually finds a unique identifier for a file. Also adds unit tests for GetUniqueID.
llvm-svn: 184351
2013-06-19 21:03:50 +00:00
Michael Gottesman
c82a0b3e6d [APFloat] Added isFiniteNonZero predicate.
This is the first patch in a series of patches to rename isNormal =>
isFiniteNonZero and isIEEENormal => isNormal. In order to prevent careless
errors on my part the overall plan is:

1. Add the isFiniteNonZero predicate with tests. I can do this in a method
independent of isNormal. (This step is this patch).
2. Convert all references to isNormal with isFiniteNonZero. My plan is to
comment out isNormal locally and continually convert isNormal references =>
isFiniteNonZero until llvm/clang compiles.
3. Remove old isNormal and rename isIEEENormal to isNormal.
4. Look through all of said references from patch 2 and see if we can simplify
them by using the new isNormal.

llvm-svn: 184350
2013-06-19 21:00:17 +00:00
Bill Wendling
8d83852261 Add unit test to test a trivial verifier check.
llvm-svn: 184338
2013-06-19 19:26:44 +00:00
Rafael Espindola
ef0d0d8b0b Avoid using PathV1.h in Program.h.
llvm-svn: 183940
2013-06-13 20:25:38 +00:00
Rafael Espindola
5b921b1aa1 Remove the program class.
It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just
those two functions and make Execute and Wait implementations details.

llvm-svn: 183864
2013-06-12 20:58:35 +00:00
Rafael Espindola
191f66d683 Move PathV2.h to Path.h
Most clients have already been moved from Path V1 to V2. The ones using V1
now include PathV1.h explicitly.

llvm-svn: 183801
2013-06-11 22:21:28 +00:00
Aaron Ballman
8be7652e28 sys::process::get_id() now returns the process ID instead of a process handle on Windows. Patch thanks to Kim Gräsman!
llvm-svn: 183621
2013-06-08 20:29:03 +00:00
Benjamin Kramer
2fbc7287e4 BitVector: Do the right thing in all() when Size is a multiple of BITWORD_SIZE.
llvm-svn: 183525
2013-06-07 15:14:31 +00:00
Benjamin Kramer
5f752c703f Optimize BitVector::all().
llvm-svn: 183521
2013-06-07 14:14:38 +00:00
Michael Gottesman
b152f55b6e IEEE-754R 5.7.2 General Operations is* operations (except for isCanonical).
Specifically the following work was done:

1. If the operation was not implemented, I implemented it.

2. If the operation was already implemented, I just moved its location
in the APFloat header into the IEEE-754R 5.7.2 section. If the name was
incorrect, I put in a comment giving the true IEEE-754R name.

Also unittests have been added for all of the functions which did not
already have a unittest.

llvm-svn: 183179
2013-06-04 03:46:25 +00:00
Benjamin Kramer
36e2996805 Try to avoid "integer literal too big" warnings from older GCCs.
llvm-svn: 183081
2013-06-01 22:29:41 +00:00
Eric Christopher
67d642450e Add support for adding the contents of a StringRef to the MD5 hash.
llvm-svn: 183054
2013-05-31 22:34:56 +00:00
Eric Christopher
3b08ea0a4f Convert more unsigned char -> uint8_t.
llvm-svn: 183053
2013-05-31 22:34:52 +00:00
Michael Gottesman
cad66f5206 [APFloat] Added a unittest for APFloat::getZero.
llvm-svn: 183028
2013-05-31 18:43:34 +00:00
Rafael Espindola
bd67fd9669 Remove unused member.
llvm-svn: 182958
2013-05-30 20:19:35 +00:00
Michael Gottesman
2adb2144bb Implement IEEE-754R 2008 nextUp/nextDown functions in the guise of the function APFloat::next(bool nextDown).
rdar://13852078

llvm-svn: 182945
2013-05-30 18:07:13 +00:00
Eric Christopher
30048ba007 Add a comment and some tests including the NULL byte.
llvm-svn: 182900
2013-05-30 00:43:26 +00:00
Michael Gottesman
bff1b48095 Added a unittest for APFloat::getSmallestNormalized.
llvm-svn: 182897
2013-05-30 00:18:47 +00:00
Michael Gottesman
09f3ab01b8 Added code to the unittest for APFloat::getSmallest to double check that we consider the result to be denormal.
I additionally changed certain checks to use EXPECT_FALSE instead of a boolean
complement with EXPECT_TRUE.

llvm-svn: 182896
2013-05-30 00:18:44 +00:00
Michael Gottesman
7fceea7dae Add a unittest for APFloat::getSmallest.
llvm-svn: 182894
2013-05-29 23:58:29 +00:00
Michael Gottesman
2a51955f08 [APInt] Implement tcDecrement as a counterpart to tcIncrement. This is for use in APFloat IEEE-754R 2008 nextUp/nextDown function.
rdar://13852078

llvm-svn: 182801
2013-05-28 19:50:20 +00:00
Eric Christopher
fae8590f51 Add to testsuite.
llvm-svn: 182693
2013-05-24 23:20:16 +00:00
Eric Christopher
ad99dcf36c ArrayRef-ize MD5 and clean up a few variable names.
Add a stringize method to make dumping a bit easier, and add a testcase
exercising a few different paths.

llvm-svn: 182692
2013-05-24 23:08:17 +00:00
Michael J. Spencer
02fa6608fd [Support] Remove Count{Leading,Trailing}Zeros_{32,64}.
llvm-svn: 182690
2013-05-24 22:58:37 +00:00
Michael J. Spencer
f5ff6c7f54 [Support][MathExtras] Fix literal type issues.
llvm-svn: 182679
2013-05-24 22:19:05 +00:00
Michael J. Spencer
dbf83dd515 [Support] Add type generic bit utilities to MathExtras.h
llvm-svn: 182667
2013-05-24 20:29:47 +00:00
Filip Pizlo
26d10a1d63 Expose the RTDyldMemoryManager through the C API. This allows clients of
the C API to provide their own way of allocating JIT memory (both code 
and data) and finalizing memory permissions (page protections, cache 
flush).

llvm-svn: 182448
2013-05-22 02:46:43 +00:00
Filip Pizlo
40c1832484 Roll out r182407 and r182408 because they broke builds.
llvm-svn: 182409
2013-05-21 20:03:01 +00:00
Filip Pizlo
46c8b4222c Expose the RTDyldMemoryManager through the C API. This allows clients of
the C API to provide their own way of allocating JIT memory (both code 
and data) and finalizing memory permissions (page protections, cache 
flush).

llvm-svn: 182408
2013-05-21 20:00:56 +00:00
Ulrich Weigand
ec9f537092 Alternative fix for problem addressed in r182233
Revision r182233 partially reverted the change in r181200 to simplify
JIT unif test #ifdefs, because that change caused a link error on some
host operating systems where the export list requires the following
symbols to be defined:

 JITTest_AvailableExternallyFunction
 JITTest_AvailableExternallyGlobal

As discussed on the list, the commit reverts r182233 (and re-installs
the full r181200 change), and instead fixes the link problem by moving
those two symbols to the top of the file and unconditionally defining
them.

llvm-svn: 182367
2013-05-21 10:30:59 +00:00
Bob Wilson
de1f36eea4 Partially revert change in r181200 that tried to simplify JIT unit test #ifdefs.
The export list for this test requires the following symbols to be available:
  JITTest_AvailableExternallyFunction
  JITTest_AvailableExternallyGlobal
The change in r181200 commented them out, which caused the test to fail to
link, at least on Darwin. I have only reverted the change for arm, since I
can't test the other targets and since it sounds like that change was fixing
real problems for those other targets. It should be possible to rearrange the
code to keep those definitions outside the #ifdefs, but that should be done by
someone who can reproduce the problems that r181200 was trying to fix.

llvm-svn: 182233
2013-05-20 06:13:09 +00:00
Renato Golin
56e43f179a SubArch support in MCJIT unittest
llvm-svn: 182220
2013-05-19 20:10:10 +00:00
Tim Northover
04eba4a59a AArch64: enable MCJIT unittests
llvm-svn: 182217
2013-05-19 19:44:56 +00:00