Commit Graph

31512 Commits

Author SHA1 Message Date
Dan Gohman
ef74e9bf2a Fix an x86 code size regression: prefer RIP-relative addressing
over absolute addressing even in non-PIC mode (unless the address
has an index or something else incompatible), because it has a
smaller encoding.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79553 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 18:23:44 +00:00
Dan Gohman
073f5b669d Add a comment explaining why llvm_unreachable_internal doesn't call
the ErrorHandler callback.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79541 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 17:15:19 +00:00
Daniel Dunbar
cdd93d8c35 Fix two APFloat bugs in converting hexadecimal constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79540 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 17:12:33 +00:00
Dan Gohman
5078f84c82 Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrap
and hasNoSignedWrap, for consistency with the nuw and nsw properties.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79539 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 17:11:38 +00:00
Evan Cheng
89d177f017 Fix an obvious copy-n-paste bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79535 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 17:01:04 +00:00
Dan Gohman
4c0d5d5db8 Various comment and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79533 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 16:42:55 +00:00
Dan Gohman
d35626e8bb Update and fix some comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79532 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 16:27:10 +00:00
Jim Grosbach
8fc3b6903a Check for shared landing pads when assigning call site values. Invokes which
share a landing pad should also use the same call site value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79501 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-20 01:03:48 +00:00
Dale Johannesen
231843ed16 Add an extra line to conform with preferred style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79495 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 23:44:01 +00:00
Reid Kleckner
ce4eb39bb4 Modify an assert to avoid what looks like a GCC 4.2.4 signed-ness bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79494 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 23:39:59 +00:00
Dan Gohman
5e9bb73de6 Fix a few places to check if TargetData is available before using it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79493 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 23:38:22 +00:00
Daniel Dunbar
5149932068 Add a fast path for setName("") on an unnamed value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79492 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 23:37:23 +00:00
Owen Anderson
517d811f6b AttrListPtr operations need to be atomic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79486 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:58:34 +00:00
Dan Gohman
3d01334e6f Fix a bug in the over-index constant folding. When over-indexing an
array member of a struct, it's possible to land in an arbitrary position
inside that struct, such that attempting to find further getelementptr
indices will fail. In such cases, folding cannot be done.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79485 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:46:59 +00:00
Dale Johannesen
7bcec7e541 Handle 'a' modifier in X86 asms. PR 4742.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79484 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:44:41 +00:00
Reid Kleckner
781c2b8c49 Fixed error in CPPBackend from a contextification API change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79483 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:38:37 +00:00
David Greene
5f3aeac9a7 Add missing forward declaration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79481 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:19:44 +00:00
David Greene
098612b0e8 Add missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79480 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:16:11 +00:00
David Greene
43c76fbba2 Add missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79479 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:08:26 +00:00
David Greene
2a711e36da Add missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79478 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:05:21 +00:00
David Greene
0d036d2e81 Add missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79476 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 22:02:07 +00:00
David Greene
eea1f4cdb7 Add missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79475 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 21:59:18 +00:00
David Greene
fc4da0cea8 Add missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79474 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 21:55:33 +00:00
David Greene
b2c66fc322 Add missing includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79473 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 21:52:55 +00:00
Owen Anderson
0d1ea255d9 Get rid of a helgrind warning. If this is _actually_ a performance problem,
we can find a way to cache the answer that isn't racy.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79472 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 21:48:34 +00:00
Eli Friedman
74db89e30f Add triple parsing support for TCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79461 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 20:46:03 +00:00
Daniel Dunbar
dddfd34e32 Switch to SmallString::str from SmallString::c_str, and remove
SmallString::c_str.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79456 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 20:07:03 +00:00
Daniel Dunbar
29c142077e 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
2009-08-19 19:22:52 +00:00
Daniel Dunbar
d14787e497 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
2009-08-19 18:40:58 +00:00
Dan Gohman
6bd4aca29f Remove temporary testing code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79443 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 18:27:08 +00:00
Dan Gohman
e4af1cf402 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
2009-08-19 18:22:18 +00:00
Dan Gohman
8255573835 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
2009-08-19 18:20:44 +00:00
Dan Gohman
de0e587e63 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
2009-08-19 18:18:36 +00:00
Dan Gohman
6a402dc952 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
2009-08-19 18:16:17 +00:00
Daniel Dunbar
b7be0e8afc 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
2009-08-19 18:09:47 +00:00
David Goodwin
5d598aaf3d 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
2009-08-19 18:00:44 +00:00
Daniel Dunbar
425d08c654 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
2009-08-19 17:54:29 +00:00
Owen Anderson
c34ebf65af 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
2009-08-19 17:07:46 +00:00
Bob Wilson
de95c1b88b 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
2009-08-19 17:03:43 +00:00
Daniel Dunbar
ecbd0bc478 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
2009-08-19 16:25:25 +00:00
David Goodwin
dc4bdcdef1 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
2009-08-19 16:08:58 +00:00
Eli Friedman
d68eea2b6d 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
2009-08-19 08:46:10 +00:00
Nick Lewycky
08368ce984 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
2009-08-19 07:16:57 +00:00
Chris Lattner
6e579c6727 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
2009-08-19 06:35:36 +00:00
Nick Lewycky
3417e8f185 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
2009-08-19 06:24:33 +00:00
Chris Lattner
663c2d2580 switch asmprinter to emit alignments through OutStreamer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79406 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 06:12:02 +00:00
Chris Lattner
6c2f9e14fd 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
2009-08-19 05:49:37 +00:00
Andreas Neustifter
0a324aa53a Broke line before break.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79404 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 05:44:39 +00:00
Daniel Dunbar
e476004b94 Make a SmallVector size more reasonable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79403 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 05:08:06 +00:00
Lang Hames
8481e3b368 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
2009-08-19 01:36:14 +00:00
Owen Anderson
021d664a38 Revert my last patch temporarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79388 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-19 00:52:13 +00:00
Owen Anderson
ba43a385a8 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
2009-08-19 00:37:02 +00:00
Daniel Dunbar
ecc67e2e1b 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
2009-08-19 00:23:39 +00:00
Daniel Dunbar
d29d497b53 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
2009-08-19 00:14:25 +00:00
Dan Gohman
107f41fad5 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
2009-08-19 00:11:12 +00:00
Dan Gohman
2c9489d6e9 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
2009-08-18 23:52:48 +00:00
Daniel Dunbar
906d5b4455 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
2009-08-18 23:42:36 +00:00
Dan Gohman
db8dc2b9fa 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
2009-08-18 23:36:17 +00:00
Daniel Dunbar
ab81027544 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
2009-08-18 23:36:04 +00:00
Lang Hames
233fd9cea0 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
2009-08-18 23:34:50 +00:00
Eric Christopher
b120ab4057 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
2009-08-18 22:50:32 +00:00
Daniel Dunbar
3b3de924f5 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
2009-08-18 22:24:00 +00:00
Jakob Stoklund Olesen
c0823fe7c6 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
2009-08-18 21:14:54 +00:00
Richard Osborne
1123135dbf 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
2009-08-18 21:14:31 +00:00
Dan Gohman
3731604f1f 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
2009-08-18 20:09:59 +00:00
Daniel Dunbar
35979c021e 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
2009-08-18 20:07:36 +00:00
Daniel Dunbar
651aa689cc 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
2009-08-18 19:26:55 +00:00
David Greene
fe37ab335b Make various changes suggested by Chris.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79358 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 19:22:55 +00:00
Owen Anderson
4d91943889 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
2009-08-18 18:28:58 +00:00
Erick Tryzelaar
f8bc801c6c Fix an uninitialized value warning in APFloat.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79353 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 18:20:37 +00:00
Richard Osborne
a9e8334877 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
2009-08-18 17:58:17 +00:00
Chris Lattner
35c3531754 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
2009-08-18 16:56:17 +00:00
Dan Gohman
c40f17b087 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
2009-08-18 16:46:41 +00:00
Chris Lattner
4d35fce60c 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
2009-08-18 16:46:29 +00:00
Dan Gohman
da65822cfc 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
2009-08-18 15:18:18 +00:00
Dan Gohman
6874a2ae03 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
2009-08-18 14:58:19 +00:00
Anton Korobeynikov
848c293962 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
2009-08-18 14:06:12 +00:00
Daniel Dunbar
b26bc42a2c Fix Triple to recognize the 'bfin' arch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79325 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 07:06:26 +00:00
Chris Lattner
dabf07c70a 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
2009-08-18 06:15:16 +00:00
Chris Lattner
6a66e585b8 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
2009-08-18 06:13:03 +00:00
Chris Lattner
090d73c6bd 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
2009-08-18 06:03:07 +00:00
Evan Cheng
51f39961c3 Fix revsh pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79318 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 05:43:23 +00:00
Chris Lattner
79e6408ad3 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
2009-08-18 05:33:27 +00:00
Daniel Dunbar
2447389bac 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
2009-08-18 04:51:26 +00:00
Daniel Dunbar
fdb0b7b555 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
2009-08-18 04:43:27 +00:00
Chris Lattner
1f50fc736e fix another bozo bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79313 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 04:34:36 +00:00
Chris Lattner
b49a30c109 fix accidentally inverted conditional and add comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79312 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 04:33:15 +00:00
Chris Lattner
a006d4e60d 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
2009-08-18 04:30:35 +00:00
Dan Gohman
8942f9bb9f Make TargetData optional in MemCpyOptimizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79306 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 01:17:52 +00:00
Dan Gohman
f14d919742 Make TargetData optional in SimplifyLibCalls.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79298 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 00:48:13 +00:00
Anton Korobeynikov
e55db74152 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
2009-08-18 00:40:33 +00:00
Dan Gohman
25103a2617 Fix function alignment at -Os on x86 to be 1, not 2. getFunctionAlignment
returns a log2 value.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79293 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 00:20:06 +00:00
Dale Johannesen
5cfd4ddece PowerPC inline asm was emitting two output operands
for a single "m" constraint; this is wrong because the
opcode of a load or store would have to change in parallel.
This patch makes it always compute addresses into a register,
which is correct but not as efficient as possible.  7144566.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79292 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-18 00:18:39 +00:00
Devang Patel
4b49cd298a Add prefix only if it is needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79289 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 23:17:17 +00:00
Jim Grosbach
606f3d696f cleanups per review. Mostly cosmetic, plus use SmallVector in place of std::vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79287 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 21:40:03 +00:00
Devang Patel
4c77dfa20c Oops. find all llvm.dbg.global_variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79274 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 20:36:20 +00:00
Jim Grosbach
2962664227 Remove a bit more cruft from the sjlj moving to a backend pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79272 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 20:25:04 +00:00
Benjamin Kramer
ae68a19ef9 Update CMakeLists.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79264 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 18:47:11 +00:00
Dan Gohman
d802f7e290 Update comments to new-style syntax.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79263 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 18:45:31 +00:00
Daniel Dunbar
5d17eddb0c Fix build warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79262 91177308-0d34-0410-b5e6-96231b3b80d8
2009-08-17 18:41:42 +00:00