Commit Graph

404 Commits

Author SHA1 Message Date
Oscar Fuentes
da9756365b Document LLVM_BUILD_TESTS, LLVM_INCLUDE_TESTS. New convenience target
UnitTests for building all the unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117545 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-28 14:38:35 +00:00
Chandler Carruth
100c267249 Switch attribute macros to use 'LLVM_' as a prefix. We retain the old names
until other LLVM projects using these are cleaned up.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117200 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-23 08:10:43 +00:00
Michael J. Spencer
5e0b2bf657 Support: Add Endian.h
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117057 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-21 20:28:21 +00:00
Michael J. Spencer
8a806aed4b unittests: Use the correct defines and global variables when building on CMake.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116834 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 18:04:19 +00:00
Owen Anderson
081c34b725 Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which
must be called in the pass's constructor.  This function uses static dependency declarations to recursively initialize
the pass's dependencies.

Clients that only create passes through the createFooPass() APIs will require no changes.  Clients that want to use the
CommandLine options for passes will need to manually call the appropriate initialization functions in PassInitialization.h
before parsing commandline arguments.

I have tested this with all standard configurations of clang and llvm-gcc on Darwin.  It is possible that there are problems
with the static dependencies that will only be visible with non-standard options.  If you encounter any crash in pass
registration/creation, please send the testcase to me directly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116820 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-19 17:21:58 +00:00
Michael J. Spencer
e58d72009a Unit Tests: Missed this error. MSVC and clang didn't complain.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116252 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 22:04:38 +00:00
Michael J. Spencer
4c099b8724 System: Add SwapByteOrder and update Support/MathExtras.h to use it.
This time correctly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116247 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 21:56:16 +00:00
Michael J. Spencer
af72684eea Revert "System: Add SwapByteOrder and update Support/MathExtras.h to use it."
This reverts commit 116234.

It compiled just fine with MSVC and clang...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116242 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 21:39:24 +00:00
Michael J. Spencer
12647eb3f5 Reduce dpendencies for SupportTests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 21:22:34 +00:00
Michael J. Spencer
5031e0d977 System: Add SwapByteOrder and update Support/MathExtras.h to use it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-11 21:22:22 +00:00
Francois Pichet
2e0affb428 static_cast to long, otherwise MSVC 2008 won't compile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-04 12:31:20 +00:00
Nick Lewycky
f2d7b7c879 Make ConstantRange::makeICmpRegion handle all the edge cases properly. This
also fixes PR8250.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114972 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-28 18:18:36 +00:00
Douglas Gregor
c576d3d7fe Remove reference to nonexistent test in CMake makefile for unit tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114835 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 16:40:43 +00:00
Dan Gohman
520163c98b Move ValueMapTest from ADT to VMCore so that ADT doesn't need
to link in "core".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114831 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 15:50:08 +00:00
Dan Gohman
fab4c9e9df Add an all() method to BitVector, for testing whether all bits are set.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114830 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-27 15:48:37 +00:00
Oscar Fuentes
066de857f8 Reverting "CMake: Don't include tools, unittets, or examples as
available targets unless LLVM_INCLUDE_X is ON. LLVM_BUILD_X implies
LLVM_INCLUDE_X"

It breaks the configuration phase when cmake is invoked without
parameters, it is too complex for the purpose and introduces an
incovenience for the user (as both LLVM_BUILD_X and LLVM_INCLUDE_X
must set to OFF for not including X on the build)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114795 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-25 20:25:25 +00:00
Michael J. Spencer
4b794c9a99 CMake: Don't include tools, unittets, or examples as available targets
unless LLVM_INCLUDE_X is ON. LLVM_BUILD_X implies LLVM_INCLUDE_X

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114747 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-24 19:10:51 +00:00
Michael J. Spencer
ddfce8f95b unittests: Support Windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114727 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-24 09:01:34 +00:00
Michael J. Spencer
ee6944f4ab CMake: Build unittests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114725 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-24 09:01:13 +00:00
Duncan Sands
5754a45256 Add better support for environment portion of triple. Original patch by
Cameron Esfahani, tweaked to use array_lengthof.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@114073 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-16 08:25:48 +00:00
Jakob Stoklund Olesen
bc9c36bb7c Attempt to unbreak the FreeBSD buildbot by XFAILing a unit test that seems to be
miscompiled by the system gcc-4.2.1

