summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
...
* Unbreak my CMake build, say you'll compile for me again...Douglas Gregor2010-07-281-0/+1
| | | | llvm-svn: 109598
* Support: Add CrashRecoveryContext helper object.Daniel Dunbar2010-07-281-0/+88
| | | | | | | | | - Designed as a simple wrapper to allow clients to attempt to catch crashes (memory errors, assertion violations, etc.) and do some kind of recovery. - Currently doesn't actually attempt to catch crashes. llvm-svn: 109586
* Don't pass StringRef by reference.Benjamin Kramer2010-07-144-11/+10
| | | | llvm-svn: 108366
* add some triple for minix, patch by Kees van Reeuwijk from PR7582Chris Lattner2010-07-072-2/+5
| | | | llvm-svn: 107785
* Rather than giving SmallPtrSetImpl a member field SmallArray which is magicallyDuncan Sands2010-06-301-3/+6
| | | | | | | | | | | | | | | | replaced by a bigger array in SmallPtrSet (by overridding it), instead just use a pointer to the start of the storage, and have SmallPtrSet pass in the value to use. This has the disadvantage that SmallPtrSet becomes bigger by one pointer. It has the advantage that it no longer uses tricky C++ rules, and is clearly correct while I'm not sure the previous version was. This was inspired by g++-4.6 pointing out that SmallPtrSetImpl was writing off the end of SmallArray, which it was. Since SmallArray is replaced with a bigger array in SmallPtrSet, the write was still to valid memory. But it was writing off the end of the declared array type - sounds kind of dubious to me, like it sounded dubious to g++-4.6. Maybe g++-4.6 is wrong and this construct is perfectly valid and correctly compiled by all compilers, but I think it is better to avoid the whole can of worms by avoiding this construct. llvm-svn: 107285
* Fix thinko.Eric Christopher2010-06-281-2/+4
| | | | llvm-svn: 107042
* Pull in the libCrashReporterClient.a information with a warning comment.Eric Christopher2010-06-281-2/+9
| | | | | | Remove library check and regenerate configure. llvm-svn: 107028
* Rewrite MemoryBuffer::getSTDIN to use read(2) and a SmallVector buffer.Benjamin Kramer2010-06-251-15/+15
| | | | llvm-svn: 106856
* Bring back the empty vector workaround I removed in r106839. Looks like MSVC ↵Benjamin Kramer2010-06-251-1/+2
| | | | | | needs it. llvm-svn: 106841
* Tweak MemoryBuffer to allocate the class itself, the name and possibly theBenjamin Kramer2010-06-251-70/+60
| | | | | | | | | | buffer in the same chunk of memory. 2 less mallocs for every uninitialized MemoryBuffer and 1 less malloc for every MemoryBuffer pointing to a memory range translate into 20% less mallocs on clang -cc1 -Eonly Cocoa_h.m. llvm-svn: 106839
* Add overloads for getFile and getFileOrSTDIN which take a const char *Dan Gohman2010-06-241-3/+17
| | | | | | | instead of a StringRef, avoiding the need to copy the string in the common case. llvm-svn: 106754
* Look for and use a different darwin crash reporter library.Eric Christopher2010-06-221-1/+11
| | | | llvm-svn: 106576
* Add an explicit keyword.Dan Gohman2010-06-221-1/+1
| | | | llvm-svn: 106538
* Use calloc instead of new/memset, it is more efficient when the set is very ↵Benjamin Kramer2010-06-191-6/+14
| | | | | | large. llvm-svn: 106390
* Give NamedRegionTimer an Enabled flag, allowing all its clients toDan Gohman2010-06-181-4/+6
| | | | | | | | | | | | | | | | | | | | switch from this: if (TimePassesIsEnabled) { NamedRegionTimer T(Name, GroupName); do_something(); } else { do_something(); // duplicate the code, this time without a timer! } to this: { NamedRegionTimer T(Name, GroupName, TimePassesIsEnabled); do_something(); } llvm-svn: 106285
* Add the entire range of DW_OP_lit[0..31], DW_OP_reg[0..31], and Jason Molenda2010-06-171-212/+299
| | | | | | | | | DW_OP_breg[0..31] to Dwarf.h. Add "DW_" prefix to the llvm::dwarf::*String methods which did not already have them in Dwarf.cpp. llvm-svn: 106197
* fpcmp: Fix bug where fpcmp wouldn't early exit when files obviously differ andDaniel Dunbar2010-06-151-9/+9
| | | | | | no tolerance is set. llvm-svn: 106033
* fpcmp: Fix a possible infinite loop when comparing something like:Daniel Dunbar2010-06-151-0/+8
| | | | | | | | | 1..19 ok to 1..20 o k (yes, the odd space is necessary). llvm-svn: 106032
* Use const_iterator where appropriate.Daniel Dunbar2010-06-081-1/+1
| | | | llvm-svn: 105620
* DeltaAlgorithm: Tweak split to split by first/second half instead of ↵Daniel Dunbar2010-06-081-2/+2
| | | | | | even/odd, since adjacent changes are more likely to be related. llvm-svn: 105613
* ADT: Add DAGDeltaAlgorithm, which is a DAG minimization algorithm built on ↵Daniel Dunbar2010-06-082-0/+358
| | | | | | | | top of the standard 'delta debugging' algorithm. - This can give substantial speedups in the delta process for inputs we can construct dependency information for. llvm-svn: 105612
* Use realloc instead of malloc+memcpy when growing a POD SmallVector. A smartBenjamin Kramer2010-06-081-9/+12
| | | | | | | realloc implementation can try to expand the allocated memory block in-place, avoiding the copy. llvm-svn: 105605
* Minor code simplification.Dan Gohman2010-05-281-2/+1
| | | | llvm-svn: 104959
* Fix a redundant-return warning.Dan Gohman2010-05-281-1/+2
| | | | llvm-svn: 104958
* Add basic error checking to MemoryBuffer::getSTDIN.Dan Gohman2010-05-271-2/+7
| | | | llvm-svn: 104855
* Add StringRef::compare_numeric and use it to sort TableGen register records.Jakob Stoklund Olesen2010-05-261-0/+28
| | | | | | | This means that our Registers are now ordered R7, R8, R9, R10, R12, ... Not R1, R10, R11, R12, R2, R3, ... llvm-svn: 104745
* Fix __crashreport_info__ declaration.Daniel Dunbar2010-05-201-2/+2
| | | | llvm-svn: 104300
* Add a comment explaining why this code uses Append mode.Dan Gohman2010-05-191-0/+4
| | | | llvm-svn: 104095
* Usage of O_NONBLOCK in bjam is now confirmed as a bug and fixed upstream.Dan Gohman2010-05-181-4/+7
| | | | | | Update the comment. llvm-svn: 104021
* improve portability to systems that don't have round, patch byChris Lattner2010-05-151-4/+3
| | | | | | Evzen Muller! llvm-svn: 103877
* Add new configure option, --disable-timestamps, intended to turn off ↵Daniel Dunbar2010-05-101-0/+2
| | | | | | | | | anything which would mess up binary/object comparisons. Currently: - Disables 'Built on ...' in 'foo --version'. - Disables timestamps from being embedded into .dir files. llvm-svn: 103423
* Run interrupt routines as part of report_fatal_error, since we are failingDaniel Dunbar2010-05-081-0/+7
| | | | | | ungracefully. llvm-svn: 103334
* Handle the case where open(2) or close(2) is interrupted by a signal whenDan Gohman2010-05-061-11/+24
| | | | | | | | automatic syscall restarting is disabled. Also, fix the build on systems which don't define EWOULDBLOCK. llvm-svn: 103158
* Handle EWOULDBLOCK as EAGAIN. And add a comment explaining whyDan Gohman2010-05-061-3/+22
| | | | | | | | | EAGAIN and EWOULDBLOCK are used here. Also, handle the case where a write call is interrupted after some data has already been written. llvm-svn: 103153
* Implement rdar://7415680 - Twine integer support lacks greatnessChris Lattner2010-05-051-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Microoptimize Twine's with unsigned and int to not pin their value to the stack. This saves stack space in common cases and allows mem2reg in the caller. A simple example is: void foo(const Twine &); void bar(int x) { foo("xyz: " + Twine(x)); } Before: __Z3bari: subq $40, %rsp movl %edi, 36(%rsp) leaq L_.str3(%rip), %rax leaq 36(%rsp), %rcx leaq 8(%rsp), %rdi movq %rax, 8(%rsp) movq %rcx, 16(%rsp) movb $3, 24(%rsp) movb $7, 25(%rsp) callq __Z3fooRKN4llvm5TwineE addq $40, %rsp ret After: __Z3bari: subq $24, %rsp leaq L_.str3(%rip), %rax movq %rax, (%rsp) movslq %edi, %rax movq %rax, 8(%rsp) movb $3, 16(%rsp) movb $7, 17(%rsp) leaq (%rsp), %rdi callq __Z3fooRKN4llvm5TwineE addq $24, %rsp ret It saves 16 bytes of stack and one instruction in this case. llvm-svn: 103107
* Try again if write(2) reports an recoverable error.Benjamin Kramer2010-05-051-1/+6
| | | | | | | This should fix mysteriously crashing boost regression tests when stderr is managed by bjam (PR7043). llvm-svn: 103085
* Fix typo. add a test case.Devang Patel2010-04-191-1/+1
| | | | llvm-svn: 101812
* Add DW_AT_APPLE_omit_frame_ptr to encode -fomit-frame-pointer flag.Devang Patel2010-04-191-1/+2
| | | | llvm-svn: 101805
* reduce indentationChris Lattner2010-04-181-21/+21
| | | | llvm-svn: 101692
* Fix a bunch of namespace polution.Dan Gohman2010-04-152-2/+13
| | | | llvm-svn: 101376
* BumpPtrAllocator::Reset() doesn't need to allocate anything. (Thanks, Jakob)Benjamin Kramer2010-04-131-2/+2
| | | | llvm-svn: 101138
* Let BumpPtrAllocator lazily allocate the first slab.Benjamin Kramer2010-04-131-3/+6
| | | | | | | We have some code in llvm and clang where a BumpPtrAllocator is declared in a class but never used in the common case. Stop wasting memory there. llvm-svn: 101130
* Fix PR6826: GraphWriter delete the generated file before "dotty" load it,Chris Lattner2010-04-131-1/+2
| | | | | | patch by 'ether'. llvm-svn: 101116
* add minix support, patch by Kees van Reeuwijk! PR6797Chris Lattner2010-04-091-1/+2
| | | | llvm-svn: 100895
* clean this up, fix std::min ambiguity on some platforms.Chris Lattner2010-04-091-7/+5
| | | | llvm-svn: 100894
* Various MSVC warning fixes about truncated 64 bit shifts and const pointers ↵Benjamin Kramer2010-04-081-1/+1
| | | | | | passed to free. llvm-svn: 100767
* rename llvm_install_error_handler -> install_fatal_error_handlerChris Lattner2010-04-071-16/+13
| | | | | | and friends. llvm-svn: 100717
* rename llvm::llvm_report_error -> llvm::report_fatal_errorChris Lattner2010-04-072-7/+7
| | | | llvm-svn: 100709
* enhance SMDiagnostic to also maintain a pointer to the SourceMgr.Chris Lattner2010-04-061-1/+1
| | | | | | | Add a simplified constructor for clients that don't have locations like "file not found" errors. llvm-svn: 100538
* give the SourceMgr object a cookie.Chris Lattner2010-04-061-1/+2
| | | | llvm-svn: 100504
OpenPOWER on IntegriCloud