1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

9661 Commits

Author SHA1 Message Date
Owen Anderson
8eba306123 Make the StructType->StructLayout table private to TargetData, allowing us to avoid locking on it.
llvm-svn: 79555
2009-08-20 18:26:03 +00:00
Dan Gohman
6ec8176e22 Rename hasNoUnsignedOverflow and hasNoSignedOverflow to hasNoUnsignedWrap
and hasNoSignedWrap, for consistency with the nuw and nsw properties.

llvm-svn: 79539
2009-08-20 17:11:38 +00:00
Dan Gohman
d9766dcb85 Various comment and whitespace cleanups.
llvm-svn: 79533
2009-08-20 16:42:55 +00:00
Erick Tryzelaar
d7e3c40ecb Rename FirstExtendedValueType to INVALID_SIMPLE_VALUE_TYPE
as that's a bit more descriptive of what we're testing for.

llvm-svn: 79513
2009-08-20 05:09:43 +00:00
Dan Gohman
1d708297fc Add some comments clarifying what appear to be the intent of various
error handling mechanisms. Please correct these if I've misunderstood
something.

llvm-svn: 79505
2009-08-20 01:46:24 +00:00
Dan Gohman
1319eb4ab8 Reword a few comments for AnalyzeBranch and InsertBranch, and fix
a few typos.

llvm-svn: 79503
2009-08-20 01:33:25 +00:00
Daniel Dunbar
446d29370f Add a fast path for setName("") on an unnamed value.
llvm-svn: 79492
2009-08-19 23:37:23 +00:00
David Greene
c69536c40b Remove an unnecessary include. Now we won't have circular include
problems later on.

llvm-svn: 79487
2009-08-19 23:00:07 +00:00
Daniel Dunbar
d26934ba4a Switch IRBuilder to using Twine references for names.
llvm-svn: 79482
2009-08-19 22:34:21 +00:00
David Greene
e9ea0cbe04 Add missing includes.
llvm-svn: 79469
2009-08-19 21:22:18 +00:00
David Greene
1c25fc3544 Add missing includes.
llvm-svn: 79468
2009-08-19 21:19:41 +00:00
David Greene
56a7d80265 Add missing includes.
llvm-svn: 79467
2009-08-19 21:17:28 +00:00
David Greene
10a7eceb25 Add missing header.
llvm-svn: 79463
2009-08-19 20:52:54 +00:00
Eli Friedman
fe70446342 Add triple parsing support for TCE.
llvm-svn: 79461
2009-08-19 20:46:03 +00:00
Dan Gohman
6a85687468 Unbreak GetBufferSize() on uninitialized streams. This fixes a problem
that led to errs() getting made buffered.

llvm-svn: 79458
2009-08-19 20:27:57 +00:00
Daniel Dunbar
2cf5eb67b4 Switch to SmallString::str from SmallString::c_str, and remove
SmallString::c_str.

llvm-svn: 79456
2009-08-19 20:07:03 +00:00
Daniel Dunbar
cb45b94032 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
Daniel Dunbar
07444dd862 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
115971f6a7 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
Dan Gohman
eb6fbd7fd1 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
2e2969f9e1 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
6812c0db35 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
adbe0cd3f7 BasicBlock::getContext can no longer return a NULL so update the doc.
llvm-svn: 79432
2009-08-19 17:40:05 +00:00
Owen Anderson
9e0bb1bd44 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
David Goodwin
9a605efb84 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
Erick Tryzelaar
e01a68157f Expose some extra functions to llvm-c
llvm-svn: 79413
2009-08-19 08:36:49 +00:00
Chris Lattner
fd945d807a ExuberantAsm is no more.
llvm-svn: 79409
2009-08-19 06:36:30 +00:00
Chris Lattner
9cbc9c2d13 eliminate AsmPrinter::SwitchToSection and just have clients
talk to the MCStreamer directly instead.

