summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* Enable SCEV-based unrolling by default.Andrew Trick2011-09-021-3/+3
| | | | | | | | | | | | | | | | | | | | This changes loop unrolling to use the same mechanism for trip count computation as indvars. This is a stronger check that tends to unroll more loops. A very common side-effect is that many single iteration loops will be removed sooner. The real goal was simply to remove dependence on canonical IVs. x86 is break even. ARM performance changes to expect (+ is good): External/SPEC/CFP2000/183.equake/183.equake +13% SingleSource/Benchmarks/Dhrystone/fldry +21% MultiSource/Applications/spiff/spiff +3% SingleSource/Benchmarks/Stanford/Puzzle -14% The Puzzle regression is actually an improvement in loop optimization that defeats GVN: rdar://problem/10065079. llvm-svn: 139009
* Return undef value (instead of arbitrary) for wrong or undef index inJakub Staszak2011-09-021-4/+4
| | | | | | ConstantVector. llvm-svn: 139007
* ConstantVector returns arbitrary value for the wrong index.Jakub Staszak2011-09-021-0/+4
| | | | | | This fixes PR10813. llvm-svn: 139006
* Compare type size instead of type _store_ size to make sure that BitCastInstJakub Staszak2011-09-021-2/+2
| | | | | | will be valid. This fixes PR10820. llvm-svn: 139005
* Pass signed (not unsigned) 10 bit field to SPU 'ori' instruction.Kalle Raiskila2011-09-021-2/+2
| | | | llvm-svn: 139004
* Perform the upgrading of the old EH to the new EH in a more sane manner.Bill Wendling2011-09-021-34/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | Perform the upgrading in steps. * First, create a map of the invokes to the EH intrinsics. * Next, take that mapping and determine if the invoke's unwind destination has a single predecessor. If not, then create a new empty block to hold the new landingpad instruction. * Create a landingpad instruction into the uwnind destination. Fill it with the values from the old selector. Map the old intrinsic calls to the new landingpad values (there may be multiple landingpad instructions per instrinic call pairs). * Go through the old intrinsic calls, create a PHI node when necessary, and then replace their values with the new values from the landingpad instructions. * Delete all dead instructions. * ??? * Profit! llvm-svn: 138990
* Merge the ARM disassembler header into the implementation file, since it is ↵Owen Anderson2011-09-012-85/+54
| | | | | | not externally exposed. llvm-svn: 138982
* Fix 80 columns violations.Owen Anderson2011-09-011-449/+655
| | | | llvm-svn: 138980
* Revert r131152, r129796, r129761. This code is currently consideredDan Gohman2011-09-011-52/+43
| | | | | | | | to be unreliable on platforms which require memcpy calls, and it is complicating broader legalize cleanups. It is hoped that these cleanups will make memcpy byval easier to implement in the future. llvm-svn: 138977
* Don't drop alignment info on local common symbols.Benjamin Kramer2011-09-0114-27/+45
| | | | | | | | | | | - On COFF the .lcomm directive has an alignment argument. - On ELF we fall back to .local + .comm Based on a patch by NAKAMURA Takumi. Fixes PR9337, PR9483 and PR10128. llvm-svn: 138976
* Null-initialize to shut up -Wuninitialized warnings.Eli Friedman2011-09-011-1/+1
| | | | llvm-svn: 138974
* Fix apparent build error caused by r138948 on certain versions of GCC with ↵James Molloy2011-09-012-21/+36
| | | | | | -Werror. Sorry for the inconvenience. llvm-svn: 138973
* Reduce indentation. No functionality change.Bill Wendling2011-09-011-17/+18
| | | | llvm-svn: 138968
* Change worklist driven deletion to be an iterative process.Bill Wendling2011-09-012-42/+12
| | | | | | Duncan noticed this! llvm-svn: 138967
* Fix an issue with the IR sink pass found by inspection. (I'm not sure ↵Eli Friedman2011-09-011-7/+6
| | | | | | anyone is actually using this, but might as well fix it since I found the issue.) llvm-svn: 138965
* Fix the build for us -Werror users.Nick Lewycky2011-09-012-37/+24
| | | | | | | Remove broken emacs mode major notation marking a C++ file as C. No functionality change. llvm-svn: 138963
* Make isSafeToSpeculativelyExecute() return the right answer for some new ↵Eli Friedman2011-09-011-0/+4
| | | | | | instructions. Found by inspection; not sure what practical impact, if any, this has. llvm-svn: 138962
* Permit remat of partial register defs when it is safe.Jakob Stoklund Olesen2011-09-011-5/+10
| | | | | | | | | | | | | | | | | An instruction may define part of a register where the other bits are undefined. In that case, it is safe to rematerialize the instruction. For example: %vreg2:ssub_0<def> = VLDRS <cp#0>, 0, pred:14, pred:%noreg, %vreg2<imp-def> The extra <imp-def> operand indicates that the instruction does not read the other parts of the virtual register, so a remat is safe. This patch simply allows multiple def operands for the virtual register. It is MI->readsVirtualRegister() that determines if we depend on a previous value so remat is impossible. llvm-svn: 138953
* ARM 'rscs' mnemonic is carry-setting 'rsc', not 'rs' with a 'cs' condition code.Jim Grosbach2011-09-011-1/+1
| | | | llvm-svn: 138952
* Fix vbroadcast matching logic to early unmatch if the node doesn't haveBruno Cardoso Lopes2011-09-011-1/+5
| | | | | | only one use. Fix PR10825. llvm-svn: 138951
* Fix up r137380 based on post-commit review by Jim Grosbach.James Molloy2011-09-013-612/+627
| | | | llvm-svn: 138948
* t2Bcc is allowed to have a predicate without a preceding IT instruction.Owen Anderson2011-09-011-1/+2
| | | | llvm-svn: 138946
* Revert r138794, "Do not try to rematerialize a value from a partial definition."Jakob Stoklund Olesen2011-09-011-22/+1
| | | | | | | | | The problem is fixed for all register allocators by r138944, so this patch is no longer necessary. <rdar://problem/10032939> llvm-svn: 138945
* Prevent remat of partial register redefinitions.Jakob Stoklund Olesen2011-09-011-0/+9
| | | | | | | | | | | | | An instruction that redefines only part of a larger register can never be rematerialized since the virtual register value depends on the old value in other parts of the register. This was fixed for the inline spiller in r138794. This patch fixes the problem for all register allocators, and includes a small test case. <rdar://problem/10032939> llvm-svn: 138944
* Teach MachineLICM reg pressure tracking code to deal with MVT::untyped. ↵Evan Cheng2011-09-011-27/+40
| | | | | | Sorry, I can't come up with a small test case. rdar://10043690 llvm-svn: 138934
* Resubmit with fix. Properly remove the instructions except for landingpad, ↵Bill Wendling2011-09-011-9/+28
| | | | | | which should be removed only when its invokes are. llvm-svn: 138932
* Submitted this too early.Bill Wendling2011-09-011-5/+0
| | | | llvm-svn: 138931
* Don't DCE the landingpad instruction.Bill Wendling2011-09-011-0/+5
| | | | | | The landingpad instruction can be removed only when its invokes are removed. llvm-svn: 138930
* PreRA scheduler should avoid cloning compares.Andrew Trick2011-09-011-1/+35
| | | | | | | | | Added canClobberReachingPhysRegUse() to handle a particular pattern in which a two-address instruction could be forced to interfere with EFLAGS, causing a compare to be unnecessarilly cloned. Fixes rdar://problem/5875261 llvm-svn: 138924
* Don't forget to add the landingpad and resume instructions to the ↵Bill Wendling2011-09-011-0/+2
| | | | | | | | InstructionList. This was found via a nightly build of 483.xalancbmk. llvm-svn: 138923
* Thumb2 assembly parsing and encoding for ADD(immediate).Jim Grosbach2011-09-012-6/+50
| | | | llvm-svn: 138922
* Fixup for functions that return a bool.Chad Rosier2011-08-311-2/+2
| | | | llvm-svn: 138918
* Static relocation model Thumb jump table interworking.Jim Grosbach2011-08-311-0/+5
| | | | | | | Make sure the low bit of the PC is set when loading an address directly for jump tables in static relocation model. llvm-svn: 138912
* The asm parser currently selects the wrong encoding for non-conditional ↵Owen Anderson2011-08-312-5/+6
| | | | | | Thumb2 branches. However, this exposed a number of situations where the decoder was too permissive in allowing invalid instructions to decode successful. Specify additional fixed bits to close those gaps. llvm-svn: 138910
* Fix Size TypingDavid Greene2011-08-311-1/+1
| | | | | | Stores sizes as uint64_t to avoid possible truncation. llvm-svn: 138901
* Thumb2 t2Bcc should encode as t2B when condition is 'always'.Jim Grosbach2011-08-311-0/+5
| | | | llvm-svn: 138898
* Move more code around and duplicate AVX patterns: MOVHPS and MOVLPSBruno Cardoso Lopes2011-08-311-109/+216
| | | | llvm-svn: 138897
* Move MOVAPS,MOVUPS patterns close to the instructions definitionBruno Cardoso Lopes2011-08-311-88/+92
| | | | llvm-svn: 138896
* Remove "_Int" forms of MOVUPSmr and MOVAPSmrBruno Cardoso Lopes2011-08-311-16/+13
| | | | llvm-svn: 138895
* Make sure we aren't deleting the landingpad instruction.Bill Wendling2011-08-311-5/+21
| | | | | | | | | The landingpad instruction is required in the landing pad block. Because we're not deleting terminating instructions, the invoke may still jump to here (see Transforms/SCCP/2004-11-16-DeadInvoke.ll). Remove all uses of the landingpad instruction, but keep it around until code-gen can remove the basic block. llvm-svn: 138890
* Fix encoding for tBcc with immediate offset operand.Owen Anderson2011-08-311-1/+5
| | | | llvm-svn: 138889
* Misc cleanup; addresses Duncan's comments on r138877.Eli Friedman2011-08-314-22/+17
| | | | llvm-svn: 138887
* When performing instruction selection for LDR_PRE_IMM/LDRB_PRE_IMM, we still ↵Owen Anderson2011-08-311-1/+8
| | | | | | | | need to preserve the sign of the index. This fixes miscompilations of Quicksort in the nightly testsuite, and hopefully others as well. <rdar://problem/10046188> llvm-svn: 138885
* Remove FIXME. Thumb2 MOV instruction will use separate custom tricks.Jim Grosbach2011-08-311-3/+1
| | | | | | | | When we want encoding T3 (the wide encoding), we can explicitly check for that and twiddle the CanAcceptCarrySet accordingly. For now, just correctly handle encodings T1 and T2 when in Thumb2 mode. llvm-svn: 138879
* Fill in type legalization for MERGE_VALUES in all the various cases. Patch ↵Eli Friedman2011-08-316-18/+77
| | | | | | by Micah Villmow. (No testcase because the issue only showed up in an out-of-tree backend.) llvm-svn: 138877
* Fix roundtripping of Thumb BL/BLX instructions with immediate offsets ↵Owen Anderson2011-08-311-3/+31
| | | | | | instead of labels. llvm-svn: 138874
* tBcc is OK to be predicated in Thumb2 outside of IT blocks (obviously).Jim Grosbach2011-08-311-2/+2
| | | | llvm-svn: 138873
* Generic expansion for atomic load/store into cmpxchg/atomicrmw xchg; ↵Eli Friedman2011-08-312-0/+33
| | | | | | implements 64-bit atomic load/store for ARM. llvm-svn: 138872
* Thumb2 parsing and encoding for ADC(register).Jim Grosbach2011-08-311-1/+22
| | | | | | | Also add instruction aliases for non-.w versions of SBC since they're the same. llvm-svn: 138871
* After r138010, subroutine type does not have context info. Update type ↵Devang Patel2011-08-311-0/+1
| | | | | | | | verifier accordingly. This fixes ptype.exp gdb testsuite regressions. llvm-svn: 138869
OpenPOWER on IntegriCloud