The test remains enabled for the second-stage test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113824 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-14 00:51:58 +00:00
Nick Lewycky
32cda119ef Add a new isSignWrappedSet() method to ConstantRange.
Fix zeroExtend and signExtend to support empty sets, and to return the smallest
possible result set which contains the extension of each element in their
inputs. For example zext i8 [100, 10) to i16 is now [0, 256), not i16 [100, 10)
which contains 63446 members.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113187 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-06 23:52:49 +00:00
Chris Lattner
a51d89ce16 zap dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112708 91177308-0d34-0410-b5e6-96231b3b80d8
2010-09-01 15:44:05 +00:00
Benjamin Kramer
837bccd052 StringRef::compare_numeric also differed from StringRef::compare for characters > 127.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112189 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 15:25:35 +00:00
Benjamin Kramer
0043e35b82 Do unsigned char comparisons in StringRef::compare_lower to be more consistent with compare in corner cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112185 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-26 14:21:08 +00:00
Bill Wendling
d400850101 Silence 'unused' warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111539 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-19 18:52:02 +00:00
Anton Korobeynikov
462aaeb178 This patch enables "make unittests" on enable-shared/mingw.
Patch by Takumi Nakamura!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111270 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-17 19:34:40 +00:00
Duncan Sands
335db22392 Add a 'normalize' method to the Triple class, which takes a mucked up
target triple and straightens it out.  This does less than gcc's script
config.sub, for example it turns i386-mingw32 into i386--mingw32 not
i386-pc-mingw32, but it does a decent job of turning funky triples into
something that the rest of the Triple class can understand.  The plan
is to use this to canonicalize triple's when they are first provided
by users, and have the rest of LLVM only deal with canonical triples.
Once this is done the special case workarounds in the Triple constructor
can be removed, making the class more regular and easier to use.  The
comments and unittests for the Triple class are already adjusted in this
patch appropriately for this brave new world of increased uniformity.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110909 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-12 11:31:39 +00:00
Nick Lewycky
7f9ef4bb51 Clean up ConstantRange a bit:
- remove ashr which never worked.
 - fix lshr and shl and add tests.
 - remove dead function "intersect1Wrapped".
 - add a new sub method to subtract ranges, with test.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110861 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-11 22:04:36 +00:00
Duncan Sands
3850f5ceda Remove the ValueMap copy constructor. It's not used anywhere,
and removing it catches the mistake of passing a ValueMap by
copy rather than by reference.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110549 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-08 12:57:48 +00:00
Owen Anderson
9773e45a1e Add an inverse() method to ConstantRange.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110504 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-07 05:47:46 +00:00
Owen Anderson
90c579de5a Reapply r110396, with fixes to appease the Linux buildbot gods.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 18:33:48 +00:00
Owen Anderson
1f74590e9d Revert r110396 to fix buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-06 00:23:35 +00:00
Owen Anderson
9ccaf53ada Don't use PassInfo* as a type identifier for passes. Instead, use the address of the static
ID member as the sole unique type identifier.  Clean up APIs related to this change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-05 23:42:04 +00:00
Dan Gohman
ab37f50838 Make SCEVUnknown a CallbackVH, so that it can be notified directly
of Value deletions and RAUWs, instead of relying on ScalarEvolution's
Scalars map being notified, as that's complicated at best, and
insufficient in general.

This means SCEVUnknown needs a non-trivial destructor, so introduce
a mechanism to allow ScalarEvolution to locate all the SCEVUnknowns.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110086 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 23:49:30 +00:00
Oscar Fuentes
ee56c42168 Prefix next' iterator operation with llvm::'.
Fixes potential ambiguity problems on VS 2010.

