Commit Graph

1006 Commits

Author SHA1 Message Date
Daniel Dunbar 33d86f22f2 Fix Triple to recognize the 'bfin' arch.
llvm-svn: 79325
2009-08-18 07:06:26 +00:00
Daniel Dunbar 320d331311 Recognize xscale as an ARM arch.
- Patch by Yonggang Luo.

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

llvm-svn: 79314
2009-08-18 04:43:27 +00:00
Chris Lattner ee97b8b11c 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
Erick Tryzelaar 19f63b2e4d Modify APFloat to take a StringRef instead of a c string.
This also adds unit tests to APFloat that mainly tests the
string handling of APFloat, but not much else of it's api.

llvm-svn: 79210
2009-08-16 23:36:19 +00:00
Dan Gohman b20757bdeb Mingw also doesn't have st_blksize.
llvm-svn: 79142
2009-08-15 21:41:03 +00:00
Dan Gohman 177102271d Always check to see if raw_fd_ostream's file descriptor is attached to
a terminal, not just when it's STDOUT_FILENO.

llvm-svn: 79066
2009-08-15 02:05:19 +00:00
Dan Gohman 186b85dbcc Add support for column computation on unbuffered streams.
llvm-svn: 79065
2009-08-15 02:02:59 +00:00
Dan Gohman 250635e3ac Move FormattedStream's write_impl out of line.
llvm-svn: 79064
2009-08-15 02:01:04 +00:00
Dan Gohman e9f0bf5dee Remove an unnecessary #include.
llvm-svn: 79063
2009-08-15 01:56:38 +00:00
Chris Lattner 0792195c5a fix "pc" to be lower case in a target triple, patch by Yonggang Luo
llvm-svn: 79016
2009-08-14 18:48:13 +00:00
Dan Gohman 4af229e0eb When standard output is a terminal, set outs() to be unbuffered, to
mimic the behavior of stdtout, which is line-buffered when the output
is a terminal. This fixes some issues with bugpoint output appearing
being printed out of order.

llvm-svn: 78953
2009-08-13 23:18:56 +00:00
Dan Gohman c04a00a0b0 Fix a compiler warning about comparing signed with unsigned.
llvm-svn: 78933
2009-08-13 20:32:03 +00:00
Dan Gohman 9820555546 Add an assert to check copy_to_buffer's precondition.
llvm-svn: 78926
2009-08-13 18:38:15 +00:00
Dan Gohman 854ea3c580 Set raw_os_ostream, raw_string_ostream, and raw_svector_ostream to be
unbuffered. std::ostream does its own buffering, and std::string and
SmallVector both have allocation strategies intended to handle frequent
appending.

llvm-svn: 78924
2009-08-13 17:41:40 +00:00
Dan Gohman 84487b98a5 Add support to raw_ostream for sizing the buffer according to the
needs of the underlying output mechanism. raw_fd_ostream now uses
st_blksize from fstat to determine a buffer size.

llvm-svn: 78923
2009-08-13 17:27:29 +00:00
Dan Gohman 54401d4174 Move SetBufferSize and SetUnbuffered out of line.
llvm-svn: 78909
2009-08-13 15:58:55 +00:00
Dan Gohman 52022c2373 Fix the buffer handling logic so that write_impl is always called with
a full buffer, rather than often being called with a
slightly-less-than-full buffer.

llvm-svn: 78907
2009-08-13 15:44:52 +00:00
Daniel Dunbar 3a1efd11bb Convert APint::{fromString,APInt,getBitsNeeded} to use StringRef.
- Patch by Erick Tryzelaar, with some edits (and a bug fix) from me.

llvm-svn: 78885
2009-08-13 02:33:34 +00:00
Dan Gohman 1432ef864e This void is implicit in C++.
llvm-svn: 78848
2009-08-12 22:10:57 +00:00
Dale Johannesen 54be785be7 Add attempted idiotproofing comment per review.
llvm-svn: 78825
2009-08-12 18:04:11 +00:00
Dale Johannesen 34c08bbbf9 Fix a nondeterministic bug in APInt::roundToDouble;
when !isSingleWord() but getActiveBits() is small,
we were using the pointer value instead of the low
word of the integer value.

llvm-svn: 78821
2009-08-12 17:42:34 +00:00
Chris Lattner 8268cc9c77 the x86 version of the name is x86-64, not x86_64. Handle this properly
in getArchTypeForLLVMName.

llvm-svn: 78799
2009-08-12 06:45:02 +00:00
Chris Lattner e0971bc29f add support for mingw64 target triples.
llvm-svn: 78797
2009-08-12 06:32:10 +00:00
Chris Lattner 553c9f35a7 add a couple of helpers to the Triple class for decoding
the darwin version string.  This should help consolidate
the variety of weird functions we have scattered around the
codebase that do stuff like this.

llvm-svn: 78792
2009-08-12 06:19:40 +00:00
Chris Lattner 5d47e93532 add a trivial line # cache to SourceMgr to make repeated queries to
FindLineNumber much faster when in sequence.

llvm-svn: 78693
2009-08-11 17:49:14 +00:00
Daniel Dunbar 1bf60c257c Add support for a user supplied pointer argument to llvm_install_error_handler.
llvm-svn: 78553
2009-08-10 03:36:26 +00:00
Dan Gohman 46ffffa750 Fix FindExecutable to use sys::Path::GetMainExecutable instead of
just argv[0]. And remove the code for searching the current
working directory and for searching PATH; the point of FindExecutable
is not to find whatever version of the executable can be found by
searching around, but to find an executable that accompanies the
current executable.

