summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* Update CMake files.Ted Kremenek2009-07-311-1/+0
| | | | llvm-svn: 77709
* Remove Annotation.h, which is no longer used in the LLVM tree.Dan Gohman2009-07-311-130/+0
| | | | llvm-svn: 77706
* Twine: Directly support int, long, and long long types.Daniel Dunbar2009-07-301-17/+29
| | | | | | - This should resolve Cygwin gcc ambiguities. llvm-svn: 77624
* Twine: Use raw_ostream::write_hex, remove unused itohexstr method.Daniel Dunbar2009-07-301-2/+1
| | | | llvm-svn: 77617
* Add raw_ostream::write_hexDaniel Dunbar2009-07-301-4/+7
| | | | llvm-svn: 77614
* Twine: Provide [u]int{32,64} conversions via implicit constructors instead ofDaniel Dunbar2009-07-301-6/+18
| | | | | | explicitly. llvm-svn: 77576
* Perform simplification noticed by Reid.Daniel Dunbar2009-07-291-4/+0
| | | | llvm-svn: 77477
* Re-apply previous changes and improve column padding performance some more.David Greene2009-07-291-17/+21
| | | | llvm-svn: 77461
* Twines: Support numeric conversion directly (uitostr, etc).Daniel Dunbar2009-07-291-11/+37
| | | | | | | | | | | | | | | - 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
* raw_ostream: Follow the 32-bit path when printing "small" decimal numbers.Daniel Dunbar2009-07-291-0/+4
| | | | llvm-svn: 77444
* Revert r77397, it causes significant regressions in llc performance.Daniel Dunbar2009-07-291-9/+4
| | | | llvm-svn: 77425
* Improve performance of PadToColumn by eliminating flushes.David Greene2009-07-281-4/+9
| | | | llvm-svn: 77397
* Make raw_null_ostream flush its buffer in its destructor, so thatDan Gohman2009-07-271-0/+9
| | | | | | | it conforms to the assertion added in r77245. This fixes a failure in qa_override.c in clang's testsuite. llvm-svn: 77255
* Add an assertion check to raw_ostream's destructor to verifyDan Gohman2009-07-271-0/+5
| | | | | | that the subclass hasn't left any pending data in the buffer. llvm-svn: 77245
* Sort list of targets in --version.Daniel Dunbar2009-07-261-8/+11
| | | | llvm-svn: 77127
* Oops, forgot XCore. Sorry XCore!Daniel Dunbar2009-07-261-2/+3
| | | | llvm-svn: 77125
* Update for API change.Daniel Dunbar2009-07-261-6/+46
| | | | llvm-svn: 77124
* Update Triple to use StringRef/Twine based APIs.Daniel Dunbar2009-07-261-58/+35
| | | | | | - This is now shorter, simpler, safer, and more efficient, what a deal. llvm-svn: 77119
* Remove unused headerDaniel Dunbar2009-07-261-1/+0
| | | | llvm-svn: 77115
* Kill Target specific ModuleMatchQuality stuff.Daniel Dunbar2009-07-261-3/+1
| | | | | | - This was overkill and inconsistently implemented. llvm-svn: 77114
* Add TargetRegistry::lookupTarget.Daniel Dunbar2009-07-261-85/+17
| | | | | | | | | | | | | | - This is a simplified mechanism which just looks up a target based on the target triple, with a few additional flags. - Remove getClosestStaticTargetForModule, the moral equivalent is now: lookupTarget(Mod->getTargetTriple, true, false, ...); - This no longer does the fuzzy matching with target data (based on endianness and pointer width) that getClosestStaticTargetForModule was doing, but this was deemed unnecessary. llvm-svn: 77111
* Added a test and fixed a bug in BumpPtrAllocator relating to large alignmentReid Kleckner2009-07-251-2/+2
| | | | | | values. Hopefully this fixes PR4622. llvm-svn: 77088
* Simplify JIT target selection.Daniel Dunbar2009-07-251-5/+20
| | | | | | | | | | - Instead of requiring targets to define a JIT quality match function, we just have them specify if they support a JIT. - Target selection for the JIT just gets the host triple and looks for the best target which matches the triple and has a JIT. llvm-svn: 77060
* Allow llvm_report_error to accept a Twine.Daniel Dunbar2009-07-241-3/+12
| | | | llvm-svn: 76961
* Update CMakeDaniel Dunbar2009-07-241-0/+1
| | | | llvm-svn: 76957
* Add Twine ADT.Daniel Dunbar2009-07-241-0/+91
| | | | | | - Not currently used. llvm-svn: 76956
* Switch to raw_ostream.Daniel Dunbar2009-07-241-9/+9
| | | | llvm-svn: 76943
* Write space padding as one string to speed up comment printing.David Greene2009-07-231-3/+13
| | | | llvm-svn: 76910
* Re-committing changes from r76825 to BumpPtrAllocator with a fix and tests forReid Kleckner2009-07-231-105/+133
| | | | | | an off-by-one error. llvm-svn: 76891
* Convert StringMap to using StringRef for its APIs.Daniel Dunbar2009-07-232-19/+14
| | | | | | | | | | | | - Yay for '-'s and simplifications! - I kept StringMap::GetOrCreateValue for compatibility purposes, this can eventually go away. Likewise the StringMapEntry Create functions still follow the old style. - NIFC. llvm-svn: 76888
* Reverting r76825 and r76828, since they caused clang runtime errors and some ↵Reid Kleckner2009-07-231-132/+104
| | | | | | build failure involving memset. llvm-svn: 76838
* add header for 'memset'.Zhongxing Xu2009-07-231-0/+1
| | | | llvm-svn: 76837
* Parameterize the BumpPtrAllocator over a slab allocator. It defaults to usingReid Kleckner2009-07-231-104/+131
| | | | | | | | | | | malloc, so there should be no functional changes to other code. These changes are necessary since I have plans to use this allocator in the JIT memory manager, and it needs a special allocator. I also added some tests which helped me pinpoint some bugs. llvm-svn: 76825
* Hide the DOUT static variable behind a function interface.David Greene2009-07-201-0/+8
| | | | llvm-svn: 76425
* Fix ConstantRange::unionWith. Also make it work a little hard in some cases toNick Lewycky2009-07-191-45/+50
| | | | | | | return the smallest union of two ranges instead of just any range that happens to contain the union. llvm-svn: 76360
* Replace intersectWith with maximalIntersectWith. The latter guarantees thatNick Lewycky2009-07-181-43/+5
| | | | | | | | all values belonging to the intersection will belong to the resulting range. The former was inconsistent about that point (either way is fine, just pick one.) This is part of PR4545. llvm-svn: 76289
* Provide slightly more refined error message when trying to lookup a target, andDaniel Dunbar2009-07-171-1/+18
| | | | | | none are registered. llvm-svn: 76181
* Add raw_null_ostream and llvm::nulls(), a raw_ostream that discards output.Daniel Dunbar2009-07-161-0/+17
| | | | | | - No functionality change. llvm-svn: 76103
* Use size_t.Dan Gohman2009-07-162-13/+13
| | | | llvm-svn: 76069
* add a knob to turn off PrettyStackTrace globally. Patch by ZoltanChris Lattner2009-07-161-1/+6
| | | | | | Varga! llvm-svn: 75897
* Add registered target list to --version output.Daniel Dunbar2009-07-162-20/+39
| | | | llvm-svn: 75889
* Change raw_ostream so that it doesn't call llvm_report_errorDan Gohman2009-07-151-4/+14
| | | | | | | | | | | | | | | | | | immediately on every output error. Instead, add a flag to raw_ostream, and set the flag whenever an error is detected. The flag can be queried and cleared from the public API. This gives applications more flexibility to handling errors in application-specific ways. If the flag is not cleared when the raw_ostream is destructed, llvm_report_error is called from the destructor. This ensures that errors are not implicitly silenced, and provides convenient default behavior for tools like llc and opt. Clients wishing to avoid llvm_report_error calls from raw_ostream should check for errors and clear the error flag. llvm-svn: 75857
* Reapply TargetRegistry refactoring commits.Daniel Dunbar2009-07-151-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | --- Reverse-merging r75799 into '.': U test/Analysis/PointerTracking U include/llvm/Target/TargetMachineRegistry.h U include/llvm/Target/TargetMachine.h U include/llvm/Target/TargetRegistry.h U include/llvm/Target/TargetSelect.h U tools/lto/LTOCodeGenerator.cpp U tools/lto/LTOModule.cpp U tools/llc/llc.cpp U lib/Target/PowerPC/PPCTargetMachine.h U lib/Target/PowerPC/AsmPrinter/PPCAsmPrinter.cpp U lib/Target/PowerPC/PPCTargetMachine.cpp U lib/Target/PowerPC/PPC.h U lib/Target/ARM/ARMTargetMachine.cpp U lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp U lib/Target/ARM/ARMTargetMachine.h U lib/Target/ARM/ARM.h U lib/Target/XCore/XCoreTargetMachine.cpp U lib/Target/XCore/XCoreTargetMachine.h U lib/Target/PIC16/PIC16TargetMachine.cpp U lib/Target/PIC16/PIC16TargetMachine.h U lib/Target/Alpha/AsmPrinter/AlphaAsmPrinter.cpp U lib/Target/Alpha/AlphaTargetMachine.cpp U lib/Target/Alpha/AlphaTargetMachine.h U lib/Target/X86/X86TargetMachine.h U lib/Target/X86/X86.h U lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.h U lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp U lib/Target/X86/AsmPrinter/X86IntelAsmPrinter.h U lib/Target/X86/X86TargetMachine.cpp U lib/Target/MSP430/MSP430TargetMachine.cpp U lib/Target/MSP430/MSP430TargetMachine.h U lib/Target/CppBackend/CPPTargetMachine.h U lib/Target/CppBackend/CPPBackend.cpp U lib/Target/CBackend/CTargetMachine.h U lib/Target/CBackend/CBackend.cpp U lib/Target/TargetMachine.cpp U lib/Target/IA64/IA64TargetMachine.cpp U lib/Target/IA64/AsmPrinter/IA64AsmPrinter.cpp U lib/Target/IA64/IA64TargetMachine.h U lib/Target/IA64/IA64.h U lib/Target/MSIL/MSILWriter.cpp U lib/Target/CellSPU/SPUTargetMachine.h U lib/Target/CellSPU/SPU.h U lib/Target/CellSPU/AsmPrinter/SPUAsmPrinter.cpp U lib/Target/CellSPU/SPUTargetMachine.cpp U lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp U lib/Target/Mips/MipsTargetMachine.cpp U lib/Target/Mips/MipsTargetMachine.h U lib/Target/Mips/Mips.h U lib/Target/Sparc/AsmPrinter/SparcAsmPrinter.cpp U lib/Target/Sparc/SparcTargetMachine.cpp U lib/Target/Sparc/SparcTargetMachine.h U lib/ExecutionEngine/JIT/TargetSelect.cpp U lib/Support/TargetRegistry.cpp llvm-svn: 75820
* Add a Force option to raw_fd_ostream to specify whether openingDan Gohman2009-07-151-1/+3
| | | | | | | | an existing file is considered an error. Convert several tools to use raw_fd_ostream instead of std::ostream, and to use this new option instead of doing a manual check. llvm-svn: 75801
* Revert 75762, 75763, 75766..75769, 75772..75775, 75778, 75780, 75782 to ↵Stuart Hastings2009-07-151-5/+7
| | | | | | | | repair broken LLVM-GCC build. Will revert 75770 in the llvm-gcc trunk. llvm-svn: 75799
* Add a raw_ostream version of CheckBitcodeOutputToConsole.Dan Gohman2009-07-151-0/+15
| | | | llvm-svn: 75796
* Check for errors on close(2) too. And lseek(2).Dan Gohman2009-07-151-2/+6
| | | | llvm-svn: 75793
* Use 0664 instead of 0644 for the default open mode. This isDan Gohman2009-07-151-1/+1
| | | | | | | consistent with common std::ostream implmentations, and it gives the user the option of using the umask group write bit. llvm-svn: 75792
* Allow multiple registrations of the same target.Daniel Dunbar2009-07-151-7/+5
| | | | | | | - This doesn't necessarily seem like a good idea, but the JIT unittest currently relies on it. llvm-svn: 75769
* Detect write failures on raw_fd_ostream.Daniel Dunbar2009-07-151-2/+4
| | | | llvm-svn: 75758
OpenPOWER on IntegriCloud