Chandler Carruth
bc3e8a7c93
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.
llvm-svn: 108248
2010-07-13 17:28:05 +00:00
Bill Wendling
9a2652bc8a
Use non-bool values for .count.
...
llvm-svn: 108048
2010-07-10 18:56:35 +00:00
Daniel Dunbar
579ba2ac42
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.
llvm-svn: 105612
2010-06-08 16:21:22 +00:00
Benjamin Kramer
7cd082a7a3
Disable pthread support in googletest if llvm was configured without threads.
...
llvm-svn: 105390
2010-06-03 15:17:04 +00:00
Benjamin Kramer
1add5f378d
Turns out gtest still prefers the system <tr1/tuple> over it's own
...
implementation. Force the internal one to unbreak clang selfhost on linux.
llvm-svn: 105386
2010-06-03 07:51:58 +00:00
Benjamin Kramer
9cb0274182
Update Readme and Makefiles for the new gtest.
...
llvm-svn: 105355
2010-06-02 22:02:57 +00:00
Jakob Stoklund Olesen
d1d7ed63ff
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, ...
llvm-svn: 104745
2010-05-26 21:47:28 +00:00
Daniel Dunbar
2842f25625
Fix const ilist_node::get{Prev,Next}Node() to actually compile. Picky, picky.
...
llvm-svn: 103723
2010-05-13 18:35:02 +00:00
Daniel Dunbar
959ae59997
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.
llvm-svn: 103647
2010-05-12 21:35:19 +00:00
Dan Gohman
b74155db1e
Update BitVectorTest.cpp to stay in sync with SmallBitVectorTest.cpp,
...
and fix a bug in BitVector's reference proxy class which this exposed.
llvm-svn: 102768
2010-04-30 20:50:28 +00:00
Benjamin Kramer
2073fcac2d
SmallBitVector: Rework find_first/find_next and tweak test to test them (at least on 64 bit platforms).
...
llvm-svn: 102712
2010-04-30 13:40:27 +00:00
Benjamin Kramer
e2a98b1e90
Implement a read/write operator[] for SmallBitVector with a proxy class.
...
llvm-svn: 102709
2010-04-30 12:29:39 +00:00
Chris Lattner
f58e8c0846
silence some unused-value warnings.
...
llvm-svn: 101689
2010-04-18 03:28:20 +00:00
Chris Lattner
4422d31b84
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.
llvm-svn: 101558
2010-04-16 22:42:17 +00:00
Benjamin Kramer
5d8eb779d5
Update unittest for allocator laziness.
...
llvm-svn: 101131
2010-04-13 15:01:26 +00:00
Chris Lattner
802e1088de
update unit test for api change.
...
llvm-svn: 100486
2010-04-05 22:49:48 +00:00
Dan Gohman
42e77df78c
Fix SmallVector's insert to handle non-random-access iterators.
...
llvm-svn: 99633
2010-03-26 18:53:37 +00:00
Gabor Greif
a9d0ef1e45
another one
...
llvm-svn: 98850
2010-03-18 18:59:08 +00:00
Dan Gohman
ed4c2eb7bf
Make this test more lenient; with SmallVector now using actually
...
aligned storage, the capacity may be more than what is explicitly
requested.
llvm-svn: 98846
2010-03-18 18:47:50 +00:00
Gabor Greif
6221720599
feedback from Nick
...
llvm-svn: 98761
2010-03-17 19:27:31 +00:00
Jeffrey Yasskin
b5cd01335b
Fix death tests in -Asserts builds.
...
llvm-svn: 98701
2010-03-17 01:18:45 +00:00
Gabor Greif
e52f398e3e
more BranchInst tests
...
llvm-svn: 98634
2010-03-16 15:53:58 +00:00
Gabor Greif
c377afce8e
add BranchInst tests
...
llvm-svn: 98632
2010-03-16 15:26:09 +00:00
Gabor Greif
421dd12853
appease valgrind testers
...
llvm-svn: 98628
2010-03-16 12:32:03 +00:00
Gabor Greif
86ca5493f7
add single return tests
...
llvm-svn: 98625
2010-03-16 11:24:53 +00:00
Gabor Greif
35a9b8baeb
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.
llvm-svn: 98624
2010-03-16 10:59:48 +00:00
Gabor Greif
155803840b
begin humbly with a repro of PR6589
...
llvm-svn: 98623
2010-03-16 09:55:46 +00:00
Nick Lewycky
84189ab22b
Teach this test not to leak. Also, clean up all the cast<BinaryOperator> cruft.
...
llvm-svn: 98446
2010-03-13 19:58:26 +00:00
Jeffrey Yasskin
61e710c2fd
Remove the last memory leak from the VMCore unit tests.
...
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98414
2010-03-13 02:15:08 +00:00
Jeffrey Yasskin
3d73d1a73c
Remove a memory leak from MetadataTest.
...
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98412
2010-03-13 01:39:20 +00:00
Jeffrey Yasskin
5a952b1339
Remove a memory leak from VerifierTest.
...
Tested: valgrind --leak-check=full unittests/VMCore/Debug/VMCoreTests
llvm-svn: 98411
2010-03-13 01:34:56 +00:00
Chandler Carruth
28d5f76f85
Consolidate GoogleTest make options and duplicate them to its own makefile.
...
llvm-svn: 98074
2010-03-09 19:24:49 +00:00
Jeffrey Yasskin
bd8a759589
Stop leaking MDStrings.
...
llvm-svn: 97763
2010-03-04 23:24:19 +00:00
Jeffrey Yasskin
c3b7d1edfa
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.
llvm-svn: 97737
2010-03-04 19:45:09 +00:00
Jeffrey Yasskin
391aad6327
Fix PR5291, in which a SmallPtrSet iterator was held across an insertion into
...
the set.
llvm-svn: 97720
2010-03-04 06:50:01 +00:00
Dan Gohman
01b443fdd3
Spelling fixes.
...
llvm-svn: 97454
2010-03-01 17:51:02 +00:00
John McCall
dcb9a7ad3d
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.
llvm-svn: 97364
2010-02-28 02:51:25 +00:00
John McCall
b42cc681ba
Make APFloat's string-parsing routines a bit safer against very large exponents.
...
llvm-svn: 97278
2010-02-26 22:20:41 +00:00
Jeffrey Yasskin
6b718f73a5
Try r96559 for the third time. This time the shared library is only built if
...
--enable-shared is passed to configure.
llvm-svn: 97119
2010-02-25 06:34:33 +00:00
Jeffrey Yasskin
15983e57d6
Roll back r96959 again.
...
llvm-svn: 96981
2010-02-23 20:53:37 +00:00
Jeffrey Yasskin
3ac46ccdff
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.
llvm-svn: 96959
2010-02-23 18:10:07 +00:00
Jeffrey Yasskin
c451027db9
Roll back the shared library, r96559. It broke two darwins and arm, mysteriously.
...
llvm-svn: 96569
2010-02-18 04:43:02 +00:00
Jeffrey Yasskin
f750fefaf8
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.
llvm-svn: 96559
2010-02-18 02:36:02 +00:00
Daniel Dunbar
eb85711e43
Add Regex::sub, for doing regular expression substitution with backreferences.
...
llvm-svn: 96503
2010-02-17 20:08:42 +00:00
Nick Lewycky
1d9a8159df
Teach the verifier to check the condition on a branch and ensure that it has
...
'i1' type.
llvm-svn: 96282
2010-02-15 22:09:09 +00:00
Jeffrey Yasskin
00ea4a36d6
Fix (harmless) memory leak found by memcheck.
...
llvm-svn: 95862
2010-02-11 07:16:13 +00:00
Jeffrey Yasskin
c660b23075
Fix some of the memcheck errors found in the JIT unittests.
...
llvm-svn: 95856
2010-02-11 06:41:30 +00:00
Jeffrey Yasskin
e0913883b7
Make it possible to create multiple JIT instances at the same time, by removing
...
the global TheJIT and TheJITResolver variables. Lazy compilation is supported
by a global map from a stub address to the JITResolver that knows how to
compile it.
Patch by Olivier Meurant!
llvm-svn: 95837
2010-02-11 01:07:39 +00:00
Benjamin Kramer
4b86e9b7a6
Silence GCC warnings.
...
llvm-svn: 95779
2010-02-10 13:34:02 +00:00
Dan Gohman
e69b99baaf
Implement operators |=, &=, and ^= for SmallBitVector, and remove the
...
restriction in BitVector for |= and ^= that the operand must be the
same length.
llvm-svn: 95768
2010-02-10 05:54:04 +00:00