llvm-svn: 79405
2009-08-19 05:49:37 +00:00
Erick Tryzelaar
935d99e9df 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
Owen Anderson
bd652bf082 Revert my last patch temporarily.
llvm-svn: 79388
2009-08-19 00:52:13 +00:00
Owen Anderson
69a97af0b7 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
6584ac1900 raw_ostream: Remove pointless redefinitions of tell().
- The base class implementation is correct.

llvm-svn: 79385
2009-08-19 00:14:25 +00:00
Daniel Dunbar
2f3cfb4d35 raw_ostream: Add the capability for subclasses to manually install an external
buffer.

llvm-svn: 79382
2009-08-18 23:42:36 +00:00
Daniel Dunbar
85b15d8e71 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.

llvm-svn: 79379
2009-08-18 23:36:04 +00:00
Jakob Stoklund Olesen
9496240bbf 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.

llvm-svn: 79369
2009-08-18 21:14:54 +00:00
Daniel Dunbar
5aa51a83c7 Revert r78924, disabling buffering defeats all the fast paths in raw_ostream.
llvm-svn: 79361
2009-08-18 20:07:36 +00:00
Daniel Dunbar
d334c67f60 Improve Triple to recognize the OS in i386-mingw32.
llvm-svn: 79359
2009-08-18 19:26:55 +00:00
David Greene
4347d5d424 Make various changes suggested by Chris.
llvm-svn: 79358
2009-08-18 19:22:55 +00:00
Daniel Dunbar
09f40a7871 Fix pasto in StringRef::count(char)
llvm-svn: 79356
2009-08-18 18:34:22 +00:00
Daniel Dunbar
4a9a98a5de Add StringRef::count({char,StringRef})
llvm-svn: 79354
2009-08-18 18:26:35 +00:00
Dan Gohman
b0cf049a1e 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.

llvm-svn: 79344
2009-08-18 16:46:41 +00:00
Misha Brukman
0961ce48c4 Fixed spelling of MSP430.
llvm-svn: 79333
2009-08-18 13:50:28 +00:00
Chris Lattner
b82fc63e02 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.

llvm-svn: 79324
2009-08-18 06:15:16 +00:00
Daniel Dunbar
763d4d3648 Recognize xscale as an ARM arch.
- Patch by Yonggang Luo.

llvm-svn: 79315
2009-08-18 04:51:26 +00:00
Daniel Dunbar
d4a31156e7 Add Triple matching for pic16 arch and solaris OS.
- Patch by Yonggang Luo.

llvm-svn: 79314
2009-08-18 04:43:27 +00:00
Daniel Dunbar
4e5ca5c595 Add LLVMInitializeAllTargetInfos for C api, and update
LLVMInitializeNativeTarget to initialize target info.
 - Patch by Jose Fonseca.

llvm-svn: 79307
2009-08-18 03:03:27 +00:00
Jim Grosbach
5d064eeb2a Remove a bit more cruft from the sjlj moving to a backend pass.
llvm-svn: 79272
2009-08-17 20:25:04 +00:00
Jim Grosbach
4643e96d36 Move the sjlj exception handling conversions to a back-end pass where they
more properly belong. This allows removing the front-end conditionalized
SJLJ code, and cleans up the generated IR considerably. All of the
infrastructure code (calling _Unwind_SjLj_Register/Unregister, etc) is
added by the SjLjEHPrepare pass.

llvm-svn: 79250
2009-08-17 16:41:22 +00:00
David Goodwin
d65007a4a3 Extend the instruction itinerary model to include the ability to indicate the def and use cycle for each operand. This additional information is optional, so existing itineraries do not need to be changed.
llvm-svn: 79247
2009-08-17 16:02:57 +00:00
Chris Lattner
0ed3ef52af the MinPad argument to PadToColumn only really makes sense to be 1,
just remove the argument and replace it with 1.

llvm-svn: 79246
2009-08-17 15:48:08 +00:00