Commit Graph

50921 Commits

Author SHA1 Message Date
Daniel Dunbar b8dc4ea2c4 Add llvm::Triple::getArchTypePrefix for getting the intrinsic prefix for an
identifier architecture.

llvm-svn: 79906
2009-08-24 09:53:06 +00:00
Daniel Dunbar 6111060e8c Add StringRef based APIs to BitstreamWriter.
llvm-svn: 79904
2009-08-24 09:29:31 +00:00
Daniel Dunbar 7c32f9485f Add MemoryBuffer::getBuffer() -> StringRef.
llvm-svn: 79903
2009-08-24 09:29:24 +00:00
Daniel Dunbar 04a1158d13 llvm-mc/Mach-O: Support symbol attributes.
- This is mostly complete, the main thing missing is .indirect_symbol support
   (which would be straight-forward, except that the way it is implemented in
   'as' makes getting an exact .o match interesting).

llvm-svn: 79899
2009-08-24 08:40:12 +00:00
Daniel Dunbar d341e781da llvm-mc: Tweak undefined symbol handling.
llvm-svn: 79898
2009-08-24 08:39:57 +00:00
Daniel Dunbar ecd32d6a4f Add missing include (for MSVC).
llvm-svn: 79897
2009-08-24 07:18:07 +00:00
Reid Kleckner e56676a3cc Fixed double free in Kaleidoscope. Fixes PR4762.
llvm-svn: 79896
2009-08-24 05:42:21 +00:00
Dan Gohman c9fa051f85 Correctly account for the Spaces array nul terminator. Thanks Chris!
llvm-svn: 79894
2009-08-24 04:43:38 +00:00
Chris Lattner e7f064ed2b improve documentation for linker_private linkage.
llvm-svn: 79893
2009-08-24 04:32:16 +00:00
Chris Lattner c143023bac remove the last *stream> #include from a public header.
llvm-svn: 79892
2009-08-24 04:14:03 +00:00
Dan Gohman 2ebc96ae95 These flushes were only needed when the code was transitioning between
std::cout and outs().

llvm-svn: 79891
2009-08-24 04:13:48 +00:00
Dan Gohman f88f52e3b9 raw_ostream::indent is used for PadToColumn which often prints more
than 16 spaces. Make the Spaces array wide enough to handle common cases.

llvm-svn: 79890
2009-08-24 04:13:01 +00:00
Chris Lattner 44aed5dcf1 eliminate a #include.
llvm-svn: 79888
2009-08-24 04:07:51 +00:00
Chris Lattner 0ffe0e096d split raw_os_ostream out to its own header and implementation file. This
means that raw_ostream no longer has to #include <iosfwd>.  Nothing in llvm
should use raw_os_ostream.h, but llvm-gcc and some unit tests do.

llvm-svn: 79886
2009-08-24 04:02:06 +00:00
Chris Lattner 06fa176862 prune the #includes in raw_ostream.h by moving a
member out of line. ftostr is not particularly speedy,
so that method is presumably not perf sensitive.

llvm-svn: 79885
2009-08-24 03:52:50 +00:00
Chris Lattner e849956de8 search unittests.
llvm-svn: 79884
2009-08-24 03:44:02 +00:00
Dan Gohman a53c35d8d0 Unbreak the build for HAVE_GV platforms.
llvm-svn: 79883
2009-08-24 03:23:12 +00:00
Chris Lattner 13d62b60bd remove a few dead insertion methods.
llvm-svn: 79882
2009-08-24 02:39:26 +00:00
Daniel Dunbar 83dbd7a432 Remove alloca config.h support.
- I did not actually remove the configure test itself, someone who can
   regenerate configure should do this (see FIXME in autoconf/configure.ac)

llvm-svn: 79881
2009-08-24 02:14:39 +00:00
Chris Lattner eb72593558 Remove this test now that the interpreter doesn't support
interpreting the wrong endianness anymore.  This fixes a 
failure on clang-powerpc-darwin8

llvm-svn: 79880
2009-08-24 02:05:59 +00:00
Daniel Dunbar 40b384eade Unbreak unit tests.
llvm-svn: 79879
2009-08-24 02:02:58 +00:00
Daniel Dunbar 62e2148177 Remove include/llvm/Config/alloca.h, it is dead.
llvm-svn: 79878
2009-08-24 02:02:49 +00:00
Dale Johannesen 6bbeda41b9 Make linkerprivate work for ARM and PPC. Testcase covers
all Darwin targets; could be split into separate tests for
the chip subdirectories, but from Chris' last mail on testing
I assume he'd rather have only one test.  Generic seems to be
the best available, maybe there should be a Darwin subdirectory?

llvm-svn: 79877
2009-08-24 01:03:42 +00:00
Oscar Fuentes 94e470504f CMake: Updated library dependencies and list of source files.
llvm-svn: 79876
2009-08-23 23:59:15 +00:00
Chris Lattner 96cffa63a2 remove the dead std::ostream APInt inserter
llvm-svn: 79875
2009-08-23 23:11:28 +00:00
Chris Lattner befdbd91cc remove this test: it is testing for a "feature" I just removed.
llvm-svn: 79874
2009-08-23 23:01:02 +00:00
Chris Lattner 30ebdc4311 remove the last uses of Config/alloca.h
llvm-svn: 79873
2009-08-23 22:57:38 +00:00
Chris Lattner 486fcad4a8 fix some problems with my last patch which happen when one of
(HAVE_GV && (HAVE_DOT || HAVE_FDP || HAVE_NEATO || \
                   HAVE_TWOPI || HAVE_CIRCO))
are true.

