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

727 Commits

Author SHA1 Message Date
Chandler Carruth
5286042938 Switch LLVM_USE_RVALUE_REFERENCES to LLVM_HAS_RVALUE_REFERENCES.
Rationale:
1) This was the name in the comment block. ;]
2) It matches Clang's __has_feature naming convention.
3) It matches other compiler-feature-test conventions.

Sorry for the noise. =]

I've also switch the comment block to use a \brief tag and not duplicate
the name.

llvm-svn: 168996
2012-11-30 11:45:22 +00:00
Michael Ilseman
d71b8c4e64 copyFastMathFlags utility and test case
llvm-svn: 168943
2012-11-29 21:25:12 +00:00
Michael Ilseman
19c9ae38cf Whoops, fixed bad merge
llvm-svn: 168816
2012-11-28 21:21:18 +00:00
Michael Ilseman
8ff81910ee Fixed bad test case
llvm-svn: 168815
2012-11-28 21:19:52 +00:00
Michael Ilseman
1349abeb09 Fast-math: IRBuilder test for creating instructions with fast-math flags
llvm-svn: 168814
2012-11-28 21:17:34 +00:00
Eli Bendersky
09ca9737c2 Add backreference matching capabilities to Support/Regex, with
appropriate unit tests. This change in itself is not expected to
affect any functionality at this point, but it will serve as a
stepping stone to improve FileCheck's variable matching capabilities.

Luckily, our regex implementation already supports backreferences,
although a bit of hacking is required to enable it. It supports both
Basic Regular Expressions (BREs) and Extended Regular Expressions
(EREs), without supporting backrefs for EREs, following POSIX strictly
in this respect. And EREs is what we actually use (rightly). This is
contrary to many implementations (including the default on Linux) of
POSIX regexes, that do allow backrefs in EREs.

Adding backref support to our EREs is a very simple change in the
regcomp parsing code. I fail to think of significant cases where it
would clash with existing things, and can bring more versatility to
the regexes we write. There's always the danger of a backref in a
specially crafted regex causing exponential matching times, but since
we mainly use them for testing purposes I don't think it's a big
problem. [it can also be placed behind a flag specific to FileCheck,
if needed].

For more details, see:

* http://lists.cs.uiuc.edu/pipermail/llvmdev/2012-November/055840.html
* http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121126/156878.html

llvm-svn: 168802
2012-11-28 19:00:02 +00:00
Andrew Kaylor
ca8d63b46f Moving SectionMemoryManager into RuntimeDyld and adding unit tests for it.
The SectionMemoryManager now supports (and requires) applying section-specific page permissions.  Clients using this memory manager must call either MCJIT::finalizeObject() or SectionMemoryManager::applyPermissions() before executing JITed code.

See r168718 for changes from the previous implementation.

llvm-svn: 168721
2012-11-27 19:42:02 +00:00
Andrew Kaylor
e6c3b1a551 Implementing page permission setting in MCJIT unit test SectionMemoryManager.cpp
This commit is primarily here for the revision history.  I'm about to move the SectionMemoryManager into the RuntimeDyld library, but I wanted to check the changes in here so people could see the differences in the updated implementation.

llvm-svn: 168718
2012-11-27 19:00:17 +00:00
Sean Silva
e0e760dc93 Allow using MemoryBuffers with yaml::Stream directly.
The rationale is to get YAML filenames in diagnostics from
yaml::Stream::printError -- currently the filename is hard-coded as
"YAML" because there's no buffer information available.

Patch by Kim Gräsman!

llvm-svn: 168341
2012-11-19 23:21:47 +00:00
James Molloy
0915ec1560 Add a new function to ConstantExpr - getAsInstruction. This returns its Instruction* corollary, which may be useful if a user
wishes to transform a ConstantExpr so that one of its operands is no longer constant.

llvm-svn: 168262
2012-11-17 17:56:30 +00:00
Joe Abbey
c5c8f1686e Removing utf-8 smart quote and trailing whitespace
llvm-svn: 168253
2012-11-17 05:13:16 +00:00
Joe Abbey
454c19f9ee Suppressing the 'direct base ‘{anonymous}::S1’ inaccessible in ‘{anonymous}::D9’
due to ambiguity' warning.

