Commit Graph

50650 Commits

Author SHA1 Message Date
Daniel Dunbar faea97193c Add min and max tests.
llvm-svn: 79454
2009-08-19 19:58:19 +00:00
Daniel Dunbar 03d4b9eac4 Add SmallString::str (which returns a StringRef); this is more efficient than
c_str().

llvm-svn: 79453
2009-08-19 19:57:55 +00:00
Benjamin Kramer 902ccf22b4 Remove SmallString::append_*int* unit tests.
llvm-svn: 79451
2009-08-19 19:41:05 +00:00
Daniel Dunbar 339d0cbdd1 Remove SmallString::append_*int* methods; how many copies of int -> str
conversion code do we really need?
 - S.append_uint(N) can be replaced with 'raw_svector_ostream(S) << N' which is
   somewhat slower due to the extra set up cost, but still plenty fast
   (especially if the svector set up cost can be amortized).

llvm-svn: 79450
2009-08-19 19:28:18 +00:00
Daniel Dunbar 948f82b8e4 Change ValueSymbolTable to use raw_svector_ostream for string concatenation.
llvm-svn: 79449
2009-08-19 19:22:52 +00:00
Bill Wendling 6c528bc7ae Make this test platform neutral.
llvm-svn: 79447
2009-08-19 18:51:45 +00:00
Daniel Dunbar e813cbaa21 Change raw_svector_ostream to reserve the input buffer if necessary, Ted was
right.
 - This class turns out to be much more convenient to use if we do this; clients
   can make sure the buffer is always big enough if they care (since our current
   idiom tends to be to use a SmallString<256> for the input to this we should
   generally be avoiding an unnecessary malloc).

Also, add a convenience raw_svector_ostream::str method which flushes the buffer
and returns a StringRef for the vector contents.

llvm-svn: 79446
2009-08-19 18:40:58 +00:00
Daniel Dunbar 45e5670ede Fix typo
llvm-svn: 79445
2009-08-19 18:35:54 +00:00
Dan Gohman de255fc8f6 Remove temporary testing code.
llvm-svn: 79443
2009-08-19 18:27:08 +00:00
Dan Gohman 915302c605 Make SROA and PredicateSimplifier cope if TargetData is not
available. This is very conservative for now.

llvm-svn: 79442
2009-08-19 18:22:18 +00:00
Dan Gohman 5d5bc6d000 Use hasDefinitiveInitializer() instead of testing the same thing
by hand, and fix a few places that were using hasInitializer() that
appear to depend on the initializer value.

llvm-svn: 79441
2009-08-19 18:20:44 +00:00
Dan Gohman 81ce842ecf Canonicalize indices in a constantexpr GEP. If Indices exceed the
static extents of the static array type, it causes GlobalOpt and
other passes to be more conservative. This canonicalization also
allows the constant folder to add "inbounds" to GEPs.

llvm-svn: 79440
2009-08-19 18:18:36 +00:00
Dan Gohman ac33a9061d Add an x86 peep that narrows TEST instructions to forms that use
a smaller encoding. These kinds of patterns are very frequent in
sqlite3, for example.

llvm-svn: 79439
2009-08-19 18:16:17 +00:00
Daniel Dunbar ea579e3d29 Switch Twine::str() to use toVector(), which is now efficient.
llvm-svn: 79437
2009-08-19 18:09:47 +00:00
David Goodwin a7c2dfbca1 Update Cortex-A8 instruction itineraries for integer instructions.
llvm-svn: 79436
2009-08-19 18:00:44 +00:00
Owen Anderson fe7bbc92e1 Add a first stab at describing LLVMContext.
llvm-svn: 79435
2009-08-19 17:58:52 +00:00
Daniel Dunbar b090bf4626 Switch raw_svector_ostream to use the vector as the ostream buffer.
- This avoids unnecessary malloc/free overhead in the common case, and
   unnecessary copying from the ostream buffer into the output vector.

llvm-svn: 79434
2009-08-19 17:54:29 +00:00
Daniel Dunbar 825e955e40 Add SmallVector::{capacity,set_size}.
- These allow clients to make use of the extra elements in the vector which
   have already been allocated, without requiring them to be value initialized.

llvm-svn: 79433
2009-08-19 17:48:28 +00:00
Erick Tryzelaar a5fbf27bc8 BasicBlock::getContext can no longer return a NULL so update the doc.
llvm-svn: 79432
2009-08-19 17:40:05 +00:00
Erick Tryzelaar be86e9fd9a Update the ocaml docs to work with LLVMContext.
llvm-svn: 79431
2009-08-19 17:32:38 +00:00
Erick Tryzelaar 8ce532bfea Convert the rest of the ocaml types and functions to use context.
llvm-svn: 79430
2009-08-19 17:32:24 +00:00
Owen Anderson 6d549d6450 Reapply my less-lock-contention-in-leak-detector patch, now with new files
actually added.

llvm-svn: 79429
2009-08-19 17:07:46 +00:00
Bob Wilson 32cd8550ce Add support for Neon VEXT (vector extract) shuffles.
This is derived from a patch by Anton Korzh.  I modified it to recognize
the VEXT shuffles during legalization and lower them to a target-specific
DAG node.

