Commit Graph

727 Commits

Author SHA1 Message Date
Chandler Carruth f12e3a67db 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 05d3bf77a1 copyFastMathFlags utility and test case
llvm-svn: 168943
2012-11-29 21:25:12 +00:00
Michael Ilseman 37018f8322 Whoops, fixed bad merge
llvm-svn: 168816
2012-11-28 21:21:18 +00:00
Michael Ilseman 1833e000a3 Fixed bad test case
llvm-svn: 168815
2012-11-28 21:19:52 +00:00
Michael Ilseman 018530268d Fast-math: IRBuilder test for creating instructions with fast-math flags
llvm-svn: 168814
2012-11-28 21:17:34 +00:00
Eli Bendersky 10f22d7054 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 ab5ba51a6e 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 3e0f1fb7b2 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 aba8270dba 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 ce54568660 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 44d3bf2b2e Removing utf-8 smart quote and trailing whitespace
llvm-svn: 168253
2012-11-17 05:13:16 +00:00
Joe Abbey 035fc9aa9f 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 a342cb9613 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 0c4468b5e6 Remove DOS line endings.
llvm-svn: 167968
2012-11-14 20:18:34 +00:00
Gabor Greif ea5fa1004f 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 fea6a551a9 add unit test for waymarking algorithm (Use::getUser)
llvm-svn: 167720
2012-11-12 10:01:17 +00:00
Benjamin Kramer 933f41161d 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 08be41adbf 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 72b86293cb 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 eb7fb84a3e Port lli bug fix from r166920 to MCJIT unit test.
llvm-svn: 167145
2012-10-31 17:41:51 +00:00
Amara Emerson f270b82181 Commit access test.
llvm-svn: 167144
2012-10-31 17:35:12 +00:00
Ulrich Weigand 1caa6f9575 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 ef94169938 Add IRBuilderBase::getIntPtrTy.
llvm-svn: 167111
2012-10-31 09:50:01 +00:00
Duncan Sands e2395dc27b 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 d9f7e259aa 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 8ba353da39 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 0f295dec0d 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 003516b592 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 04b8daa970 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 6b7bdf88c9 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 b9a9273826 Update CMake build.
llvm-svn: 165908
2012-10-14 16:06:09 +00:00
Benjamin Kramer 43f2507fce 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 d5772de0eb Add powerpc-ibm-aix to Triple. Patch by Kai.
llvm-svn: 165792
2012-10-12 11:08:57 +00:00
NAKAMURA Takumi 2d1bd7cca7 JITTest.cpp: Use LLVM_ATTRIBUTE_USED, rather than __attribute__ directly!
llvm-svn: 165790
2012-10-12 08:09:29 +00:00
Bill Wendling 35ac231d7e 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 4668e3cd6a 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 408668a834 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 35dd8779fa 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 9cfc13d46c Move TargetData to DataLayout.
llvm-svn: 165403
2012-10-08 16:39:34 +00:00
James Molloy 0ae35af518 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 5e7d792689 Adding MCJIT and MemoryBuffer unit tests
Patch by Daniel Malea.

llvm-svn: 165246
2012-10-04 20:29:44 +00:00
Nick Kledzik 85a62b1a1d 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 d95ceff092 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 f8a75eef85 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 5808c7d828 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 c091ea33f0 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 576f5a10e6 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 c38fab2013 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 a398d4cfaf 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 88387f5332 Revert r164614 to appease the buildbots.
llvm-svn: 164627
2012-09-25 19:57:20 +00:00