llvm-svn: 79872
2009-08-23 22:53:53 +00:00
Chris Lattner f6f5b5bcdb just remove interpreter support for endianness mismatches. This was
really old code from when we were running sparcv9 bc files on x86
(before I ported llvm-gcc 3 to work on x86) :)

llvm-svn: 79871
2009-08-23 22:50:28 +00:00
Chris Lattner 390d78b3d0 remove use of alloca.h
llvm-svn: 79870
2009-08-23 22:49:13 +00:00
Chris Lattner c521f54198 Prune #includes from llvm/Linker.h and llvm/System/Path.h,
forcing them down into various .cpp files.

This change also:
1. Renames TimeValue::toString() and Path::toString() to ::str()
   for similarity with the STL.
2. Removes all stream insertion support for sys::Path, forcing
   clients to call .str().
3. Removes a use of Config/alloca.h from bugpoint, using smallvector
   instead.
4. Weans llvm-db off <iostream>

sys::Path really needs to be gutted, but I don't have the desire to
do it at this point.

llvm-svn: 79869
2009-08-23 22:45:37 +00:00
Chris Lattner 5db2ff5037 disuade people from using ostream.
llvm-svn: 79866
2009-08-23 21:53:47 +00:00
Chris Lattner 1518c64a23 llvm/Support/Streams.h is now dead, zap it.
llvm-svn: 79865
2009-08-23 21:50:26 +00:00
Chris Lattner f31ef09249 Switch SubtargetFeature off of ostreams
llvm-svn: 79864
2009-08-23 21:41:43 +00:00
Chris Lattner b9f25f9e19 eliminate the ostream version of CheckBitcodeOutputToConsole,
change the raw_ostream one to take the raw_ostream byref instead
of byptr.  Prune #includes, eliminate a use of Streams.h

llvm-svn: 79863
2009-08-23 21:36:09 +00:00
Daniel Dunbar 47a309c5ca Fix off-by-one in llvm::Format::print.
- This also shortens the Format.h implementation, and uses the print buffer
   fully (it was wasting a character).

 - This manifested as llvm-test failures, because one side effect was that
   raw_ostream would write garbage '\x00' values into the output stream if it
   happened that the string was at the end of the buffer. This meant that grep
   would report 'Binary file matches', which meant the silly pattern matching
   llvm-test eventually does would fail. Cute. :)

llvm-svn: 79862
2009-08-23 20:31:39 +00:00
Jim Grosbach 1b0436bd1b SJLJ pass needs to punt if there's no personality function available.
llvm-svn: 79858
2009-08-23 18:13:48 +00:00
Chris Lattner 36b3caf9c0 clean up #includes.
llvm-svn: 79857
2009-08-23 18:09:02 +00:00
Daniel Dunbar a9e1d3f065 Rerevert (r75663 and r76805), seems there is more non-determinism.
llvm-svn: 79856
2009-08-23 17:26:24 +00:00
Jakob Stoklund Olesen 972c8fab51 Fix PR4753.
When undoing a reuse in ReuseInfo::GetRegForReload, check if it was only a
sub-register being used. The MachineOperand::getSubReg() method is only valid
for virtual registers, so we have to recover the sub-register index manually.

llvm-svn: 79855
2009-08-23 13:01:45 +00:00
Benjamin Kramer 940fbb0e3c Remove Streams.h from the targets.
llvm-svn: 79853
2009-08-23 11:52:17 +00:00
Benjamin Kramer 1a25d733f9 Kill off more cerr/cout uses and prune includes a bit.
llvm-svn: 79852
2009-08-23 11:37:21 +00:00
Daniel Dunbar 2982196fca Speculatively revert r76823 (i.e., reapply r75663 and r76805) to see if the real
problem is fixed by the TableGen determinism fix.

llvm-svn: 79851
2009-08-23 10:44:51 +00:00
Benjamin Kramer c2dbd5d671 Try to fix MSVC build after r79846.
llvm-svn: 79850
2009-08-23 10:39:21 +00:00
Daniel Dunbar 5e0a58bef4 Fix -Asserts warnings.
llvm-svn: 79849
2009-08-23 10:29:55 +00:00
Benjamin Kramer c9aa480832 Remove uses of Streams.h from CommandLine.cpp, fix some whitespace and other minor tweaks.
llvm-svn: 79847
2009-08-23 10:01:13 +00:00
Daniel Dunbar ced008152f Fix non-determinism in DAGISel emitter.
- This manifested as non-determinism in the .inc output in rare cases (when two
   distinct patterns ended up being equivalent, which is rather rare). That
   meant the pattern matching was non-deterministic, which could eventually mean
   the code generator selected different instructions based on the arch.

 - It's probably worth making the DAGISel ensure a total ordering (or force the
   user to), but the simple fix here is to totally order the Record* maps based
   on a unique ID.

 - PR4672, PR4711.

Yay:
--
ddunbar@giles:~$ cat ~/llvm.obj.64/lib/Target/*/*.inc | shasum
d1099ff34b21459a5a3e7021c225c080e6017ece  -
ddunbar@giles:~$ cat ~/llvm.obj.ppc/lib/Target/*/*.inc | shasum
d1099ff34b21459a5a3e7021c225c080e6017ece  -
--

llvm-svn: 79846
2009-08-23 09:47:37 +00:00
Benjamin Kramer b451afb5f2 Fix windows build.
llvm-svn: 79845
2009-08-23 08:57:52 +00:00
Daniel Dunbar 34ee203337 Fix some refactos for iostream changes (in -Asserts mode).
- The world needs better C++ refactoring tools, can I get an Amen!?

llvm-svn: 79843
2009-08-23 08:50:52 +00:00
Chris Lattner 471ba48cb9 remove some uses of llvm/Support/Streams.h
llvm-svn: 79842
2009-08-23 08:43:55 +00:00