summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Support: Add PathV2 implementation.Michael J. Spencer2010-11-294-0/+522
| | | | llvm-svn: 120329
* Now to chant the magical incantation that will exorcise the System libraryCharles Davis2010-11-2916-16/+16
| | | | | | | | from LLVM forever: grep -lR "llvm/System" * | grep -v .svn | xargs sed -ie 's#llvm/System#llvm/Support#g' llvm-svn: 120314
* Missed a spot.Michael J. Spencer2010-11-291-1/+1
| | | | llvm-svn: 120301
* Merge System into Support.Michael J. Spencer2010-11-2969-36/+7414
| | | | llvm-svn: 120298
* PR5207: change APInt::doubleToBits() and APInt::floatToBits() to beJay Foad2010-11-281-4/+2
| | | | | | static methods that return a new APInt. llvm-svn: 120261
* Remove PIC16 remnants.Benjamin Kramer2010-11-271-5/+0
| | | | llvm-svn: 120223
* raw_ostream::write_escaped: Add a UseHexEscapes argument.Daniel Dunbar2010-11-271-6/+15
| | | | llvm-svn: 120200
* Fix Whitespace.Michael J. Spencer2010-11-262-27/+27
| | | | llvm-svn: 120166
* Move tree navigation to a new Path class that doesn't have to be a template.Jakob Stoklund Olesen2010-11-261-1/+102
| | | | | | | | The path also holds a reference to the root node, and that allows important iterator accessors like start() and stop() to have no conditional code. (When the compiler is clever enough to remove it.) llvm-svn: 120165
* add a MemoryBuffer::getOpenFile method, which turns an openChris Lattner2010-11-231-0/+7
| | | | | | file descriptor into a MemoryBuffer (and closes the FD). llvm-svn: 120065
* Revert functionality doug added in r98575 that was neverChris Lattner2010-11-231-15/+11
| | | | | | documented and only used by some clang stuff I just removed. llvm-svn: 120002
* Fix a use after free. Patch by Frits van Bommel.Rafael Espindola2010-11-191-6/+9
| | | | llvm-svn: 119842
* Add ADT/IntervalMap.Jakob Stoklund Olesen2010-11-192-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a sorted interval map data structure for small keys and values with automatic coalescing and bidirectional iteration over coalesced intervals. Except for coalescing intervals, it provides similar functionality to std::map. It is however much more compact for small keys and values, and hopefully faster too. The container object itself can hold the first few intervals without any allocations, then it switches to a cache conscious B+-tree representation. A recycling allocator can be shared between many containers, even between containers holding different types. The IntervalMap is initially intended to be used with SlotIndex intervals for: - Backing store for LiveIntervalUnion that is smaller and faster than std::set. - Backing store for LiveInterval with less overhead than std::vector for typical intervals and O(N log N) merging of large intervals. 99% of virtual registers need 4 entries or less and would benefit from the small object optimization. - Backing store for LiveDebugVariable which doesn't exist yet, but will track debug variables during register allocation. This is a work in progress. Missing items are: - Performance metrics. - erase(). - insert() shrinkage. - clear(). - More performance metrics. - Simplification and detemplatization. llvm-svn: 119787
* Revert "Add ADT/IntervalMap.", GCC doesn't like it.Jakob Stoklund Olesen2010-11-192-61/+0
| | | | | | This reverts r119772. llvm-svn: 119773
* Add ADT/IntervalMap.Jakob Stoklund Olesen2010-11-192-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a sorted interval map data structure for small keys and values with automatic coalescing and bidirectional iteration over coalesced intervals. Except for coalescing intervals, it provides similar functionality to std::map. It is however much more compact for small keys and values, and hopefully faster too. The container object itself can hold the first few intervals without any allocations, then it switches to a cache conscious B+-tree representation. A recycling allocator can be shared between many containers, even between containers holding different types. The IntervalMap is initially intended to be used with SlotIndex intervals for: - Backing store for LiveIntervalUnion that is smaller and faster than std::set. - Backing store for LiveInterval with less overhead than std::vector for typical intervals and O(N log N) merging of large intervals. 99% of virtual registers need 4 entries or less and would benefit from the small object optimization. - Backing store for LiveDebugVariable which doesn't exist yet, but will track debug variables during register allocation. This is a work in progress. Missing items are: - Performance metrics. - erase(). - insert() shrinkage. - clear(). - More performance metrics. - Simplification and detemplatization. llvm-svn: 119772
* Aligned and unaligned copies of the same stringDale Johannesen2010-11-191-7/+22
| | | | | | | were not hashing to the same value. Analysis and patch by Frits van Bommel! llvm-svn: 119770
* Bounds-check APInt's operator[].Dan Gohman2010-11-181-0/+1
| | | | llvm-svn: 119708
* now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate theChris Lattner2010-11-171-2/+1
| | | | | | | | cookie argument to the SourceMgr diagnostic stuff. This cleanly separates LLVMContext's inlineasm handler from the sourcemgr error handling definition, increasing type safety and cleaning things up. llvm-svn: 119486
* report_fatal_error: Simplify a possible ambiguity.Daniel Dunbar2010-11-131-0/+4
| | | | llvm-svn: 118972
* Fix memory leak in StringRef::edit_distance(). 'Allocated' could be leaked ↵Ted Kremenek2010-11-071-5/+6
| | | | | | on an early return. llvm-svn: 118370
* CrashRecoveryContext: Add RunSafelyOnThread helper function.Daniel Dunbar2010-11-051-0/+23
| | | | llvm-svn: 118272
* Rename FindExecutable to PrependMainExecutablePath.Mikhail Glushenkov2010-11-031-7/+8
| | | | | | Makes it more clear that it is just a path manipulation function. llvm-svn: 118174
* Print an error as one big string instead of breaking it up.Dan Gohman2010-11-031-3/+3
| | | | llvm-svn: 118130
* Revert r118057, this is better fixed in appendSuffix itself.Mikhail Glushenkov2010-11-021-3/+1
| | | | llvm-svn: 118088
* Don't append a dot on platforms which don't use exe suffixes.Dan Gohman2010-11-021-1/+3
| | | | llvm-svn: 118057
* FindExecutable: remove the executability check.Mikhail Glushenkov2010-11-021-16/+6
| | | | | | | This makes the behaviour of FindExecutable more consistent across platforms, but I'm not very happy with the name... llvm-svn: 118049
* Fix these error messages to be less confusing. These errorDan Gohman2010-10-291-9/+5
| | | | | | | messages primarily indicate errors running the viewer, not errors with the graph file itself. llvm-svn: 117665
* Remove an unnecessary check and an unnecessary temporary.Mikhail Glushenkov2010-10-281-3/+2
| | | | llvm-svn: 117583
* Extend StringRef's edit-distance algorithm to permit an upper bound on the ↵Douglas Gregor2010-10-191-1/+8
| | | | | | allowed edit distance llvm-svn: 116867
* lib/Support/raw_ostream.cpp: Fix Cygwin's build.NAKAMURA Takumi2010-10-191-0/+4
| | | | | | setmode is provided by io.h on Cygwin. llvm-svn: 116784
* CrashRecoveryContext: Add missing return, so that the signal fires after we ourDaniel Dunbar2010-10-181-0/+3
| | | | | | | routine is off the stack. Otherwise we show up rather confusingly in the stack trace. llvm-svn: 116755
* Build with RTTI and exceptions disabled. Only in GCC for now.Oscar Fuentes2010-10-171-0/+3
| | | | llvm-svn: 116682
* Always use binary mode for output stream. This is important to prevent ↵Francois Pichet2010-10-141-0/+13
| | | | | | unwanted end of line conversion on Windows. Should not affect Unix where O_BINARY is not defined. This fix /clang/test/lexer/preamble.c XFAIL on WIN32. llvm-svn: 116509
* fix a bug I introduced, no idea how this didn't repro right.Chris Lattner2010-10-141-2/+2
| | | | llvm-svn: 116462
* add uadd_ov/usub_ov to apint, consolidate constant foldingChris Lattner2010-10-141-0/+12
| | | | | | | | | logic to use the new APInt methods. Among other things this implements rdar://8501501 - llvm.smul.with.overflow.i32 should constant fold which comes from "clang -ftrapv", originally brought to my attention from PR8221. llvm-svn: 116457
* constify these methods.Chris Lattner2010-10-131-5/+5
| | | | llvm-svn: 116455
* add a few operations for signed operations that also Chris Lattner2010-10-131-0/+46
| | | | | | return an overflow flag. llvm-svn: 116452
* Unbreak cmake build.John Thompson2010-10-071-0/+1
| | | | llvm-svn: 116003
* Move tool_output_file into its own file.Dan Gohman2010-10-072-32/+43
| | | | llvm-svn: 115973
* After printing "Running 'Graphviz' program... " and running theDan Gohman2010-10-051-6/+10
| | | | | | | Graphviz program, print something with a newline, to avoid leaving the line unfinished. llvm-svn: 115620
* Grow BumpPtrAllocator's slab size dynamically if we allocated many slabs. ThisBenjamin Kramer2010-09-301-0/+6
| | | | | | | | | | | | | | | | | | | | | reduces the amount of malloc calls and may reduce memory overhead. Some numbers: ASTContext stats, clang -cc1 -disable-free -fsyntax-only Cocoa_h.m without dynamic growth | with dynamic growth Number of memory regions: 3158 | Number of memory regions: 432 Bytes used: 12333185 | Bytes used: 12333185 Bytes allocated: 12935168 | Bytes allocated: 12800000 Bytes wasted: 601983 (includes alignment, etc) | Bytes wasted: 466815 (includes alignment, etc) ASTContext stats, clang -cc1 -disable-free -fsyntax-only on clang's ASTReader.cpp without dynamic growth | with dynamic growth Number of memory regions: 10987 | Number of memory regions: 551 Bytes used: 42910356 | Bytes used: 42910356 Bytes allocated: 45002752 | Bytes allocated: 44711936 Bytes wasted: 2092396 (includes alignment, etc) | Bytes wasted: 1801580 (includes alignment, etc) llvm-svn: 115151
* Removed a bunch of unnecessary target_link_libraries.Oscar Fuentes2010-09-281-2/+0
| | | | llvm-svn: 114999
* Make ConstantRange::makeICmpRegion handle all the edge cases properly. ThisNick Lewycky2010-09-281-10/+28
| | | | | | also fixes PR8250. llvm-svn: 114972
* Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer2010-09-271-8/+8
| | | | llvm-svn: 114847
* Delete an unused declaration.Dan Gohman2010-09-271-2/+0
| | | | llvm-svn: 114839
* Add support for viewing graphviz graphs with xdot.py.Dan Gohman2010-09-271-0/+26
| | | | llvm-svn: 114832
* Add better support for environment portion of triple. Original patch byDuncan Sands2010-09-161-6/+32
| | | | | | Cameron Esfahani, tweaked to use array_lengthof. llvm-svn: 114073
* Some versions of gcc still warn about "ignoring return value ... declaredDuncan Sands2010-09-161-1/+2
| | | | | | with attribute warn_unused_result" here - suppress the warning harder. llvm-svn: 114072
* Create PTX backend. Patch by Che-Liang Chiou!Nick Lewycky2010-09-071-0/+13
| | | | llvm-svn: 113235
* Add completely hokey binary-and and binary-or operations to ConstantRange andNick Lewycky2010-09-071-0/+26
| | | | | | teach LazyValueInfo to use them. llvm-svn: 113196
OpenPOWER on IntegriCloud