llvm-svn: 168251
2012-11-17 04:54:22 +00:00
Andrew Kaylor
bf5ce8a2b0 Interface changes to allow RuntimeDyld memory managers to set memory permissions after an object has been loaded.
llvm-svn: 168114
2012-11-15 23:50:01 +00:00
Jakub Staszak
14a889a054 Remove DOS line endings.
llvm-svn: 167968
2012-11-14 20:18:34 +00:00
Gabor Greif
e410d28c25 do not play preprocessor tricks with 'private', use public interfaces instead; this appeases the VC++ buildbots
llvm-svn: 167724
2012-11-12 13:34:59 +00:00
Gabor Greif
269fe89c77 add unit test for waymarking algorithm (Use::getUser)
llvm-svn: 167720
2012-11-12 10:01:17 +00:00
Benjamin Kramer
20d52f752f Provide definitions for all functions.
ICC refuses to compile a class in an anonymous namespace if some functions
aren't defined. Fixes PR13477.

llvm-svn: 167676
2012-11-10 16:10:16 +00:00
Benjamin Kramer
9647e19de7 Drop the limitation to IEEE floating point types from the fdiv of pow2 -> fmul transform.
This is safe for x87 long doubles and ppc double doubles too.

llvm-svn: 167582
2012-11-08 13:58:10 +00:00
Amara Emerson
efb5b4e564 MCJIT unit test: add calls to ensure that instruction caches are properly invalidated before code execution.
llvm-svn: 167146
2012-10-31 17:44:16 +00:00
Amara Emerson
a42e54ebd4 Port lli bug fix from r166920 to MCJIT unit test.
llvm-svn: 167145
2012-10-31 17:41:51 +00:00
Amara Emerson
6abdedd25e Commit access test.
llvm-svn: 167144
2012-10-31 17:35:12 +00:00
Ulrich Weigand
d3685b18a9 Disable all old-JIT unit tests on PowerPC.
These tests were all failing since the old JIT doesn't work
for PowerPC (any more), and there are no plans to attempt to
fix it again (instead, work focuses on MCJIT).

llvm-svn: 167133
2012-10-31 16:18:02 +00:00
Evgeniy Stepanov
00759553de Add IRBuilderBase::getIntPtrTy.
llvm-svn: 167111
2012-10-31 09:50:01 +00:00
Duncan Sands
bce56286fb Fix isEliminableCastPair to work correctly in the presence of pointers
with different sizes.

llvm-svn: 167018
2012-10-30 16:03:32 +00:00
Ulrich Weigand
c504e37126 Implement arithmetic on APFloat with PPCDoubleDouble semantics by
treating it as if it were an IEEE floating-point type with 106-bit
mantissa.

This makes compile-time arithmetic on "long double" for PowerPC
in clang (in particular parsing of floating point constants)
work, and fixes all "long double" related failures in the test
suite.

llvm-svn: 166951
2012-10-29 18:09:01 +00:00
Pete Cooper
ccb3ee0d18 Fixed bug in SmallDenseMap where it wouldn't leave enough space for an empty bucket if the number of values was exactly equal to the small capacity. This led to an infinite loop when finding a non-existent element
llvm-svn: 166492
2012-10-23 18:47:35 +00:00
Bob Wilson
62af1bf601 Use an export list when building JIT unittests. <rdar://problem/12473675>
When building with LTO, the internalize pass is hiding some global symbols
that are necessary for the JIT unittests. It seems like that may be a bug in
LTO to do that by default, but until that gets fixed, this change makes sure
that we export the necessary symbols for the tests to pass.

llvm-svn: 166220
2012-10-18 20:25:36 +00:00
Bill Wendling
4314405e52 Marked this variable as 'used' so that LTO doesn't get rid of it.
llvm-svn: 166092
2012-10-17 08:08:06 +00:00
Owen Anderson
cb8d1f6815 Fix a bug in the set(I,E)/reset(I,E) methods that I recently added. The boundary condition for checking if I and E were in the same word were incorrect, and, beyond that, the mask computation was not using a wide enough constant.
llvm-svn: 166015
2012-10-16 06:04:27 +00:00
Owen Anderson
e678a60cc8 Add range-based set()/reset() to BitVector. These allow fast setting/resetting of ranges of bits, particularly useful when dealing with very large BitVector's.
llvm-svn: 165984
2012-10-15 22:05:27 +00:00
Benjamin Kramer
e80e7ac945 Update CMake build.
llvm-svn: 165908
2012-10-14 16:06:09 +00:00
Benjamin Kramer
25522ac16c Fix a typo that made ImmutableMap::getMaxElement() useless.
Add a basic unit test for ImmutableMap. Found by inspection.