Patch by nobled!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110029 91177308-0d34-0410-b5e6-96231b3b80d8
2010-08-02 06:00:15 +00:00
Duncan Sands
bcc2393369 Fix the ValueMap copy constructor. The issue is that the map keys are value
handles with a pointer to the containing map.  When a map is copied, these
pointers need to be corrected to point to the new map.  If not, then consider
the case of a map M1 which maps a value V to something.  Create a copy M2 of
M1.  At this point there are two value handles on V, one representing V as a
key in M1, the other representing V as a key in M2.  But both value handles
point to M1 as the containing map.  Now delete V.  The value handles remove
themselves from their containing map (which destroys them), but only the first
value handle is successful: the second one cannot remove itself from M1 as
(once the first one has removed itself) there is nothing there to remove; it
is therefore not destroyed.  This causes an assertion failure "All references
to V were not removed?".


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109851 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-30 05:49:32 +00:00
Bob Wilson
a8ebd2e64f Remove the temporary hack, now that the llvm-i686-linux buildbot has
completed a successful build.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109815 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 22:55:29 +00:00
Bob Wilson
575be08e8a Fix the temporary hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109810 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 22:33:35 +00:00
Daniel Dunbar
0e2b7de10f Temporary hack to ensure stale Analysis dir is cleaned up on llvm-i686-linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109809 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 22:18:50 +00:00
Eric Christopher
e6cbfa6b09 Speculatively revert r109705 since it seems to be causing some build bot
angst.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109718 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 01:25:38 +00:00
Dan Gohman
c6743207e2 Factor out some of the code for updating old SCEVUnknown values, and
extend it to handle the case where multiple RAUWs affect a single
SCEVUnknown.

Add a ScalarEvolution unittest to test for this situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109705 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-29 00:17:55 +00:00
Chris Lattner
ae7b8b212a missed a use of SizeRequired.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:34:55 +00:00
Chris Lattner
456fdaf0ce instead of migrating it to the MC instruction encoder, just
rip out the implementation of X86InstrInfo::GetInstSizeInBytes.
The code being ripped out just implemented a copy and hacked up
version of the (old) instruction encoder, and is buggy and 
terrible in other ways.  Since "GetInstSizeInBytes" is really 
only there to support the JIT's "NeedsExactSize" hook (which
noone is using), just rip out the code.  I will rip out the
NeedsExactSize hook next.

