summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Give llvm::SourceMgr the ability to have a client-specifiedChris Lattner2010-04-061-1/+8
| | | | | | diagnostic handler. llvm-svn: 100503
* stringref-ize the MemoryBuffer::get apis. This requiresChris Lattner2010-04-051-11/+8
| | | | | | a co-committed clang patch. llvm-svn: 100485
* Push const through the regex engine. Fixes some of the warnings in PR6616.Owen Anderson2010-04-052-44/+51
| | | | llvm-svn: 100438
* Remove accidental include and add a comment.Benjamin Kramer2010-04-011-2/+2
| | | | llvm-svn: 100107
* Various improvements to MemoryBuffer::getFile:Benjamin Kramer2010-04-011-17/+26
| | | | | | | | | | - Use a RAII object to close the FD. - Use sys::StrError instead of thread-unsafe strerror calls. - Recover gracefully if read returns zero. This works around an issue on DragonFlyBSD where /dev/null has an st_size of 136 but we can't read 136 bytes from it. llvm-svn: 100106
* Introduce SpecificBumpPtrAllocator, a wrapper for BumpPtrAllocator which allowsBenjamin Kramer2010-03-301-15/+0
| | | | | | | only a single type of object to be allocated. Use it to make VNInfo destruction typesafe. llvm-svn: 99919
* Introduce namespace-scope functions to enable LLVM statistics withoutDouglas Gregor2010-03-301-21/+37
| | | | | | | passing the command-line parameter "-stats" and to print the resulting statistics without calling llvm_shutdown(). llvm-svn: 99893
* Reapply r99881 with some fixes: only call destructor in releaseMemory!Torok Edwin2010-03-301-0/+15
| | | | llvm-svn: 99883
* Revert 99881, it brooke smooshlab's llvm-gcc-i386-darwin9.Torok Edwin2010-03-301-15/+0
| | | | llvm-svn: 99882
* Introduce another Reset() method in BumpPtrAllocator that calls a destructorTorok Edwin2010-03-301-0/+15
| | | | | | | | | | on all objects it has allocated, if they are all of the same size and alignment. Use this to destruct all VNInfos allocated in LiveIntervalAnalysis (PR6653). valnos is not reliable for this purpose, as seen in r99400 (which still leaked, and sometimes caused double frees). llvm-svn: 99881
* stringref'ize Timer apisChris Lattner2010-03-301-16/+15
| | | | llvm-svn: 99877
* finally, maintain a global list of timer groups, allowing us to Chris Lattner2010-03-301-0/+30
| | | | | | | implement TimerGroup::printAll, which prints and resets all active timers. llvm-svn: 99876
* add a new TimerGroup::print method, and refactor away the bogusChris Lattner2010-03-301-31/+52
| | | | | | TimerGroup copy ctor and assignment operator. llvm-svn: 99875
* rename GetLibSupportInfoOutputFile -> CreateInfoOutputFile andChris Lattner2010-03-302-18/+14
| | | | | | have it always return a new stream to simplify clients. llvm-svn: 99874
* if a timergroup is destroyed before its timers, print times.Chris Lattner2010-03-302-6/+14
| | | | llvm-svn: 99873
* change TimerGroup to keep a linked list of active timers Chris Lattner2010-03-301-55/+67
| | | | | | | | instead of just a count of them, and refactor the guts of report printing out of removeTimer into its own method. Refactor addTimerToPrint away. llvm-svn: 99872
* reapply my timer rewrite with a change for PassManager to store Chris Lattner2010-03-301-139/+85
| | | | | | timers by pointer instead of by-value. llvm-svn: 99871
* revert r99862 which is causing FNT failures.Chris Lattner2010-03-301-85/+139
| | | | llvm-svn: 99870
* fairly major rewrite of various timing related stuff.Chris Lattner2010-03-301-139/+85
| | | | llvm-svn: 99862
* move a function into a more logical place in the fileChris Lattner2010-03-291-22/+21
| | | | llvm-svn: 99842
* remove support for per-time peak memory tracking, thisChris Lattner2010-03-291-29/+4
| | | | | | | isn't used by anyone and is better exposed as a non-per-timer thing. Also, stop including System/Mutex.h in Timer.h llvm-svn: 99841
* various timer fixes: move operator= out of line,Chris Lattner2010-03-291-13/+20
| | | | | | | | | eliminate the per-timer lock (timers should be externally locked if needed), the info-output-stream can never be dbgs(), so drop the check. Make some stuff private. llvm-svn: 99839
* s/.../.Chris Lattner2010-03-291-7/+7
| | | | llvm-svn: 99834
* move code around and improve indentation, no functionality change.Chris Lattner2010-03-291-126/+124
| | | | llvm-svn: 99831
* improve portability to minix, patch by Chris Lattner2010-03-261-2/+2
| | | | | | Kees van Reeuwijk for PR6704 llvm-svn: 99677
* Fix minor style issues.Dan Gohman2010-03-246-211/+206
| | | | llvm-svn: 99414
* Fix comment typo.Duncan Sands2010-03-241-1/+1
| | | | llvm-svn: 99392
* Add the ability to "intern" FoldingSetNodeID data into aDan Gohman2010-03-181-0/+10
| | | | | | | | | | | | BumpPtrAllocator-allocated region to allow it to be stored in a more compact form and to avoid the need for a non-trivial destructor call. Use this new mechanism in ScalarEvolution instead of FastFoldingSetNode to avoid leaking memory in the case where a FoldingSetNodeID uses heap storage, and to reduce overall memory usage. llvm-svn: 98829
* Extend MemoryBuffer::getFile() to take an optional "stat" structureDouglas Gregor2010-03-151-7/+10
| | | | | | | pointer. If given, the structure will be set with the stat information from the file actually read. llvm-svn: 98575
* make APFloat::toString be const.Chris Lattner2010-03-061-1/+1
| | | | llvm-svn: 97883
OpenPOWER on IntegriCloud