Update the tools to use sys::Program::FindProgramByName when they
want PATH searching.

llvm-svn: 78240
2009-08-05 20:21:17 +00:00
Dan Gohman 400cd1a87a cerr isn't buffered so it doesn't need to be flushed.
llvm-svn: 78135
2009-08-05 00:44:01 +00:00
Daniel Dunbar 719d235520 Remove now unused arguments from TargetRegistry::lookupTarget.
llvm-svn: 77950
2009-08-03 04:20:57 +00:00
Daniel Dunbar 0f16ea5c30 Pass target triple string in to TargetMachine constructor.
This is not just a matter of passing in the target triple from the module;
currently backends are making decisions based on the build and host
architecture. The goal is to migrate to making these decisions based off of the
triple (in conjunction with the feature string). Thus most clients pass in the
target triple, or the host triple if that is empty.

This has one important change in the way behavior of the JIT and llc.

For the JIT, it was previously selecting the Target based on the host
(naturally), but it was setting the target machine features based on the triple
from the module. Now it is setting the target machine features based on the
triple of the host.

For LLC, -march was previously only used to select the target, the target
machine features were initialized from the module's triple (which may have been
empty). Now the target triple is taken from the module, or the host's triple is
used if that is empty. Then the triple is adjusted to match -march.

The take away is that -march for llc is now used in conjunction with the host
triple to initialize the subtarget. If users want more deterministic behavior
from llc, they should use -mtriple, or set the triple in the input module.

llvm-svn: 77946
2009-08-03 04:03:51 +00:00
Jakob Stoklund Olesen 552d8d6618 Analog Devices Blackfin back-end.
Generate code for the Blackfin family of DSPs from Analog Devices:

  http://www.analog.com/en/embedded-processing-dsp/blackfin/processors/index.html
  
We aim to be compatible with the exsisting GNU toolchain found at:

  http://blackfin.uclinux.org/gf/project/toolchain
  
The back-end is experimental.

llvm-svn: 77897
2009-08-02 17:32:10 +00:00
Benjamin Kramer 666cf9d2f2 Remove duplicated colons and spaces.
llvm-svn: 77892
2009-08-02 12:13:02 +00:00
Daniel Dunbar 2eaf396c41 Add missing flush().
llvm-svn: 77859
2009-08-02 04:12:28 +00:00
Ted Kremenek defdbdc5ca Update CMake files.
llvm-svn: 77709
2009-07-31 18:50:22 +00:00
Dan Gohman 060ca138e2 Remove Annotation.h, which is no longer used in the LLVM tree.
llvm-svn: 77706
2009-07-31 18:36:25 +00:00
Daniel Dunbar a91dd9bf5f Twine: Directly support int, long, and long long types.
- This should resolve Cygwin gcc ambiguities.

llvm-svn: 77624
2009-07-30 21:15:14 +00:00
Daniel Dunbar bd8556e0fb Twine: Use raw_ostream::write_hex, remove unused itohexstr method.
llvm-svn: 77617
2009-07-30 18:30:19 +00:00
Daniel Dunbar 6c9629b92a Add raw_ostream::write_hex
llvm-svn: 77614
2009-07-30 18:21:23 +00:00
Daniel Dunbar e8b3236284 Twine: Provide [u]int{32,64} conversions via implicit constructors instead of
explicitly.

llvm-svn: 77576
2009-07-30 03:47:15 +00:00
Daniel Dunbar 59a60c57a6 Perform simplification noticed by Reid.
llvm-svn: 77477
2009-07-29 17:29:36 +00:00
David Greene ea2f1ceb4b Re-apply previous changes and improve column padding performance some more.
llvm-svn: 77461
2009-07-29 16:08:27 +00:00
Daniel Dunbar b49994ad7e Twines: Support numeric conversion directly (uitostr, etc).
- Provides static constructors for doing number to string conversions without
   using temporaries.

 - There are several ways to do this, I think given the Twine constraints this
   is the simplest one.

 - One FIXME for fast number -> hex conversion.

 - Added another comment on one last major bit of perf work Twines need, which
   is to make raw_svector_ostream more efficient.

llvm-svn: 77445
2009-07-29 07:08:44 +00:00
Daniel Dunbar a94f58aee5 raw_ostream: Follow the 32-bit path when printing "small" decimal numbers.
llvm-svn: 77444
2009-07-29 06:45:14 +00:00
Daniel Dunbar af71a3035b Revert r77397, it causes significant regressions in llc performance.
llvm-svn: 77425
2009-07-29 03:04:22 +00:00
David Greene 5f6511c3d5 Improve performance of PadToColumn by eliminating flushes.
llvm-svn: 77397
2009-07-28 23:26:34 +00:00
Dan Gohman 4b66b47a7c Make raw_null_ostream flush its buffer in its destructor, so that
it conforms to the assertion added in r77245. This fixes a failure
in qa_override.c in clang's testsuite.

llvm-svn: 77255
2009-07-27 21:46:02 +00:00
Dan Gohman 1b763293a6 Add an assertion check to raw_ostream's destructor to verify
that the subclass hasn't left any pending data in the buffer.

llvm-svn: 77245
2009-07-27 20:49:44 +00:00
Daniel Dunbar a0ad190a35 Sort list of targets in --version.
llvm-svn: 77127
2009-07-26 05:09:50 +00:00
Daniel Dunbar bd481a119c Oops, forgot XCore. Sorry XCore!
llvm-svn: 77125
2009-07-26 04:52:45 +00:00