llvm-svn: 79428
2009-08-19 17:03:43 +00:00
Daniel Dunbar 5c947db79c Fix a commento.
llvm-svn: 79427
2009-08-19 16:25:53 +00:00
Daniel Dunbar 465de3e2be Speculatively revert r79375, which may be breaking bootstrap, although in a
rather obscure way (the other candidate is r79377).

llvm-svn: 79426
2009-08-19 16:25:25 +00:00
David Goodwin 9b48cd4899 Use the schedule itinerary operand use/def cycle information to adjust dependence edge latency for post-RA scheduling.
llvm-svn: 79425
2009-08-19 16:08:58 +00:00
Sandeep Patel f2c313a1f9 Test commit access with a first act of vanity.
llvm-svn: 79424
2009-08-19 15:07:40 +00:00
Duncan Sands a21fe10c06 Fix cmake build on non-x86 targets. Patch by
Xerxes Rånby.

llvm-svn: 79419
2009-08-19 12:41:52 +00:00
Benjamin Kramer 47f6943a95 Proper MSVC build fix (and remove my hack again). Patch by Yonggang Luo.
llvm-svn: 79418
2009-08-19 12:38:51 +00:00
Benjamin Kramer 9d908589d3 Add a hack to unbreak MSVC builds. str(n)casecmp are POSIX functions and aren't available on windows (mingw defines them though).
llvm-svn: 79417
2009-08-19 12:16:17 +00:00
Eli Friedman 1e008c173a PR4737: Fix a nasty bug in load narrowing with non-power-of-two types.
llvm-svn: 79415
2009-08-19 08:46:10 +00:00
Erick Tryzelaar d552be457a Add the ocaml binding to LLVMBuildAggregateRet.
llvm-svn: 79414
2009-08-19 08:37:00 +00:00
Erick Tryzelaar fd529d7dc4 Expose some extra functions to llvm-c
llvm-svn: 79413
2009-08-19 08:36:49 +00:00
Nick Lewycky cbfe9b195c Fix up PHI nodes correctly in the presence of unreachable BBs, part two. Also
delete a newed pointer, and improve readability a little bit.

llvm-svn: 79411
2009-08-19 07:16:57 +00:00
Erick Tryzelaar 5c35b5cf91 Allow passing around LLVMContext in ocaml.
llvm-svn: 79410
2009-08-19 06:40:29 +00:00
Chris Lattner 79cbb75e69 ExuberantAsm is no more.
llvm-svn: 79409
2009-08-19 06:36:30 +00:00
Chris Lattner 78b23b0e3f fix asmstreaming of 2/4 byte elements with pow-2 alignments.
llvm-svn: 79408
2009-08-19 06:35:36 +00:00
Nick Lewycky 9ddc52d5b8 Be more careful when modifying PHI nodes. Patch by Andre Tavares.
llvm-svn: 79407
2009-08-19 06:24:33 +00:00
Chris Lattner 37b7234a75 switch asmprinter to emit alignments through OutStreamer.
llvm-svn: 79406
2009-08-19 06:12:02 +00:00
Chris Lattner 4b7dadb76e eliminate AsmPrinter::SwitchToSection and just have clients
talk to the MCStreamer directly instead.

llvm-svn: 79405
2009-08-19 05:49:37 +00:00
Andreas Neustifter 21e66abd40 Broke line before break.
llvm-svn: 79404
2009-08-19 05:44:39 +00:00
Daniel Dunbar acf0b258de Make a SmallVector size more reasonable.
llvm-svn: 79403
2009-08-19 05:08:06 +00:00
Erick Tryzelaar 9eb4a5f418 Fix gcc-4.4/fedora 11 by adding a sentinel value to SimpleValueType.
gcc-4.4 was optimizing away comparisons against SimpleValueType when
it was compared to a value larger than the largest value in the enum.
This patch works around it by adding one extra item to the enum so
that these tests will now be valid.

llvm-svn: 79401
2009-08-19 02:53:07 +00:00
Lang Hames 11732add1e Added an option to have the PBQP allocator attempt coalescing during allocation.
llvm-svn: 79397
2009-08-19 01:36:14 +00:00
Owen Anderson 077df2c4ce Revert my last patch temporarily.
llvm-svn: 79388
2009-08-19 00:52:13 +00:00
Owen Anderson 3042539089 Privatize part of the leak detector mechanism, which turned out to be heavily contended
when trying to run opt in parallel.  This lets parallel opt crunch 403.gcc in about a third
of the time.

llvm-svn: 79387
2009-08-19 00:37:02 +00:00
Daniel Dunbar 0cf168635e raw_ostream: Simplify write(unsigned char) to match write(const char*, unsigned).
llvm-svn: 79386
2009-08-19 00:23:39 +00:00
Daniel Dunbar 835da36ee9 raw_ostream: Remove pointless redefinitions of tell().
- The base class implementation is correct.

llvm-svn: 79385
2009-08-19 00:14:25 +00:00
Dan Gohman dea2358c68 Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden
before performing optimizations based on constant string values.

llvm-svn: 79384
2009-08-19 00:11:12 +00:00
Dan Gohman 2fa67c9f70 Be tidy and use a break to exit from a switch block rather than
just falling through the end.

llvm-svn: 79383
2009-08-18 23:52:48 +00:00