summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Fix stupid thinkoDaniel Dunbar2009-07-151-1/+1
| | | | llvm-svn: 75754
* Address some review comments on TargetRegistry.Daniel Dunbar2009-07-151-3/+1
| | | | llvm-svn: 75753
* Update CMake file.Ted Kremenek2009-07-151-0/+1
| | | | llvm-svn: 75746
* Add new TargetRegistry.Daniel Dunbar2009-07-151-0/+136
| | | | | | | | | | | | | | | | | | | | | | | Targets implement a single global Target structure which will live in a new <Target>/TargetInfo library; this will be present in any image which the target is usable in. - Optional target specific classes can then be registered and attached to the Target description. - Registration for normal Targets will be done via the initialization functions instead of using static constructors. - This allows clients to use a single interface to obtain target data, without requiring the code generator be linked in. It also provides a natural extension point for adding new optional target data (assembler parser, disassembler, etc.). - This also provides a new entry point for obtaining a target for a particular triple (without a module). - Not yet used, however this should eventually replace the TargetMachineRegistry. llvm-svn: 75739
* minor syntax cleanupChris Lattner2009-07-141-11/+5
| | | | llvm-svn: 75707
* Update CMake file.Ted Kremenek2009-07-141-0/+1
| | | | llvm-svn: 75677
* Have asm printers use formatted_raw_ostream directly to avoid aDavid Greene2009-07-142-1/+14
| | | | | | dynamic_cast<>. llvm-svn: 75670
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-146-36/+36
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* After converting assert(0) to LLVM_UNREACHABLE we lost file/line location.Torok Edwin2009-07-141-1/+5
| | | | | | | Fix by making the LLVM_UNREACHABLE pass __FILE__ and __LINE__ to llvm_unreachable. llvm-svn: 75631
* Add NetBSD to the Triple class, patch by Krister Walfridsson!Chris Lattner2009-07-131-0/+3
| | | | llvm-svn: 75489
* Make some more changes suggested by Chris. Manipulators go away.David Greene2009-07-131-58/+41
| | | | llvm-svn: 75472
* Switch to raw_ostream.Daniel Dunbar2009-07-131-35/+35
| | | | llvm-svn: 75451
* Fix an error in ConstantRange::getSignedMax on wrapped ranges. Thanks onceNick Lewycky2009-07-131-7/+3
| | | | | | again to Daniel Dunbar and KLEE! llvm-svn: 75449
* 'i8 full-range' sign extended to i16 should equal [-128, 128) not [-128, 127).Nick Lewycky2009-07-131-1/+1
| | | | | | Found by Daniel Dunbar and KLEE. llvm-svn: 75448
* Multiply was very wrong for wrapped ranges. This supplies a half-fix that willNick Lewycky2009-07-131-6/+6
| | | | | | generally return Full on all wrapped inputs. "Fixes" PR4545. llvm-svn: 75444
* Fix a bug summing two full sets. The overflow checking doesn't handle sets asNick Lewycky2009-07-131-0/+2
| | | | | | | large as the full set, only those one size smaller. Thanks to Daniel Dunbar who found this bug using Klee! llvm-svn: 75443
* Improve sys::Path::makeAbsolute on Win32.Daniel Dunbar2009-07-121-1/+1
| | | | | | | | - Patch by Viktor Kutuzov! - Minor tweak by me to add llvm_unreachable calls on FIXMEd error paths. llvm-svn: 75424
* Implement udiv for ConstantRanges.Nick Lewycky2009-07-121-4/+26
| | | | llvm-svn: 75413
* Implement ConstantRange::multiply based on the code in LoopVR.Nick Lewycky2009-07-121-3/+13
| | | | llvm-svn: 75410
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-116-35/+41
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Fix handling of max and full set.Nick Lewycky2009-07-111-4/+0
| | | | | | | | A full set is a constant range that represents any number. If you take the umax of that and [5, 10) you end up with [5, INT_MAX] because the values less than 5 would be umax's against a value which is at least 5. llvm-svn: 75372
* Clarify and simplify.Nick Lewycky2009-07-111-1/+1
| | | | llvm-svn: 75366
* Convert more assert(0)+abort() -> LLVM_UNREACHABLE,Torok Edwin2009-07-111-2/+2
| | | | | | and abort()/exit() -> llvm_report_error(). llvm-svn: 75363
* Move a method that creates constant ranges relative to another constant rangeNick Lewycky2009-07-111-0/+72
| | | | | | | | | | per icmp predicate out of predsimplify and into ConstantRange. Add another utility method that determines whether one range is a subset of another. Combine with the former to determine whether icmp pred range, range is known to be true or not. llvm-svn: 75357
* Make changes suggested by Chris and eliminate newly-added raw_ostreamDavid Greene2009-07-102-1/+74
| | | | | | | | | hooks as they're no longer needed. The major change with this patch is to make formatted_raw_ostream usable by any client of raw_ostream. llvm-svn: 75283
* Add some hooks that a redesigned AsmStream needs to do its job. TheseDavid Greene2009-07-091-0/+1
| | | | | | allow derived classes to examine the stream buffer before it's flushed. llvm-svn: 75199
* Revert the part of 75177 that split ConstantRange into two classes, andDan Gohman2009-07-091-513/+28
| | | | | | | | merge the new functionality and unittests into ConstantRange. Thanks to Nick Lewycky for pointing out that it isn't necessary to have two separate classes here. llvm-svn: 75191
* Add a ConstantSignedRange class, which does for signed integersDan Gohman2009-07-091-19/+572
| | | | | | | | | | | | | what ConstantRange does for unsigned integers. Factor out a common base class for common functionality. Add some new functions for performing arithmetic on constant ranges. Some of these are currently just stubbed out with conservative implementations. Add unittests for ConstantRange and ConstantSignedRange. llvm-svn: 75177
* Add support for other GraphViz display tools. This can helpDavid Greene2009-07-091-6/+48
| | | | | | | with very large graphs, where dot isn't necessarily the most visually pleasing way of looking at the graph. llvm-svn: 75144
* Allow users of GraphWriter to display graphs asynchronously. ThisDavid Greene2009-07-081-15/+30
| | | | | | | provides a way to quickly dump a bunch of graph information to dot files and display them. It's a timesaver when working on large systems. llvm-svn: 75056
* Fix build.Mike Stump2009-07-071-0/+1
| | | | llvm-svn: 74936
* Have scoped mutexes take referenes instead of pointers.Owen Anderson2009-07-074-15/+15
| | | | llvm-svn: 74931
* Fix braces.Torok Edwin2009-07-071-4/+2
| | | | llvm-svn: 74923
OpenPOWER on IntegriCloud