Duncan Sands
efb6d3b78e
Add triple for OpenBSD.
...
llvm-svn: 74422
2009-06-29 13:36:13 +00:00
Owen Anderson
1069071612
Use atomic operations for accessing this global counter.
...
llvm-svn: 74294
2009-06-26 18:09:03 +00:00
Douglas Gregor
6d9b0e8c19
Fix linking of llvm-ld and lli with CMake, from Xerxes Rånby
...
llvm-svn: 74285
2009-06-26 15:37:00 +00:00
Owen Anderson
5417ad7e3b
Support thread-local pretty stack traces.
...
llvm-svn: 74227
2009-06-25 23:31:33 +00:00
Owen Anderson
2d65e89f30
Use atomic operations when accessing statistics, and make the lazy initialization of statistics actually threadsafe.
...
llvm-svn: 74005
2009-06-23 21:19:38 +00:00
Owen Anderson
226e1d8bda
Make timers threadsafe again. This isn't quite as nice as I'd hoped (it uses locking rather than atomic arithmetic),
...
but should work on all the platforms we care about.
I might revisit this if a totally awesome way to do it occurs to me.
llvm-svn: 74002
2009-06-23 20:52:29 +00:00
Owen Anderson
c11dfb46c1
Revert my last series of commits related to Timer and 64-bit atomics. Not all the targets
...
we care about are capable of supporting it.
llvm-svn: 73993
2009-06-23 20:17:22 +00:00
Lang Hames
7640e42869
Switched size_t to int64_t to prevent type mismatch in call to max.
...
llvm-svn: 73988
2009-06-23 19:49:23 +00:00
Owen Anderson
27a85303fe
Actually, these need to be signed integers, not unsigned.
...
llvm-svn: 73978
2009-06-23 18:21:13 +00:00
Owen Anderson
7b3570b242
Use 64-bit integer counters for tracking time, rather than doubles. This will be more atomic op friendly.
...
llvm-svn: 73974
2009-06-23 18:12:30 +00:00
Owen Anderson
24a1453189
Make the lazy initialization of DefaultTimerGroup threadsafe.
...
llvm-svn: 73963
2009-06-23 17:33:37 +00:00
Owen Anderson
0cab9cae36
Revert r73923, which broke clang.
...
llvm-svn: 73957
2009-06-23 16:36:10 +00:00
Owen Anderson
7bce26b269
Guard the plugin loader.
...
llvm-svn: 73925
2009-06-23 00:02:39 +00:00
Owen Anderson
f00516f54d
Add guards around timer groups, which can be shared.
...
llvm-svn: 73923
2009-06-22 23:37:06 +00:00
Owen Anderson
9826df9126
Guard the statistics table.
...
llvm-svn: 73916
2009-06-22 23:08:27 +00:00
Owen Anderson
d6704d5985
Guard the global annotation tables.
...
llvm-svn: 73913
2009-06-22 22:44:15 +00:00
Chris Lattner
dd95ab3ca9
rename SourceMgr::PrintError to PrintMessage.
...
llvm-svn: 73861
2009-06-21 21:22:11 +00:00
Chris Lattner
c865ea76a6
move include searching logic from TGLexer to SourceMgr.
...
llvm-svn: 73845
2009-06-21 05:06:04 +00:00
Chris Lattner
5b9a2d79c0
Rename TGSourceMgr -> SourceMgr.
...
llvm-svn: 73844
2009-06-21 03:41:50 +00:00
Chris Lattner
4ff2620742
rename TGLoc -> SMLoc.
...
llvm-svn: 73843
2009-06-21 03:39:35 +00:00
Chris Lattner
4ed87b8790
move TGSourceMgr class out of TableGen into libsupport.
...
llvm-svn: 73842
2009-06-21 03:36:54 +00:00
Duncan Sands
30dcb8401d
Add support for AuroraUX. Patch by evocallaghan.
...
llvm-svn: 73766
2009-06-19 14:40:01 +00:00
Ted Kremenek
e88e953645
Update CMake files to account for new location of Threading.cpp.
...
llvm-svn: 73708
2009-06-18 17:47:09 +00:00
Owen Anderson
a59f91c08d
Move Threading.[h|cpp] from Support to System.
...
llvm-svn: 73707
2009-06-18 16:54:52 +00:00
Owen Anderson
5c476a6687
Add newline at end of file.
...
llvm-svn: 73551
2009-06-16 20:53:09 +00:00
Douglas Gregor
4bf70ccfd6
Add Threading.cpp to the CMake project files
...
llvm-svn: 73516
2009-06-16 17:45:38 +00:00
Owen Anderson
b7cdd1a395
Split the thread-related APIs out into their own file, and add a few more
...
calls for convenience.
llvm-svn: 73512
2009-06-16 17:33:51 +00:00
Torok Edwin
5da9f51d1e
Add support for outputting ANSI colors to raw_fd_ostream.
...
llvm-svn: 72854
2009-06-04 07:09:50 +00:00
Mike Stump
5447116cbb
Add support for letting the client choose different flavors of NaNs. Testcase to be
...
added in clang.
llvm-svn: 72606
2009-05-30 03:49:43 +00:00
Bill Wendling
8235a05c1a
Untabification.
...
llvm-svn: 72604
2009-05-30 01:09:53 +00:00
Douglas Gregor
4d8d0356d0
Minor fix for CMake build system
...
llvm-svn: 72480
2009-05-27 16:52:17 +00:00
Daniel Dunbar
aa01cbb890
Add llvm::triple constructor from arch, vendor, os strings, and recognize
...
DragonFly OS type.
llvm-svn: 72242
2009-05-22 02:24:11 +00:00
Evan Cheng
dd4f34ed9a
80 column violation.
...
llvm-svn: 72235
2009-05-21 23:47:47 +00:00
Owen Anderson
4f6709ebd6
Have llvm_start_multithreaded return a bool indicating whether multithreaded
...
initialization succeeded or not, rather than just asserting.
llvm-svn: 72182
2009-05-20 21:03:06 +00:00
Owen Anderson
47460293cf
Add llvm_start_multithreaded(), which starts up the LLVM internals in thread-safe mode. Provide double-check locking
...
initialization of ManagedStatic's when running in thread-safe mode.
llvm-svn: 72151
2009-05-20 00:39:20 +00:00
Eli Friedman
573333530f
Tweak MemoryBuffer::getSTDIN so that it returns after the first EOF.
...
It doesn't matter for piped input, but it's annoying when typing at the
console.
llvm-svn: 71998
2009-05-18 08:44:04 +00:00
Mike Stump
329994e9d4
Add dumping support for DW_AT_APPLE_isa and DW_AT_APPLE_block.
...
Radar 6867696
llvm-svn: 71750
2009-05-14 00:03:51 +00:00
Mike Stump
6666fa7a2c
Fix whitespacing (space after switch).
...
llvm-svn: 71738
2009-05-13 23:23:20 +00:00
Jay Foad
9768cabf4a
Move helper functions for optimizing division by constant into the APInt
...
class.
llvm-svn: 70488
2009-04-30 10:15:35 +00:00
Bill Wendling
3f4c6171d1
Add support for a character after a command line option. Like '-Os'.
...
llvm-svn: 70437
2009-04-29 23:26:16 +00:00
Chris Lattner
d68b203337
Fix PR4040: APInt's string constructor is too strict
...
patch by Jeff Yasskin!
llvm-svn: 70058
2009-04-25 18:34:04 +00:00
Douglas Gregor
bdeba00c46
Make all raw_ostreams support the tell() function.
...
llvm-svn: 69583
2009-04-20 07:34:17 +00:00
Chris Lattner
b46ad5bbba
teach EscapeString and UnescapeString to handle ".
...
llvm-svn: 69211
2009-04-15 20:12:52 +00:00
Chris Lattner
fc47fb0629
Remove AllowInverse: it leaks memory and is not the right
...
abstraction for CommandLine.
llvm-svn: 68588
2009-04-08 03:43:51 +00:00
Mikhail Glushenkov
87b0df5b28
Fix build on Linux.
...
llvm-svn: 68269
2009-04-02 01:11:37 +00:00
Daniel Dunbar
588d3d1fd6
Add llvm::Triple class for abstracting access to target triples.
...
- The code is silly, I'm just amusing myself. Rewrite to be efficient
if you like. :)
Also, if you wish to debate the proper names of the triple components
I'm all ears.
llvm-svn: 68252
2009-04-01 21:53:23 +00:00
Dan Gohman
770f4158e5
Use CHAR_BIT instead of hard-coding 8 in several places where it
...
is appropriate. This helps visually differentiate host-oriented
calculations from target-oriented calculations.
llvm-svn: 68227
2009-04-01 18:45:54 +00:00
Misha Brukman
ea884c9e5e
* Fixed spelling of `invertible'
...
* Simplified if statement
llvm-svn: 68163
2009-04-01 00:15:46 +00:00
Chris Lattner
601a4d8c70
move a large method out of line.
...
llvm-svn: 67892
2009-03-28 02:08:47 +00:00
Dale Johannesen
34123aba43
Fix internal representation of fp80 to be the
...
same as a normal i80 {low64, high16} rather
than its own {high64, low16}. A depressing number
of places know about this; I think I got them all.
Bitcode readers and writers convert back to the old
form to avoid breaking compatibility.
llvm-svn: 67562
2009-03-23 21:16:53 +00:00
Dan Gohman
18daca0895
Now that errs() is properly non-buffered, there's no need to
...
explicitly flush it.
llvm-svn: 67526
2009-03-23 15:57:19 +00:00
Duncan Sands
45d4adde66
Fix comment typo.
...
llvm-svn: 67302
2009-03-19 11:37:15 +00:00
Daniel Dunbar
7c9dba0950
Add BUILTIN_EXPECT Support/Compiler macro.
...
- Use for exceptional buffer conditions in raw_ostream:write to shave
off a cycle or two.
- Please rename if you have a better one.
llvm-svn: 67103
2009-03-17 21:15:18 +00:00
Daniel Dunbar
2cc1ec75e1
raw_ostream: Put all exceptional conditions in raw_ostream::write
...
under a single branch.
Also, add a FIXME for formatted output.
llvm-svn: 67069
2009-03-17 01:36:56 +00:00
Daniel Dunbar
b04be1838d
raw_ostream: Rework implementation of unbuffered streams so outputting
...
a single character requires only one branch to follow slow path.
- Never use a buffer when writing on an unbuffered stream.
- Move default buffer size to header.
llvm-svn: 67066
2009-03-17 01:13:35 +00:00
Daniel Dunbar
2062a58347
raw_ostream: Replace flush_impl with write_impl, which takes data to
...
write as arguments.
- Add raw_ostream::GetNumBytesInBuffer.
- Privatize buffer pointers.
- Get rid of slow and unnecessary code for writing out large strings.
llvm-svn: 67060
2009-03-16 23:29:31 +00:00
Daniel Dunbar
c2d554fe0b
raw_ostream: Lift out flush_nonempty.
...
- Flush a known non-empty buffers; enforces the interface to
flush_impl and kills off HandleFlush (which I saw no reason to be
an inline method, Chris?).
- Clarify invariant that flush_impl is only called with OutBufCur >
OutBufStart.
- This also cleary collects all places where we have to deal with the
buffer possibly not existing.
- A few more comments and fixing the unbuffered behavior remain in
this commit sequence.
llvm-svn: 67057
2009-03-16 22:55:06 +00:00
Daniel Dunbar
5ef319c7d7
Make raw_ostream::operator<<(const void *) fast; it doesn't matter but
...
it is easy.
llvm-svn: 67054
2009-03-16 22:08:44 +00:00
Daniel Dunbar
c64fdabf4f
Add slow path for single character write, and use exclusively for
...
single characters writes outside of the fast path in raw_ostream.h
llvm-svn: 67053
2009-03-16 22:00:17 +00:00
Stuart Hastings
4ee393a21a
Fix a hashing bug in APInt. A certain pathological testcase (too
...
large for the testsuite) took over six minutes to compile on my Mac.
The patched LLVM-GCC compiles that testcase in three seconds (GCC
takes less than one second). This hash function is more complex
(about 35 instructions on x86) than what Chris wanted, but I expect it
will be well-behaved with arbitrary inputs.
Thank you to everyone who responded to my previous request for advice.
llvm-svn: 66962
2009-03-13 21:51:13 +00:00
Chris Lattner
6f7628bd8e
just initialize the first element, we don't need to set the rest to zeros.
...
llvm-svn: 66850
2009-03-13 00:24:01 +00:00
Chris Lattner
99b48e57ba
Eliminate a 9640 byte static mutable initialized data item by moving it
...
to the stack. This shrinks all llvm tools by 9k, and improves reentrancy.
llvm-svn: 66847
2009-03-13 00:03:51 +00:00
Chris Lattner
f835ec9a9d
static functions don't need an anonymous namespace.
...
llvm-svn: 66845
2009-03-12 23:59:55 +00:00
Daniel Dunbar
b60a074565
PR3478: raw_ostream should not buffer stderr
...
- Add unbuffered flag to raw_ostream, forwarded by raw_fd_ostream and
used by raw_stderr_ostream.
llvm-svn: 66545
2009-03-10 16:21:55 +00:00
Dan Gohman
23d7aa62d4
Use c_str() to force the string to be nul-terminated.
...
llvm-svn: 66279
2009-03-06 18:13:15 +00:00
Chris Lattner
bf3dee4ec7
on apple systems, integrate nicely with crash reporter.
...
llvm-svn: 66264
2009-03-06 07:19:54 +00:00
Duncan Sands
e53256c66c
Add missing file.
...
llvm-svn: 66160
2009-03-05 09:19:13 +00:00
Chris Lattner
c4f40d1f53
Daniel wanted the stack printed upside down. Perhaps he
...
feels a kinship to machine stacks that grow down. Now we get
stuff like this:
Stack dump:
0. Program arguments: clang clang_crash_Iw2Osj.mi
1. /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: parsing function body '_mm_cvtpi16_ps'
2. /Developer/SDKs/MacOSX10.5.sdk/usr/lib/gcc/i686-apple-darwin9/4.0.1/include/xmmintrin.h:624:1: in compound statement ('{}')
Abort
llvm-svn: 66145
2009-03-05 07:03:49 +00:00
Chris Lattner
982c3491ff
indicate what the program args line is.
...
llvm-svn: 66144
2009-03-05 06:51:42 +00:00
Chris Lattner
84424b02bb
add some helper classes for building light-weight symbolic stack traces
...
that get printed when a program crashes. This is the first step of many.
llvm-svn: 66076
2009-03-04 21:40:23 +00:00
Devang Patel
25f2741ae9
The debugger sometimes lookup dynamically in the runtime to find ivar info of any Objective-C classes. It would be very helpful to debugger if the compiler encodes runtime version number in DWARF.
...
Add support for two additional DWARF attributes to encode Objective-C runtime version number.
llvm-svn: 64834
2009-02-17 22:43:44 +00:00
Cedric Venet
48be6b5e15
Unbreak the build on win32.
...
Cleanup some warning.
Remark: when struct/class are declared differently than they are defined, this make problem for VC++ since it seems to mangle class differently that struct. These error are very hard to understand and find. So please, try to keep your definition/declaration in sync.
Only tested with VS2008. hope it does not break anything. feel free to revert.
llvm-svn: 64554
2009-02-14 16:06:42 +00:00
Evan Cheng
ec9d3c889f
Switch from new[] + delete[] to malloc + free since llvm does not catch C++ exceptions.
...
llvm-svn: 64448
2009-02-13 08:24:55 +00:00
Evan Cheng
643730a194
If new[] fails, return 0 rather then trying to dereference a null pointer.
...
llvm-svn: 64444
2009-02-13 07:54:34 +00:00
Nick Lewycky
f273659759
Add an API for strings with possible NULLs in the middle. Refactor the other
...
two AddString methods to use it.
llvm-svn: 64005
2009-02-07 04:57:08 +00:00
Mike Stump
4c8ca99bb1
Improve -fno-opt style option processing to not require an extra
...
option to make the -fno- form on the option. We also document the new
form in the CommandLine documentation.
llvm-svn: 63559
2009-02-02 22:48:49 +00:00
Mike Stump
a0b25f92ce
Add opposite_of and inverse_opt to support -fno- style options. This
...
is necessary for eventual gcc commmand line compatibility.
llvm-svn: 63384
2009-01-30 08:19:46 +00:00
Mikhail Glushenkov
2b0004bd39
Clarify comment.
...
llvm-svn: 63171
2009-01-28 03:46:22 +00:00
Torok Edwin
47c303034d
APInt's countLeadingOnes() was broken for negative i128 values,
...
causing assertion failures in getSExtValue().
Fix it by making highWordBits actually contain what its name says,
and add some more unit-tests for APInt.
This fixes PR3419.
llvm-svn: 63107
2009-01-27 18:06:03 +00:00
Ted Kremenek
d8045c9154
Add method raw_fd_ostream::seek() for random access within a file.
...
llvm-svn: 63044
2009-01-26 21:42:04 +00:00
Devang Patel
d980abaae2
Introduce two DWARF attribute extentions DW_AT_APPLE_optimized, DW_AT_APPLE_flags.
...
DW_AT_APPLE_optimized flag is set when a compile_unit is optimized. The debugger takes advantage of this information some way.
DW_AT_APPLE_flags encodes command line options when certain env. variable is set. This is used by build engineers to track various gcc command lines used by by a project, irrespective of whether the project used makefile, Xcode or something else.
llvm-gcc patch is next.
llvm-svn: 62888
2009-01-23 22:33:47 +00:00
Dale Johannesen
a5699a1e8b
Do not use host floating point types when emitting
...
ASCII IR; loading and storing these can change the
bits of NaNs on some hosts. Remove or add warnings
at a few other places using host floating point;
this is a bad thing to do in general.
llvm-svn: 62712
2009-01-21 20:32:55 +00:00
Chris Lattner
ca83aa289a
Remove uses of uint32_t in favor of 'unsigned' for better
...
compatibility with cygwin. Patch by Jay Foad!
llvm-svn: 62695
2009-01-21 18:09:24 +00:00
Mikhail Glushenkov
898af4fdfa
Mimic gcc behaviour with regard to response files.
...
llvm-svn: 62688
2009-01-21 13:14:02 +00:00
Dale Johannesen
6854f86296
Make special cases (0 inf nan) work for frem.
...
Besides APFloat, this involved removing code
from two places that thought they knew the
result of frem(0., x) but were wrong.
llvm-svn: 62645
2009-01-21 00:35:19 +00:00
Dale Johannesen
c9e6e85a38
Add an IEEE remainder function, which is not
...
fully implemented yet and not used. This is
mainly to clarify that APFloat::mod implements
C fmod, not remainder.
llvm-svn: 62593
2009-01-20 18:35:05 +00:00
Chris Lattner
8ab719c566
improve compatibility with various versions of graphviz, patch by
...
Patrick Boettcher!
llvm-svn: 62592
2009-01-20 18:25:03 +00:00
Dale Johannesen
31f3cac06b
compile-time fmod was done incorrectly. PR 3316.
...
llvm-svn: 62528
2009-01-19 21:17:05 +00:00
Nick Lewycky
b98042a414
Fix typo, sentence fragment.
...
llvm-svn: 62512
2009-01-19 17:42:33 +00:00
Mikhail Glushenkov
b0aa02acee
Support for multi-valued options in CommandLine
...
Makes possible to specify options that take multiple arguments (a-la
-sectalign on Darwin). See documentation for details.
llvm-svn: 62372
2009-01-16 22:54:19 +00:00
Misha Brukman
71c7e40966
Removed trailing whitespace from Makefiles.
...
llvm-svn: 61991
2009-01-09 16:44:42 +00:00
Steve Naroff
266cb1d2fa
Tweak --version to include the date and time.
...
llvm-svn: 61378
2008-12-23 18:41:47 +00:00
Nuno Lopes
360aae23b1
remove unused var
...
llvm-svn: 60770
2008-12-09 17:04:06 +00:00
Nick Lewycky
69eb224a5e
Fixes for Visual Studio users. Patch by OvermindDL1 on llvm-dev!
...
llvm-svn: 60679
2008-12-08 00:45:02 +00:00
Ted Kremenek
a851e459e1
Have raw_fd_ostream keep track of the position in the file to make tell() go faster by not requiring a flush().
...
llvm-svn: 60560
2008-12-04 22:51:11 +00:00
Nuno Lopes
1e97b6c181
fix build on some machines. thanks buildbot
...
llvm-svn: 60175
2008-11-27 16:42:44 +00:00
Nuno Lopes
e3f6758e3c
fix my previous commit r60064: compare strings instead of pointers
...
llvm-svn: 60174
2008-11-27 16:37:02 +00:00
Bill Wendling
cbebccf936
Get rid of bogus "control may reach end of non-void function ‘...’ being
...
inlined" message.
llvm-svn: 60165
2008-11-27 08:00:12 +00:00
Ted Kremenek
b31e49cd47
Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.
...
llvm-svn: 60085
2008-11-26 03:33:13 +00:00
Evan Cheng
383a9a9264
Revert r60042. IndVarSimplify should check if APFloat is PPCDoubleDouble first before trying to convert it to an integer.
...
llvm-svn: 60072
2008-11-26 01:11:57 +00:00
Nuno Lopes
821f6d257e
change AnnotationManager to use 'const char*' instead of std::string. this fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time)
...
llvm-svn: 60064
2008-11-26 00:00:44 +00:00
Evan Cheng
c11d7e324f
convertToSignExtendedInteger should return opInvalidOp instead of asserting if sematics of float does not allow arithmetics.
...
llvm-svn: 60042
2008-11-25 19:00:29 +00:00
Daniel Dunbar
a830cb14f3
Add Binary flag to raw_fd_ostream constructor.
...
Document raw_fd_ostream's treatment of "-".
llvm-svn: 59219
2008-11-13 05:01:07 +00:00
Dan Gohman
1532a1621c
Overload AddInteger on int/long/long long instead of on int/int64_t,
...
to avoid overload ambiguities. This fixes build errors introduced
by r58623.
llvm-svn: 58632
2008-11-03 19:40:18 +00:00
Chris Lattner
3fed68158c
fix PR2953, an off-by-one error handling formatted i/o.
...
Thanks to Török Edwin for the awesome reduced testcase.
llvm-svn: 58199
2008-10-26 19:20:47 +00:00
Ted Kremenek
b04b85f615
Added raw_fd_ostream::close().
...
llvm-svn: 58052
2008-10-23 23:49:09 +00:00
Julien Lerouge
89f4df3eae
Fix for PR2881: fix a small leak exposed by valgrind, using a ManagedStatic.
...
llvm-svn: 57984
2008-10-22 16:30:41 +00:00
Daniel Dunbar
aa7a7ae8d5
Clear raw_fd_ostream error string on success and explain behavior in
...
documentation.
Add C++ header marker.
llvm-svn: 57923
2008-10-21 19:53:10 +00:00
Dan Gohman
9543edc4ef
Fix command-line option printing to print two spaces where needed,
...
instead of requiring all "short description" strings to begin with
two spaces. This makes these strings less mysterious, and it fixes
some cases where short description strings mistakenly did not
begin with two spaces.
llvm-svn: 57521
2008-10-14 20:25:08 +00:00
Dale Johannesen
7fbfe2a371
Change TAG_ names to DW_TAG for gcc (testsuite) compatibility.
...
llvm-svn: 57425
2008-10-12 21:23:01 +00:00
Dale Johannesen
2d23786266
Change Dwarf comments starting with AT_ to DW_AT_ to
...
match gcc. Helps with the testsuite.
llvm-svn: 57410
2008-10-12 06:20:47 +00:00
Chris Lattner
3d1cdfc99e
rearrange some code.
...
llvm-svn: 57384
2008-10-11 22:07:19 +00:00
Dale Johannesen
075a62519f
Add a "loses information" return value to APFloat::convert
...
and APFloat::convertToInteger. Restore return value to
IEEE754. Adjust all users accordingly.
llvm-svn: 57329
2008-10-09 23:00:39 +00:00
Dale Johannesen
9e57068854
Rename APFloat::convertToAPInt to bitcastToAPInt to
...
make it clearer what the function does. No functional
change.
llvm-svn: 57325
2008-10-09 18:53:47 +00:00
Dale Johannesen
3b86d974bc
Mark negative-zero-to-int conversion as Inexact,
...
since -0.0 can't be represented as an int.
This prevents llvm from reducing -0.0 to a
load-and-convert of int 0. Fixes
ieee.exp/mzero[2356].c in gcc testsuite.
llvm-svn: 57224
2008-10-07 00:40:01 +00:00
Dale Johannesen
40d00c0979
Be more precise about which conversions of NaNs
...
are Inexact. (These are not Inexact as defined
by IEEE754, but that seems like a reasonable way
to abstract what happens: information is lost.)
llvm-svn: 57218
2008-10-06 22:59:10 +00:00
Dale Johannesen
24ea5f2be7
Temporarily revert functionality change from my previous patch;
...
it is too aggressive.
llvm-svn: 57203
2008-10-06 20:43:48 +00:00
Dale Johannesen
89329a1d0a
Mark shortening NaN conversions as Inexact. PR 2856.
...
Improve description of unsupported formats.
llvm-svn: 57185
2008-10-06 18:22:29 +00:00
Oscar Fuentes
0f25988689
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Cedric Venet
d1b22a76d2
Updating VC++ project.
...
Adding one include file and correct one declaration from class to struct in order to make llvm compile on VC2005.
llvm-svn: 55279
2008-08-24 11:56:40 +00:00
Chris Lattner
3ad9fe55e5
Add raw_stream adaptors that write into an std::string and SmallVector/SmallString.
...
llvm-svn: 55265
2008-08-23 22:43:04 +00:00
Chris Lattner
fe3155fc62
Switch the asmprinter (.ll) and all the stuff it requires over to
...
use raw_ostream instead of std::ostream. Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).
Other interesting changes:
1) This makes Value::print be non-virtual.
2) AP[S]Int and ConstantRange can no longer print to ostream directly,
use raw_ostream instead.
3) This fixes a bug in raw_os_ostream where it didn't flush itself
when destroyed.
4) This adds a new SDNode::print method, instead of only allowing "dump".
A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream
versions.
This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.
llvm-svn: 55263
2008-08-23 22:23:09 +00:00
Chris Lattner
4623abf761
add #include
...
llvm-svn: 55252
2008-08-23 20:34:06 +00:00
Chris Lattner
b7914ec04e
add a simple mechanism for formatted output. This gives raw_ostream's
...
all the power and risk of fprintf format strings. Use them like this:
OS << format("%10.4f", 42.0) << "\n" << format("%x", 42) << '\n';
llvm-svn: 55246
2008-08-23 19:23:10 +00:00
Dan Gohman
b6827db2c0
Add a clear() method to FoldingSet.
...
llvm-svn: 55210
2008-08-23 00:42:16 +00:00
Chris Lattner
39ea1a575a
improve support for systems that need unistd.h to get STDOUT_FILENO.
...
Patch contributed by Bjorn Reese!
llvm-svn: 55179
2008-08-22 15:45:00 +00:00
Owen Anderson
0b0215d531
Fix write() when the string being written is larger than the buffer. This broke various ObjC testcases
...
with very long symbol names.
llvm-svn: 55148
2008-08-21 22:39:33 +00:00
Owen Anderson
5a542e7eda
Move non-trivial methods out of line to avoid code-size bloat.
...
llvm-svn: 55138
2008-08-21 20:58:52 +00:00
Owen Anderson
2c1d54952b
Use raw_ostream throughout the AsmPrinter.
...
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Chris Lattner
c9fdd97035
Move the fast-path (<=i64) cases of various APInt methods inline
...
and the slow-path cases out of line. This speeds up instcombine
a bit in real world cases. Patch contributed by m-s.
llvm-svn: 55063
2008-08-20 17:02:31 +00:00
Dan Gohman
9a43334166
It's not necessary to check if a value is null before delete[].
...
llvm-svn: 55053
2008-08-20 14:55:37 +00:00
Argyrios Kyrtzidis
5c264cf5c7
Get raw_ostream.cpp to compile on MSVC.
...
llvm-svn: 54879
2008-08-17 09:25:21 +00:00
Chris Lattner
c0610874cc
Rework the routines that convert AP[S]Int into a string. Now, instead of
...
returning an std::string by value, it fills in a SmallString/SmallVector
passed in. This significantly reduces string thrashing in some cases.
More specifically, this:
- Adds an operator<< and a print method for APInt that allows you to
directly send them to an ostream.
- Reimplements APInt::toString to be much simpler and more efficient
algorithmically in addition to not thrashing strings quite as much.
This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the
asmprinter. This also fixes a bug I introduced into the asmwriter in a
previous patch w.r.t. alias printing.
llvm-svn: 54873
2008-08-17 07:19:36 +00:00
Chris Lattner
4e4a482a41
remove a dead APInt ctor.
...
llvm-svn: 54869
2008-08-17 04:58:58 +00:00
Chris Lattner
dab4a64423
add support for a cout/cerr analog (outs()/errs()) as well as
...
a simple adaptor class to give raw output capabilities to
something that wants to write to an ostream.
llvm-svn: 54865
2008-08-17 04:13:37 +00:00
Chris Lattner
c9c1d50446
opening "-" automatically yields stdout.
...
llvm-svn: 54863
2008-08-17 03:53:23 +00:00
Chris Lattner
eef022091c
rename OutputData to 'write' to match ostream.
...
llvm-svn: 54857
2008-08-17 01:46:05 +00:00
Chris Lattner
312d8de59b
add a new raw_ostream class which is an extremely high performance ostream that
...
can *only* output data (no seeking, reading, etc). This is adapted from the
clang "-E outputter", and is roughly 10% faster than stdio on darwin and 30%
(or more) faster than std::ostream.
llvm-svn: 54855
2008-08-17 01:35:29 +00:00
Dan Gohman
74ac3fddee
Avoid repeatedly reallocating the FoldingSetNodeID when searching
...
through multiple nodes in a bucket.
llvm-svn: 54687
2008-08-12 17:40:22 +00:00
Dan Gohman
de163bb39d
Fix several const-correctness issues, resolving some -Wcast-qual warnings.
...
llvm-svn: 54349
2008-08-05 14:45:15 +00:00
Dan Gohman
9653b21dc2
Fold the useful features of alist and alist_node into ilist, and
...
a new ilist_node class, and remove them. Unlike alist_node,
ilist_node doesn't attempt to manage storage itself, so it avoids
the associated problems, including being opaque in gdb.
Adjust the Recycler class so that it doesn't depend on alist_node.
Also, change it to use explicit Size and Align parameters, allowing
it to work when the largest-sized node doesn't have the greatest
alignment requirement.
Change MachineInstr's MachineMemOperand list from a pool-backed
alist to a std::list for now.
llvm-svn: 54146
2008-07-28 21:51:04 +00:00
Wojciech Matyjewicz
eea926ec20
Fix PR2088. Use modulo linear equation solver to compute loop iteration
...
count.
llvm-svn: 53810
2008-07-20 15:55:14 +00:00
Dan Gohman
e76fd33ee5
Reapply 53476 and 53480, with a fix so that it properly updates
...
the BB member to the current basic block after emitting
instructions.
llvm-svn: 53567
2008-07-14 18:19:29 +00:00
Evan Cheng
ebf7ff4531
Back out 53476 and 53480 for now. Somehow they cause llc to miscompile 179.art.
...
llvm-svn: 53502
2008-07-12 01:38:51 +00:00
Dan Gohman
6ee2195ab1
Add support for putting NamedRegionTimers in TimerGroups, and
...
use a timer group for the timers in SelectionDAGISel. Also,
Split scheduling out from emitting, to give each their own
timer.
llvm-svn: 53476
2008-07-11 21:54:34 +00:00
Dan Gohman
d1342570f2
Use find instead of lower_bound.
...
llvm-svn: 53474
2008-07-11 20:58:19 +00:00
Dan Gohman
60e964b34c
Add some basic Pool-allocation infrastructure. This adds a Recycler class,
...
for handling bookkeeping for deleted objects, as well as the alist class
template, for keeping lists of objects allocated from Recyclers, and some
related utilities.
llvm-svn: 53210
2008-07-07 22:58:06 +00:00
Owen Anderson
1530481dd3
Add a version of AddString that takes a const char* so we can avoid extraneous
...
conversions to std::string.
llvm-svn: 52995
2008-07-01 23:49:59 +00:00
Dan Gohman
a08868acb3
Append to the ActiveTimers std::vector before looking at the timer instead
...
of after, so that any reallocation it does doesn't get counted for the pass
being timed. This probably doesn't account for a timing discrepancy I was
looking into, but I'm fixing it anyway.
llvm-svn: 52693
2008-06-24 22:07:07 +00:00
Wojciech Matyjewicz
1de28ac425
First step to fix PR2088. Implement routine to compute the
...
multiplicative inverse of a given number. Modify udivrem to allow input and
output pairs of arguments to overlap. Patch is based on the work by Chandler
Carruth.
llvm-svn: 52638
2008-06-23 19:39:50 +00:00