summaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerSwitch.cpp
Commit message (Collapse)AuthorAge
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55779 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the asmprinter (.ll) and all the stuff it requires over toChris Lattner2008-08-23
| | | | | | | | | | | | | | | | | | | | | | | | | | use raw_ostream instead of std::ostream. Among other goodness, this speeds up llvm-dis of kc++ with a release build from 0.85s to 0.49s (88% faster). Other interesting changes: 1) This makes Value::print be non-virtual. 2) AP[S]Int and ConstantRange can no longer print to ostream directly, use raw_ostream instead. 3) This fixes a bug in raw_os_ostream where it didn't flush itself when destroyed. 4) This adds a new SDNode::print method, instead of only allowing "dump". A lot of APIs have both std::ostream and raw_ostream versions, it would be useful to go through and systematically anihilate the std::ostream versions. This passes dejagnu, but there may be minor fallout, plz let me know if so and I'll fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55263 91177308-0d34-0410-b5e6-96231b3b80d8
* Rework the routines that convert AP[S]Int into a string. Now, instead ofChris Lattner2008-08-17
| | | | | | | | | | | | | | | | | | | returning an std::string by value, it fills in a SmallString/SmallVector passed in. This significantly reduces string thrashing in some cases. More specifically, this: - Adds an operator<< and a print method for APInt that allows you to directly send them to an ostream. - Reimplements APInt::toString to be much simpler and more efficient algorithmically in addition to not thrashing strings quite as much. This speeds up llvm-dis on kc++ by 7%, and may also slightly speed up the asmprinter. This also fixes a bug I introduced into the asmwriter in a previous patch w.r.t. alias printing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54873 91177308-0d34-0410-b5e6-96231b3b80d8
* API change for {BinaryOperator|CmpInst|CastInst}::create*() --> Create. ↵Gabor Greif2008-05-16
| | | | | | Legacy interfaces will be in place for some time. (Merge from use-diet branch.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51200 91177308-0d34-0410-b5e6-96231b3b80d8
* Change class' public PassInfo variables to by initialized with theDan Gohman2008-05-13
| | | | | | | | | | | | address of the PassInfo directly instead of calling getPassInfo. This eliminates a bunch of dynamic initializations of static data. Also, fold RegisterPassBase into PassInfo, make a bunch of its data members const, and rearrange some code to initialize data members in constructors instead of using setter member functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51022 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-13
| | | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51017 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-06
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* remove the LowerSelect pass. The last client was the old Sparc backend, ↵Chris Lattner2008-02-19
| | | | | | which is long dead by now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47323 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* GLIBCXX_DEBUG fix. std::vector<>::end() is invalidated by erase.David Greene2007-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45101 91177308-0d34-0410-b5e6-96231b3b80d8
* Finishing initial docs for all transformations in Passes.html.Gordon Henriksen2007-11-04
| | | | | | Also cleaned up some comments in source files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43674 91177308-0d34-0410-b5e6-96231b3b80d8
* Add std:: to sort calls.Dan Gohman2007-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43652 91177308-0d34-0410-b5e6-96231b3b80d8
* Change illegal uses of ++ to uses of STLExtra.h's next function.Dan Gohman2007-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43651 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in comment.Nick Lewycky2007-05-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36873 91177308-0d34-0410-b5e6-96231b3b80d8
* Drop 'const'Devang Patel2007-05-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36662 91177308-0d34-0410-b5e6-96231b3b80d8
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-02
| | | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36652 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36632 91177308-0d34-0410-b5e6-96231b3b80d8
* remove use of BasicBlock::getNextChris Lattner2007-04-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36205 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed tabs everywhere except autogenerated & external files. Add makeAnton Korobeynikov2007-04-16
| | | | | | | target for tabs checking. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36146 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak VC++ build. Do not use identifiers starting with _ as they are ↵Jeff Cohen2007-03-12
| | | | | | | | | reserved and can collide with system defined names. Windows defines _BB, for example. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35066 91177308-0d34-0410-b5e6-96231b3b80d8
* Use range tests in LowerSwitch, where possibleAnton Korobeynikov2007-03-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35057 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure debug code is not evaluated in non-debug case.Reid Spencer2007-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34856 91177308-0d34-0410-b5e6-96231b3b80d8
* 1. Sort switch cases using APInt safe comparison.Reid Spencer2007-03-02
| | | | | | | 2. Make sure debug output of APInt values is safe for all bit widths. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34855 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-31
| | | | | | | | | | | | | | This patch replaces signed integer types with signless ones: 1. [US]Byte -> Int8 2. [U]Short -> Int16 3. [U]Int -> Int32 4. [U]Long -> Int64. 5. Removal of isSigned, isUnsigned, getSignedVersion, getUnsignedVersion and other methods related to signedness. In a few places this warranted identifying the signedness information from other sources. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32785 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-12-23
| | | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
* switch more statistics over to STATISTIC, eliminating static ctors. Also,Chris Lattner2006-12-19
| | | | | | | delete some dead ones. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32694 91177308-0d34-0410-b5e6-96231b3b80d8
* Added an automatic cast to "std::ostream*" etc. from OStream. We then canBill Wendling2006-12-17
| | | | | | | | rework the hacks that had us passing OStream in. We pass in std::ostream* instead, check for null, and then dispatch to the correct print() method. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32636 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-07
| | | | | | | now cerr, cout, and NullStream resp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-06
| | | | | | | is 'unsigned'. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32279 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove #include <iostream> and use llvm_* streams instead.Bill Wendling2006-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31925 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR950:Reid Spencer2006-10-20
| | | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31063 91177308-0d34-0410-b5e6-96231b3b80d8
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29925 91177308-0d34-0410-b5e6-96231b3b80d8
* s|llvm/Support/Visibility.h|llvm/Support/Compiler.h|Chris Lattner2006-08-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29911 91177308-0d34-0410-b5e6-96231b3b80d8
* Shrink libllvmgcc.dylib by another 23KChris Lattner2006-06-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28972 91177308-0d34-0410-b5e6-96231b3b80d8
* Declare that lowerinvoke doesn't interact with other lowering passes.Chris Lattner2006-05-17
| | | | | | | Patch written by Domagoj Babic! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28367 91177308-0d34-0410-b5e6-96231b3b80d8
* Patch to make some xforms preserve each other. Patch contributed byChris Lattner2006-05-09
| | | | | | | Domagoj Babic! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28181 91177308-0d34-0410-b5e6-96231b3b80d8
* Add pass ID's for various passes, so they can be AddRequiredID. Patch byChris Lattner2006-05-02
| | | | | | | Domagoj Babic! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28048 91177308-0d34-0410-b5e6-96231b3b80d8
* Make iostream #inclusion explicitChris Lattner2006-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25514 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21427 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert code to compile with vc7.1.Reid Spencer2004-09-15
| | | | | | | Patch contributed by Paolo Invernizzi. Thanks Paolo! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixes to make LLVM compile with vc7.1.Alkis Evlogimenos2004-09-03
| | | | | | | Patch contributed by Paolo Invernizzi! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16152 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes For Bug 352Reid Spencer2004-09-01
| | | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix #includes of i*.h => Instructions.h as per PR403.Misha Brukman2004-07-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15328 91177308-0d34-0410-b5e6-96231b3b80d8
* Do not create empty basic blocks when the lowerswitch pass expects blocks toChris Lattner2004-03-14
| | | | | | | be non-empty! This fixes LowerSwitch/2004-03-13-SwitchIsDefaultCrash.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12384 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix incorrect debug codeChris Lattner2004-02-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11821 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacificationChris Lattner2004-01-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10725 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanups and simplificationsChris Lattner2003-11-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10127 91177308-0d34-0410-b5e6-96231b3b80d8
* Start using the nicer terminator auto-insertion APIChris Lattner2003-11-20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10111 91177308-0d34-0410-b5e6-96231b3b80d8
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM project notice to the top of every C++ source file.John Criswell2003-10-20
| | | | | | | Header files will be on the way. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9298 91177308-0d34-0410-b5e6-96231b3b80d8