This resolves rdar://7617809 - switch X86InstrInfo::GetInstSizeInBytes to use X86MCCodeEmitter



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109149 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 21:05:13 +00:00
Gabor Greif
f06eb3719a add dyn_cast_or_null tests, exclude invalid dyn_cast test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109111 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 15:37:20 +00:00
Gabor Greif
46a35015f5 tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109110 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 15:28:30 +00:00
Gabor Greif
d159467ad6 add dyn_cast tests and beef up others a bit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109109 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-22 15:24:48 +00:00
Dan Gohman
17aa92c92a Make NamedMDNode not be a subclass of Value, and simplify the interface
for creating and populating NamedMDNodes.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109061 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-21 23:38:33 +00:00
Gabor Greif
b3c90d96bd tidy up
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108889 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 19:35:55 +00:00
Gabor Greif
e8950977a5 migrate essentially everything from under #ifdef DEBUG_CAST_OPERATORS into this file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108864 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 17:06:28 +00:00
Gabor Greif
08993c03ab extend to cast<> and cast_or_null<> tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108854 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:51:18 +00:00
Gabor Greif
af8e2ef649 isa<> tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108851 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:38:12 +00:00
Gabor Greif
ee57dae3d8 initial checkin for unittest to exercise Support/Casting.h
this is still minimal on purpose, but I plan to migrate the ugly
hack under #ifdef DEBUG_CAST_OPERATORS into this file

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108849 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-20 16:32:20 +00:00
Chris Lattner
e332553eae unit test to go along with r108610
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108611 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-17 06:14:03 +00:00
Chandler Carruth
48b17fa5be Switch from EXPECT_EQ({true,false, ...) to the more canonical
EXPECT_{TRUE,FALSE}(...) macros. This also prevents suprious warnings about
bool-to-pointer conversion that occurs withit EXPECT_EQ.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108248 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-13 17:28:05 +00:00
Bill Wendling
3732396fe1 Use non-bool values for .count.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108048 91177308-0d34-0410-b5e6-96231b3b80d8
2010-07-10 18:56:35 +00:00
Daniel Dunbar
73c6031a25 ADT: Add DAGDeltaAlgorithm, which is a DAG minimization algorithm built on top of the standard 'delta debugging' algorithm.
- This can give substantial speedups in the delta process for inputs we can construct dependency information for.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105612 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-08 16:21:22 +00:00
Benjamin Kramer
2e3f44eab2 Disable pthread support in googletest if llvm was configured without threads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105390 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-03 15:17:04 +00:00
Benjamin Kramer
8ef297e945 Turns out gtest still prefers the system <tr1/tuple> over it's own
implementation. Force the internal one to unbreak clang selfhost on linux.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105386 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-03 07:51:58 +00:00
Benjamin Kramer
4839d872fc Update Readme and Makefiles for the new gtest.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105355 91177308-0d34-0410-b5e6-96231b3b80d8
2010-06-02 22:02:57 +00:00
Jakob Stoklund Olesen
160a3bf74d Add StringRef::compare_numeric and use it to sort TableGen register records.
This means that our Registers are now ordered R7, R8, R9, R10, R12, ...
Not R1, R10, R11, R12, R2, R3, ...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104745 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-26 21:47:28 +00:00
Daniel Dunbar
f1fd2288f3 Fix const ilist_node::get{Prev,Next}Node() to actually compile. Picky, picky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103723 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-13 18:35:02 +00:00
Daniel Dunbar
aa81380353 ADT: Add ilist_node::get{Prev,Next}Node, which return the adjacent node or null.
- This provides a convenient alternative to using something llvm::prior or
   manual iterator access, for example::

    if (T *Prev = foo->getPrevNode())
      ...

   instead of::

     iterator it(foo);
     if (it != begin()) {
       --it;
       ... 
     }

 - Chris, please review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103647 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-12 21:35:19 +00:00
Dan Gohman
3f5e915652 Update BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp,
and fix a bug in BitVector's reference proxy class which this exposed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102768 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30 20:50:28 +00:00
Benjamin Kramer
6340722d17 SmallBitVector: Rework find_first/find_next and tweak test to test them (at least on 64 bit platforms).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102712 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30 13:40:27 +00:00
Benjamin Kramer
b252fbd179 Implement a read/write operator[] for SmallBitVector with a proxy class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102709 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-30 12:29:39 +00:00
Chris Lattner
a07cd90a2a silence some unused-value warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101689 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-18 03:28:20 +00:00
Chris Lattner
2decb22222 introduce a new CallGraphSCC class, and pass it around
to CallGraphSCCPass's instead of passing around a
std::vector<CallGraphNode*>.  No functionality change,
but now we have a much tidier interface.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101558 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-16 22:42:17 +00:00
Benjamin Kramer
f3a3b0fc0e Update unittest for allocator laziness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101131 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-13 15:01:26 +00:00
Chris Lattner
796e64b546 update unit test for api change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100486 91177308-0d34-0410-b5e6-96231b3b80d8
2010-04-05 22:49:48 +00:00
Dan Gohman
a7a33fd95f Fix SmallVector's insert to handle non-random-access iterators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99633 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-26 18:53:37 +00:00
Gabor Greif
fe7bb05ad1 another one
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98850 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 18:59:08 +00:00
Dan Gohman
5ffc72e7ce Make this test more lenient; with SmallVector now using actually
aligned storage, the capacity may be more than what is explicitly
requested.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98846 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-18 18:47:50 +00:00
Gabor Greif
f5bf7c52eb feedback from Nick
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98761 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 19:27:31 +00:00
Jeffrey Yasskin
b5f59f5cf0 Fix death tests in -Asserts builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98701 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-17 01:18:45 +00:00
Gabor Greif
abf657f7e6 more BranchInst tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98634 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 15:53:58 +00:00
Gabor Greif
d165e1a711 add BranchInst tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98632 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 15:26:09 +00:00
Gabor Greif
642c066906 appease valgrind testers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98628 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 12:32:03 +00:00
Gabor Greif
22385eb852 add single return tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98625 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 11:24:53 +00:00
Gabor Greif
138acfe353 fix PR6589
adjusted unittest

I have added some doxygen to OptionalOperandTraits,
so hopefully there will be no confusion in the future.

Incidentally OptionalOperandTraits is not used any more (IIUC),
but the obvious client would be BranchInstr, and I plan
to rearrange it that way.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98624 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 10:59:48 +00:00
Gabor Greif
5a7069a80f begin humbly with a repro of PR6589
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98623 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-16 09:55:46 +00:00
Nick Lewycky
06e59e738c Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98446 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 19:58:26 +00:00
Jeffrey Yasskin
241611570a Remove the last memory leak from the VMCore unit tests.
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98414 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 02:15:08 +00:00
Jeffrey Yasskin
9d0b3dda1e Remove a memory leak from MetadataTest.
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98412 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 01:39:20 +00:00
Jeffrey Yasskin
645a86f5fb Remove a memory leak from VerifierTest.
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-13 01:34:56 +00:00
Chandler Carruth
f10e43ee7e Consolidate GoogleTest make options and duplicate them to its own makefile.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98074 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-09 19:24:49 +00:00
Jeffrey Yasskin
e5790a432a Stop leaking MDStrings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97763 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 23:24:19 +00:00
Jeffrey Yasskin
39c75f2e90 Fix PR6360. It's easy for a stub's address to escape to user code, so we can't
just count references to it from JIT output to decide when to destroy it.  This
patch waits to destroy the JIT's memory of a stub until the Function it refers
to is destroyed.  External function stubs and GVIndirectSyms aren't destroyed
until the JIT itself is.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97737 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 19:45:09 +00:00
Jeffrey Yasskin
e57898ce55 Fix PR5291, in which a SmallPtrSet iterator was held across an insertion into
the set.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97720 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-04 06:50:01 +00:00
Dan Gohman
85f1968138 Spelling fixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97454 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-01 17:51:02 +00:00
John McCall
e12b73816b Teach APFloat how to create both QNaNs and SNaNs and with arbitrary-width
payloads.  APFloat's internal folding routines always make QNaNs now,
instead of sometimes making QNaNs and sometimes SNaNs depending on the
type.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97364 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-28 02:51:25 +00:00
John McCall
8b3f3307a2 Make APFloat's string-parsing routines a bit safer against very large exponents.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97278 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-26 22:20:41 +00:00
Jeffrey Yasskin
c90171961d Try r96559 for the third time. This time the shared library is only built if
--enable-shared is passed to configure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97119 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-25 06:34:33 +00:00
Jeffrey Yasskin
407fbdd161 Roll back r96959 again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96981 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 20:53:37 +00:00
Jeffrey Yasskin
ea6c39d417 Roll r96559 forward again, adding libLLVM-2.7svn.so to LLVM. This links 3 of
the examples shared to make sure the shared library keeps working.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96959 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-23 18:10:07 +00:00
Jeffrey Yasskin
2155d459a7 Roll back the shared library, r96559. It broke two darwins and arm, mysteriously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96569 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 04:43:02 +00:00
Jeffrey Yasskin
f6afae2f49 Add a shared library for LLVM, named libLLVM2.7svn.(so|dylib), and add an
--enable-shared configure flag to have the tools linked shared. (2.7svn is just
$(LLVMVersion) so it'll change to "2.7" in the release.)  Always link the
example programs shared to test that the shared library keeps working.

On my mac laptop, Debug libLLVM2.7svn.dylib is 39MB, and opt (for example) is
16M static vs 440K shared.

Two things are less than ideal here:
1) The library doesn't include any version information. Since we expect to break
the ABI with every release, this shouldn't be much of a problem. If we do
release a compatible 2.7.1, we may be able to hack its library to work with
binaries compiled against 2.7.0, or we can just ask them to recompile. I'm
hoping to get a real packaging expert to look at this for the 2.8 release.
2) llvm-config doesn't yet have an option to print link options for the shared
library. I'll add this as a subsequent patch.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96559 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-18 02:36:02 +00:00
Daniel Dunbar
d2a5c0d856 Add Regex::sub, for doing regular expression substitution with backreferences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96503 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-17 20:08:42 +00:00
Nick Lewycky
6a7cb63f6f Teach the verifier to check the condition on a branch and ensure that it has
'i1' type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96282 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-15 22:09:09 +00:00
Jeffrey Yasskin
d8735356a3 Fix (harmless) memory leak found by memcheck.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95862 91177308-0d34-0410-b5e6-96231b3b80d8
2010-02-11 07:16:13 +00:00