Daniel Dunbar [Wed, 19 Aug 2009 19:22:52 +0000 (19:22 +0000)]
Change ValueSymbolTable to use raw_svector_ostream for string concatenation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79449
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 19 Aug 2009 18:51:45 +0000 (18:51 +0000)]
Make this test platform neutral.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79447
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 18:40:58 +0000 (18:40 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79446
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 18:35:54 +0000 (18:35 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79445
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 19 Aug 2009 18:27:08 +0000 (18:27 +0000)]
Remove temporary testing code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79443
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 19 Aug 2009 18:22:18 +0000 (18:22 +0000)]
Make SROA and PredicateSimplifier cope if TargetData is not
available. This is very conservative for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79442
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 19 Aug 2009 18:20:44 +0000 (18:20 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79441
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 19 Aug 2009 18:18:36 +0000 (18:18 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79440
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 19 Aug 2009 18:16:17 +0000 (18:16 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79439
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 18:09:47 +0000 (18:09 +0000)]
Switch Twine::str() to use toVector(), which is now efficient.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79437
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Wed, 19 Aug 2009 18:00:44 +0000 (18:00 +0000)]
Update Cortex-A8 instruction itineraries for integer instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79436
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 19 Aug 2009 17:58:52 +0000 (17:58 +0000)]
Add a first stab at describing LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79435
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 17:54:29 +0000 (17:54 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79434
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 17:48:28 +0000 (17:48 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79433
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Wed, 19 Aug 2009 17:40:05 +0000 (17:40 +0000)]
BasicBlock::getContext can no longer return a NULL so update the doc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79432
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Wed, 19 Aug 2009 17:32:38 +0000 (17:32 +0000)]
Update the ocaml docs to work with LLVMContext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79431
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Wed, 19 Aug 2009 17:32:24 +0000 (17:32 +0000)]
Convert the rest of the ocaml types and functions to use context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79430
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 19 Aug 2009 17:07:46 +0000 (17:07 +0000)]
Reapply my less-lock-contention-in-leak-detector patch, now with new files
actually added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79429
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Wed, 19 Aug 2009 17:03:43 +0000 (17:03 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79428
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 16:25:53 +0000 (16:25 +0000)]
Fix a commento.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79427
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 16:25:25 +0000 (16:25 +0000)]
Speculatively revert r79375, which may be breaking bootstrap, although in a
rather obscure way (the other candidate is r79377).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79426
91177308-0d34-0410-b5e6-
96231b3b80d8
David Goodwin [Wed, 19 Aug 2009 16:08:58 +0000 (16:08 +0000)]
Use the schedule itinerary operand use/def cycle information to adjust dependence edge latency for post-RA scheduling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79425
91177308-0d34-0410-b5e6-
96231b3b80d8
Sandeep Patel [Wed, 19 Aug 2009 15:07:40 +0000 (15:07 +0000)]
Test commit access with a first act of vanity.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79424
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Wed, 19 Aug 2009 12:41:52 +0000 (12:41 +0000)]
Fix cmake build on non-x86 targets. Patch by
Xerxes RĂ„nby.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79419
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 19 Aug 2009 12:38:51 +0000 (12:38 +0000)]
Proper MSVC build fix (and remove my hack again). Patch by Yonggang Luo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79418
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 19 Aug 2009 12:16:17 +0000 (12:16 +0000)]
Add a hack to unbreak MSVC builds. str(n)casecmp are POSIX functions and aren't available on windows (mingw defines them though).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79417
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Wed, 19 Aug 2009 08:46:10 +0000 (08:46 +0000)]
PR4737: Fix a nasty bug in load narrowing with non-power-of-two types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79415
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Wed, 19 Aug 2009 08:37:00 +0000 (08:37 +0000)]
Add the ocaml binding to LLVMBuildAggregateRet.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79414
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Wed, 19 Aug 2009 08:36:49 +0000 (08:36 +0000)]
Expose some extra functions to llvm-c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79413
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 19 Aug 2009 07:16:57 +0000 (07:16 +0000)]
Fix up PHI nodes correctly in the presence of unreachable BBs, part two. Also
delete a newed pointer, and improve readability a little bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79411
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Wed, 19 Aug 2009 06:40:29 +0000 (06:40 +0000)]
Allow passing around LLVMContext in ocaml.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79410
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Aug 2009 06:36:30 +0000 (06:36 +0000)]
ExuberantAsm is no more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79409
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Aug 2009 06:35:36 +0000 (06:35 +0000)]
fix asmstreaming of 2/4 byte elements with pow-2 alignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79408
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 19 Aug 2009 06:24:33 +0000 (06:24 +0000)]
Be more careful when modifying PHI nodes. Patch by Andre Tavares.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79407
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Aug 2009 06:12:02 +0000 (06:12 +0000)]
switch asmprinter to emit alignments through OutStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79406
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Wed, 19 Aug 2009 05:49:37 +0000 (05:49 +0000)]
eliminate AsmPrinter::SwitchToSection and just have clients
talk to the MCStreamer directly instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79405
91177308-0d34-0410-b5e6-
96231b3b80d8
Andreas Neustifter [Wed, 19 Aug 2009 05:44:39 +0000 (05:44 +0000)]
Broke line before break.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79404
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 05:08:06 +0000 (05:08 +0000)]
Make a SmallVector size more reasonable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79403
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Wed, 19 Aug 2009 02:53:07 +0000 (02:53 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79401
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 19 Aug 2009 01:36:14 +0000 (01:36 +0000)]
Added an option to have the PBQP allocator attempt coalescing during allocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79397
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 19 Aug 2009 00:52:13 +0000 (00:52 +0000)]
Revert my last patch temporarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79388
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 19 Aug 2009 00:37:02 +0000 (00:37 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79387
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 00:23:39 +0000 (00:23 +0000)]
raw_ostream: Simplify write(unsigned char) to match write(const char*, unsigned).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79386
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Wed, 19 Aug 2009 00:14:25 +0000 (00:14 +0000)]
raw_ostream: Remove pointless redefinitions of tell().
- The base class implementation is correct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79385
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 19 Aug 2009 00:11:12 +0000 (00:11 +0000)]
Fix SimplifyLibcalls and ValueTracking to check mayBeOverridden
before performing optimizations based on constant string values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79384
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 23:52:48 +0000 (23:52 +0000)]
Be tidy and use a break to exit from a switch block rather than
just falling through the end.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79383
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 23:42:36 +0000 (23:42 +0000)]
raw_ostream: Add the capability for subclasses to manually install an external
buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79382
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 23:36:17 +0000 (23:36 +0000)]
Legalize the shift amount operand of SRL_PARTS, SHL_PARTS, and
SRA_PARTS, as is done for SRL, SHL, and SRA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79380
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 23:36:04 +0000 (23:36 +0000)]
raw_ostream: Reduce FormattedStream's reliance on raw_ostream's implementation.
- Kill off begin(), end(), and iterator. It isn't clear what these
mean. Instead provide getBufferStart(), which can be used with
GetNumBytesInBuffer to the same effect.
- Update ComputeColumn to take arguments for the buffer to scan, this
simplifies the implementation of write_impl substantially.
- This should also fix possible problems with the scanning pointer pointing
outside of the current raw_ostream buffer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79379
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 18 Aug 2009 23:34:50 +0000 (23:34 +0000)]
Changes DOUT references in the PBQP allocator to use DEBUG(errs() ...)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79378
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 18 Aug 2009 22:50:32 +0000 (22:50 +0000)]
Implement sse4.2 string/text processing instructions:
Add patterns and instruction encoding information.
Add custom lowering to deal with hardwired return register of
uncertain type (xmm0).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79377
91177308-0d34-0410-b5e6-
96231b3b80d8
Tanya Lattner [Tue, 18 Aug 2009 22:33:28 +0000 (22:33 +0000)]
First steps to document new release plan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79376
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 22:24:00 +0000 (22:24 +0000)]
Speed up raw_ostream::<<(unsigned long long) for 32-bit systems by doing most
div/mods in 32-bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79375
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 18 Aug 2009 21:14:54 +0000 (21:14 +0000)]
Simplify RegScavenger::FindUnusedReg.
- Drop the Candidates argument and fix all callers. Now that RegScavenger
tracks available registers accurately, there is no need to restict the
search.
- Make sure that no aliases of the found register are in use. This was a potential bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79369
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 18 Aug 2009 21:14:31 +0000 (21:14 +0000)]
Add support for mergeable sections back into the XCore backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79368
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 20:09:59 +0000 (20:09 +0000)]
Fix a bug in raw_ostream::write(char) introduced by the change to
allow underlying stream classes to decline buffering. After
calling SetBuffered(), re-check whether the stream is Unbuffered
in order to handle the case where the underlying stream has
declined buffering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79362
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 20:07:36 +0000 (20:07 +0000)]
Revert r78924, disabling buffering defeats all the fast paths in raw_ostream.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79361
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 19:26:55 +0000 (19:26 +0000)]
Improve Triple to recognize the OS in i386-mingw32.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79359
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Tue, 18 Aug 2009 19:22:55 +0000 (19:22 +0000)]
Make various changes suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79358
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 18 Aug 2009 19:18:40 +0000 (19:18 +0000)]
Surrounded variable in <tt> tags for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79357
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 18:34:22 +0000 (18:34 +0000)]
Fix pasto in StringRef::count(char)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79356
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 18 Aug 2009 18:28:58 +0000 (18:28 +0000)]
Privatize the ValueHandle global map. Because this is used so heavily throughout the code base, locking all accesses to
it is not practical performance-wise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79355
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 18:26:35 +0000 (18:26 +0000)]
Add StringRef::count({char,StringRef})
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79354
91177308-0d34-0410-b5e6-
96231b3b80d8
Erick Tryzelaar [Tue, 18 Aug 2009 18:20:37 +0000 (18:20 +0000)]
Fix an uninitialized value warning in APFloat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79353
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 18 Aug 2009 18:07:35 +0000 (18:07 +0000)]
Add CXXFLAGS to the Link lines as well in case someone used those instead
of LDFLAGS.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79352
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Osborne [Tue, 18 Aug 2009 17:58:17 +0000 (17:58 +0000)]
Put data with relocations in the same sections as data without relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79351
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 17:38:27 +0000 (17:38 +0000)]
Attempt to normalize test results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79350
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 17:19:46 +0000 (17:19 +0000)]
Make this test less sensitive to assembler differences.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79348
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 17:04:44 +0000 (17:04 +0000)]
alphabeticalize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79347
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 16:56:17 +0000 (16:56 +0000)]
fix COFF targets (mingw/cygwin) to provide ehframe and LSDA sections
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79346
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 16:55:45 +0000 (16:55 +0000)]
force a triple so this passes on darwin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79345
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 16:46:41 +0000 (16:46 +0000)]
Generalize ScalarEvolution to be able to analyze GEPs when
TargetData is not present. It still uses TargetData when available.
This generalization also fixed some limitations in the TargetData
case; the attached testcase covers this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79344
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 16:46:29 +0000 (16:46 +0000)]
null streamer needs to maintain the current section as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79343
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Tue, 18 Aug 2009 15:29:35 +0000 (15:29 +0000)]
CMake: LLVM_ENABLE_PIC now defaults to ON, as in `configure'. This is
required on some platforms for building shared libraries that link to
the LLVM libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79339
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 15:18:18 +0000 (15:18 +0000)]
Make tail merging handle blocks with repeated predecessors correctly, and
remove RemoveDuplicateSuccessor, as it is no longer necessary, and because
it breaks assumptions made in
MachineBasicBlock::isOnlyReachableByFallthrough.
Convert test/CodeGen/X86/omit-label.ll to FileCheck and add a testcase
for PR4732.
test/CodeGen/Thumb2/thumb2-ifcvt2.ll sees a diff with this commit due to
it being bugpoint-reduced to the point where it doesn't matter what the
condition for the branch is.
Add some more interesting code to
test/CodeGen/X86/2009-08-06-branchfolder-crash.ll, which is the testcase
that originally motivated the RemoveDuplicateSuccessor code, to help
verify that the original problem isn't being re-broken.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79338
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 14:58:19 +0000 (14:58 +0000)]
Fix a bug that caused globalopt to miscompile tramp3d: don't miss
unruly indices for arrays that are members of structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79337
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 18 Aug 2009 14:06:12 +0000 (14:06 +0000)]
Text sections should have 'exec' flag set. This seems to unbreak libstdc++ on linux.
Patch by Dmitry Gorbachev!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79334
91177308-0d34-0410-b5e6-
96231b3b80d8
Misha Brukman [Tue, 18 Aug 2009 13:50:28 +0000 (13:50 +0000)]
Fixed spelling of MSP430.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79333
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 07:06:26 +0000 (07:06 +0000)]
Fix Triple to recognize the 'bfin' arch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79325
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 06:15:16 +0000 (06:15 +0000)]
Make AsmStreamer maintain a notion of the current section, pushing it up from the
MCAsmStreamer. Based on this, eliminate the current section from AsmPrinter.
While I'm at it, clean up the last of the horrible "switch to null section" stuff
and add an assert. This change is in preparation for completely eliminating
asmprinter::switchtosection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79324
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 06:13:03 +0000 (06:13 +0000)]
add a horrible hack to the dwarf printer. It looks like mingw is not specifying
an EHFrame section, so we just emit ehframe data into a random section.
This is clearly bad.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79323
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Tue, 18 Aug 2009 06:08:01 +0000 (06:08 +0000)]
Include valgrind in the steps to reproduce if valgrind was used to reproduce
the problem.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79322
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 06:03:07 +0000 (06:03 +0000)]
remove some pointless null switchtosections. The IntelAsmPrinter doesn't really work anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79321
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 18 Aug 2009 05:43:23 +0000 (05:43 +0000)]
Fix revsh pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79318
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 05:33:27 +0000 (05:33 +0000)]
add support for some targetflags on GV operands. This allows us to
send instructions like:
NEW: movl "L___stack_chk_guard$non_lazy_ptr" - "L1$pb"(%esi), %eax
OLD: movl L___stack_chk_guard$non_lazy_ptr-"L1$pb"(%esi), %eax
through the streamer. Several fixmes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79317
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 04:51:26 +0000 (04:51 +0000)]
Recognize xscale as an ARM arch.
- Patch by Yonggang Luo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79315
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 04:43:27 +0000 (04:43 +0000)]
Add Triple matching for pic16 arch and solaris OS.
- Patch by Yonggang Luo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79314
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 04:34:36 +0000 (04:34 +0000)]
fix another bozo bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79313
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 04:33:15 +0000 (04:33 +0000)]
fix accidentally inverted conditional and add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79312
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 04:30:35 +0000 (04:30 +0000)]
turn this conditional into something humans might actually
be able to understand ;-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79311
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 18 Aug 2009 04:03:24 +0000 (04:03 +0000)]
"-" should write to stdout, not stderr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79310
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 03:35:57 +0000 (03:35 +0000)]
Change bugpoint to use Triple to make runtime decisions.
- This is cleaner, and makes bugpoint match the host instead of the build
architecture.
- Patch by Sandeep Patel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79309
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 18 Aug 2009 03:23:40 +0000 (03:23 +0000)]
Separate out Makefile defines so that we can keep the llvm
defined ones from the user defined ones. Propagate accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79308
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Dunbar [Tue, 18 Aug 2009 03:03:27 +0000 (03:03 +0000)]
Add LLVMInitializeAllTargetInfos for C api, and update
LLVMInitializeNativeTarget to initialize target info.
- Patch by Jose Fonseca.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79307
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 01:17:52 +0000 (01:17 +0000)]
Make TargetData optional in MemCpyOptimizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79306
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 18 Aug 2009 00:56:17 +0000 (00:56 +0000)]
Even more Apple style build horribleness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79299
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 18 Aug 2009 00:48:13 +0000 (00:48 +0000)]
Make TargetData optional in SimplifyLibCalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79298
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 18 Aug 2009 00:40:51 +0000 (00:40 +0000)]
Regenerate
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79297
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Korobeynikov [Tue, 18 Aug 2009 00:40:33 +0000 (00:40 +0000)]
The attached patches attempt to fix cross builds. For example, if you
try to use i686-darwin to build for arm-eabi, you'll quickly run into
several false assumptions that the target OS must be the same as the
host OS. These patches split $(OS) into $(HOST_OS) and $(TARGET_OS) to
help builds like "make check" and the test-suite able to cross
compile. Along the way a target of *-unknown-eabi is defined as
"Freestanding" so that TARGET_OS checks have something to work with.
Patch by Sandeep Patel!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79296
91177308-0d34-0410-b5e6-
96231b3b80d8
Edward O'Callaghan [Tue, 18 Aug 2009 00:24:36 +0000 (00:24 +0000)]
LLVM Ada language bindings. Credit to Rod Kay and the AuroraUX team.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79295
91177308-0d34-0410-b5e6-
96231b3b80d8