llvm-svn: 165907
2012-10-14 15:56:39 +00:00
Duncan Sands
fe6c41af6b Add powerpc-ibm-aix to Triple. Patch by Kai.
llvm-svn: 165792
2012-10-12 11:08:57 +00:00
NAKAMURA Takumi
bf43385b69 JITTest.cpp: Use LLVM_ATTRIBUTE_USED, rather than __attribute__ directly!
llvm-svn: 165790
2012-10-12 08:09:29 +00:00
Bill Wendling
27bc2dc4ce Mark function as 'used' so that LTO doesn't try to get rid of it.
llvm-svn: 165781
2012-10-12 01:44:08 +00:00
NAKAMURA Takumi
cd0b92f629 Revert r165777, "Mark function as 'used' so that LTO doesn't try to get rid of it."
llvm-svn: 165780
2012-10-12 01:34:07 +00:00
Bill Wendling
e069473ee5 Mark function as 'used' so that LTO doesn't try to get rid of it.
llvm-svn: 165777
2012-10-12 01:15:17 +00:00
Sean Silva
356281d8ad Casting.h: Automatically handle isa<Base>(Derived).
Additionally, all such cases are handled with no dynamic check.

All `classof()` of the form

    class Foo {
      [...]
      static bool classof(const Bar *) { return true; }
      [...]
    }

where Foo is an ancestor of Bar are no longer necessary.
Don't write them!

Note: The exact test is `is_base_of<Foo, Bar>`, which is non-strict, so
that Foo is considered an ancestor of itself.

This leads to the following rule of thumb for LLVM-style RTTI:

    The argument type of `classof()` should be a strict ancestor.

For more information about implementing LLVM-style RTTI, see
docs/HowToSetUpLLVMStyleRTTI.rst

llvm-svn: 165765
2012-10-11 23:30:40 +00:00
Micah Villmow
fe3338a7eb Move TargetData to DataLayout.
llvm-svn: 165403
2012-10-08 16:39:34 +00:00
James Molloy
6addd26621 Some regression tests which are testing the old jit and are exercising functionality which is both known to be broken and not expected to be fixed in the old jit. To remove these from the regression test output, I've marked them XFAIL (for lit tests) and ifdef'd them out (unit tests). These modifications remove the last long-standing regression test failures from the buildbots (though updating the triple to reflect new ubuntu configuration has temporarily caused some new failures). Tested on x86-64 and ARM Linux.
Patch by David Tweed!

llvm-svn: 165390
2012-10-08 13:06:30 +00:00
Andrew Kaylor
17202594ad Adding MCJIT and MemoryBuffer unit tests
Patch by Daniel Malea.

llvm-svn: 165246
2012-10-04 20:29:44 +00:00
Nick Kledzik
df402d7821 Use unsigned long long instead of uin64_t for OS where that matters.
llvm-svn: 165147
2012-10-03 19:27:25 +00:00
Benjamin Kramer
c4738f8eac Don't call getAsUnsignedInteger directly, it fails to compile if uint64_t is not "unsigned long long".
while there add more test cases.

llvm-svn: 165140
2012-10-03 18:54:36 +00:00
Nick Kledzik
9057d55506 Add getAsUnsignedInteger test case that checks that known bad values are rejected
llvm-svn: 165136
2012-10-03 18:15:27 +00:00
Andrew Kaylor
6b7788b0c5 Removing dependency on third party library for Intel JIT event support.
Patch committed on behalf of Kirill Uhanov

llvm-svn: 164831
2012-09-28 17:35:20 +00:00
Andrew Kaylor
d4fd8dc580 Fix of hang during Intel JIT profiling
Committed on behalf of Kirill Uhanov

llvm-svn: 164736
2012-09-26 23:43:56 +00:00
Benjamin Kramer
9cd31639d0 Remove unneeded and invalid SetInsertPoint calls from unittest.
BB->end() returns a sentinel value that is not a legal insert point.

llvm-svn: 164699
2012-09-26 15:16:05 +00:00
Benjamin Kramer
6b5f441814 APFloat::roundToIntegral: Special values don't keep the exponent value up to date, don't rely on it.
Add a couple of unit tests for special floats. Fixes 13929, found by MemorySanitizer.

llvm-svn: 164698
2012-09-26 14:06:58 +00:00
Michael Ilseman
3e79cb01e7 Expansions for u/srem, using the udiv expansion. More unit tests for udiv and u/srem.
Fixed issue with Release build.

llvm-svn: 164654
2012-09-26 01:55:01 +00:00
Chad Rosier
28c95ff726 Revert r164614 to appease the buildbots.
llvm-svn: 164627
2012-09-25 19:57:20 +00:00