summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* some cleanups: remove dead arguments and eliminate ivarsChris Lattner2011-01-081-55/+36
| | | | | | that are just passed to one function. llvm-svn: 123067
* fix an issue duncan pointed out, which could cause loop rotateChris Lattner2011-01-081-12/+16
| | | | | | to violate LCSSA form llvm-svn: 123066
* Fix coding style issues.Cameron Zwarich2011-01-081-2/+2
| | | | llvm-svn: 123065
* Make more passes preserve dominators (or state that they preserve dominators ifCameron Zwarich2011-01-085-2/+49
| | | | | | | | | | they all ready do). This removes two dominator recomputations prior to isel, which is a 1% improvement in total llc time for 403.gcc. The only potentially suspect thing is making GCStrategy recompute dominators if it used a custom lowering strategy. llvm-svn: 123064
* First step in fixing PR8927:Rafael Espindola2011-01-087-10/+36
| | | | | | | | | | | | | | | | | | | Add a unnamed_addr bit to global variables and functions. This will be used to indicate that the address is not significant and therefore the constant or function can be merged with others. If an optimization pass can show that an address is not used, it can set this. Examples of things that can have this set by the FE are globals created to hold string literals and C++ constructors. Adding unnamed_addr to a non-const global should have no effect unless an optimization can transform that global into a constant. Aliases are not allowed to have unnamed_addr since I couldn't figure out any use for it. llvm-svn: 123063
* Contract subloop bodies. However, it is still important to visit the phis at theCameron Zwarich2011-01-081-7/+41
| | | | | | top of subloop headers, as the phi uses logically occur outside of the subloop. llvm-svn: 123062
* Fix a bug in r123034 (trying to sext/zext non-integers) and clean up a little.Frits van Bommel2011-01-081-5/+8
| | | | llvm-svn: 123061
* Have loop-rotate simplify instructions (yay instsimplify!) as it clonesChris Lattner2011-01-081-5/+21
| | | | | | | | | | | | them into the loop preheader, eliminating silly instructions like "icmp i32 0, 100" in fixed tripcount loops. This also better exposes the bigger problem with loop rotate that I'd like to fix: once this has been folded, the duplicated conditional branch *often* turns into an uncond branch. Not aggressively handling this is pessimizing later loop optimizations somethin' fierce by making "dominates all exit blocks" checks fail. llvm-svn: 123060
* Revamp the ValueMapper interfaces in a couple ways:Chris Lattner2011-01-086-164/+87
| | | | | | | | | | | | | | | | 1. Take a flags argument instead of a bool. This makes it more clear to the reader what it is used for. 2. Add a flag that says that "remapping a value not in the map is ok". 3. Reimplement MapValue to share a bunch of code and be a lot more efficient. For lookup failures, don't drop null values into the map. 4. Using the new flag a bunch of code can vaporize in LinkModules and LoopUnswitch, kill it. No functionality change. llvm-svn: 123058
* two minor changes: switch to the standard ValueToValueMapTyChris Lattner2011-01-081-2/+7
| | | | | | | | map from ValueMapper.h (giving us access to its utilities) and add a fastpath in the loop rotation code, avoiding expensive ssa updator manipulation for values with nothing to update. llvm-svn: 123057
* Recognize inline asm 'rev /bin/bash, ' as a bswap intrinsic call.Evan Cheng2011-01-085-53/+101
| | | | llvm-svn: 123048
* Do not model all INLINEASM instructions as having unmodelled side effects.Evan Cheng2011-01-0716-37/+100
| | | | | | | | | | Instead encode llvm IR level property "HasSideEffects" in an operand (shared with IsAlignStack). Added MachineInstrs::hasUnmodeledSideEffects() to check the operand when the instruction is an INLINEASM. This allows memory instructions to be moved around INLINEASM instructions. llvm-svn: 123044
* Add an explanatory message for an assertion.Bob Wilson2011-01-071-1/+2
| | | | llvm-svn: 123042
* Eliminate variable only used in debug builds.Matt Beaumont-Gay2011-01-071-3/+1
| | | | llvm-svn: 123040
* Speculatively revert r123032.Devang Patel2011-01-072-5/+21
| | | | llvm-svn: 123039
* Lower some BUILD_VECTORS using VEXT+shuffle.Bob Wilson2011-01-072-2/+137
| | | | | | Patch by Tim Northover. llvm-svn: 123035
* InstCombine: Match min/max hidden by sext/zextTobias Grosser2011-01-071-35/+70
| | | | | | | | | | | | | | | X = sext x; x >s c ? X : C+1 --> X = sext x; X <s C+1 ? C+1 : X X = sext x; x <s c ? X : C-1 --> X = sext x; X >s C-1 ? C-1 : X X = zext x; x >u c ? X : C+1 --> X = zext x; X <u C+1 ? C+1 : X X = zext x; x <u c ? X : C-1 --> X = zext x; X >u C-1 ? C-1 : X X = sext x; x >u c ? X : C+1 --> X = sext x; X <u C+1 ? C+1 : X X = sext x; x <u c ? X : C-1 --> X = sext x; X >u C-1 ? C-1 : X Instead of calculating this with mixed types promote all to the larger type. This enables scalar evolution to analyze this expression. PR8866 llvm-svn: 123034
* Some whitespace fixesTobias Grosser2011-01-071-24/+24
| | | | llvm-svn: 123033
* Appropriately truncate debug info range in dwarf output.Devang Patel2011-01-072-21/+5
| | | | | | Enable live debug variables pass. llvm-svn: 123032
* DBG_VALUE does not have any side effects; it also makes no sense to mark it ↵Evan Cheng2011-01-073-3/+8
| | | | | | cheap as a copy. llvm-svn: 123031
* Revert 122959, it needs more thought. Add it back to README.txt with ↵Benjamin Kramer2011-01-072-4/+22
| | | | | | additional notes. llvm-svn: 123030
* Simplify the allocation and freeing of Users' operand lists, now thatJay Foad2011-01-072-60/+1
| | | | | | every BranchInst has a fixed number of operands. llvm-svn: 123027
* Remove all uses of the "ugly" method BranchInst::setUnconditionalDest().Jay Foad2011-01-072-6/+9
| | | | llvm-svn: 123025
* Revert r122955. It seems using movups to lower memcpy can cause massive ↵Evan Cheng2011-01-071-1/+5
| | | | | | regression (even on Nehalem) in edge cases. I also didn't see any real performance benefit. llvm-svn: 123015
* Add ARM patterns to match EXTRACT_SUBVECTOR nodes.Bob Wilson2011-01-073-2/+19
| | | | | | | | | | | | | | | Also fix an off-by-one in SelectionDAGBuilder that was preventing shuffle vectors from being translated to EXTRACT_SUBVECTOR. Patch by Tim Northover. The test changes are needed to keep those spill-q tests from testing aligned spills and restores. If the only aligned stack objects are spill slots, we no longer realign the stack frame. Prior to this patch, an EXTRACT_SUBVECTOR was legalized by loading from the stack, which created an aligned frame index. Now, however, there is nothing except the spill slot in the stack frame, so I added an aligned alloca. llvm-svn: 122995
* Fix a comment typo.Bob Wilson2011-01-071-1/+1
| | | | llvm-svn: 122994
* Change EXTRACT_SUBVECTOR to require a constant index.Bob Wilson2011-01-071-32/+16
| | | | | | | | We were never generating any of these nodes with variable indices, and there was one legalizer function asserting on a non-constant index. If we ever have a need to support variable indices, we can add this back again. llvm-svn: 122993
* Early exit if we don't have invokes. The 'Unwinds' vector isn't modified unlessBill Wendling2011-01-071-219/+219
| | | | | | we have invokes, so there is no functionality change here. llvm-svn: 122990
* Fix the other problem reported in PR8582. Testcase and patch byDuncan Sands2011-01-061-0/+5
| | | | | | Nadav Rotem. llvm-svn: 122983
* Add some fairly duplicated code to let type legalization split illegalEric Christopher2011-01-063-0/+141
| | | | | | typed atomics. This will lower exclusively to libcalls at the moment. llvm-svn: 122979
* With Benjamin's recent amazing patches, we should be able to do even better ↵Chris Lattner2011-01-061-0/+13
| | | | | | things :) llvm-svn: 122978
* use isNullValue() to simplify code, add an assert.Chris Lattner2011-01-061-5/+6
| | | | llvm-svn: 122977
* Emit 128 bit constant.Devang Patel2011-01-062-10/+38
| | | | | | This fixes PR 8913 crash. llvm-svn: 122971
* PR8921: LDM/POP do not support interworking prior to v5t.Bob Wilson2011-01-062-2/+3
| | | | llvm-svn: 122970
* Remove extra whitespace.Bob Wilson2011-01-061-2/+2
| | | | llvm-svn: 122969
* Fix comment typo.Bob Wilson2011-01-061-1/+1
| | | | llvm-svn: 122968
* Add a note from llvmdev, this time with more info.Benjamin Kramer2011-01-061-0/+26
| | | | llvm-svn: 122966
* Fixed parsing of hex floats.Abramo Bagnara2011-01-061-4/+4
| | | | llvm-svn: 122963
* Correctly disassemble truncated asm.Rafael Espindola2011-01-061-2/+4
| | | | | | Patch by Richard Simth. llvm-svn: 122962
* InstCombine: Turn _chk functions into the "unsafe" variant if length and max ↵Benjamin Kramer2011-01-061-0/+2
| | | | | | | | langth are equal. This happens when we take the (non-constant) length from a malloc. llvm-svn: 122961
* EarlyCSE does this now (and GVN always did it).Benjamin Kramer2011-01-061-11/+0
| | | | llvm-svn: 122960
* InstCombine: If we call llvm.objectsize on a malloc call we can replace it ↵Benjamin Kramer2011-01-062-24/+5
| | | | | | with the size passed to malloc. llvm-svn: 122959
* InstCombine: Teach llvm.objectsize folding to look through GEPs.Benjamin Kramer2011-01-061-50/+41
| | | | llvm-svn: 122958
* Remove dead code and silence warnings.Benjamin Kramer2011-01-062-6/+4
| | | | llvm-svn: 122957
* Use movups to lower memcpy and memset even if it's not fast (like corei7).Evan Cheng2011-01-061-5/+1
| | | | | | | | The theory is it's still faster than a pair of movq / a quad of movl. This will probably hurt older chips like P4 but should run faster on current and future Intel processors. rdar://8817010 llvm-svn: 122955
* add a note about object size from drystone, add a poorly optimized loop from ↵Chris Lattner2011-01-061-0/+79
| | | | | | 179.art. llvm-svn: 122954
* add a trivial instcombine missed in DhrystoneChris Lattner2011-01-061-0/+37
| | | | llvm-svn: 122953
* Re-implement r122936 with proper target hooks. Now getMaxStoresPerMemcpyEvan Cheng2011-01-065-21/+25
| | | | | | | etc. takes an option OptSize. If OptSize is true, it would return the inline limit for functions with attribute OptSize. llvm-svn: 122952
* implement constant folding support for an exotic constant expr:Chris Lattner2011-01-061-1/+19
| | | | | | | | | | ret i64 ptrtoint (i8* getelementptr ([1000 x i8]* @X, i64 1, i64 sub (i64 0, i64 ptrtoint ([1000 x i8]* @X to i64))) to i64) to "ret i64 1000". This allows us to correctly compute the trip count on a loop in PR8883, which occurs with std::fill on a char array. This allows us to transform it into a memset with a constant size. llvm-svn: 122950
* Revert r122936. I'll re-implement the change.Evan Cheng2011-01-061-9/+2
| | | | llvm-svn: 122949
OpenPOWER on IntegriCloud