summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* instcombine: Migrate strto* optimizationsMeador Inge2012-10-312-31/+29
| | | | | | | This patch migrates the strto* optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167119
* Fix false -> NULL conversion from r167115 spotted by Benjamin Kramer.Hans Wennborg2012-10-311-1/+1
| | | | llvm-svn: 167117
* Replace some instances of UniqueVector with SetVector, which is slightly ↵Benjamin Kramer2012-10-313-8/+8
| | | | | | | | cheaper. No functionality change. llvm-svn: 167116
* Do simple constant propagation in lookup table formation for switchesHans Wennborg2012-10-311-15/+98
| | | | | | | | | | | | | | | | | | | By propagating the value for the switch condition, LLVM can now build lookup tables for code such as: switch (x) { case 1: return 5; case 2: return 42; case 3: case 4: case 5: return x - 123; default: return 123; } Given that x is known for each case, "x - 123" becomes a constant for cases 3, 4, and 5. llvm-svn: 167115
* Fix a couple of comment typos.Benjamin Kramer2012-10-311-2/+2
| | | | llvm-svn: 167113
* LCSSA: Add a workaround for another nasty SCEV cache invalidation issue.Benjamin Kramer2012-10-311-0/+5
| | | | | | | I'm not entirely happy with this solution, but I don't see a smarter way currently. Fixes PR14214. llvm-svn: 167112
* DependenceAnalysis: Don't crash if there is no constant operand.Benjamin Kramer2012-10-311-3/+4
| | | | | | This makes the code match the comments. Resolves a crash in loop idiom (PR14219). llvm-svn: 167110
* Add support for Cortex-A15 host recognition.James Molloy2012-10-311-0/+1
| | | | | | No testcase, as this is only testable on a C-A15 board. llvm-svn: 167108
* Implement ADJCALLSTACKUP and ADJCALLSTACKDOWNReed Kotler2012-10-316-9/+67
| | | | llvm-svn: 167107
* Add scalar forms of FMA4 VFNMSUB/VFNMADD to folding tables. Patch from ↵Craig Topper2012-10-311-0/+8
| | | | | | Cameron McInally. llvm-svn: 167106
* instcombine: Migrate strpbrk optimizationsMeador Inge2012-10-312-40/+37
| | | | | | | This patch migrates the strpbrk optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167105
* Clean up redundant SP register maintained in X86 TLIMichael Liao2012-10-312-12/+7
| | | | llvm-svn: 167104
* instcombine: Migrate strlen optimizationsMeador Inge2012-10-312-44/+45
| | | | | | | This patch migrates the strlen optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167103
* instcombine: Migrate strncpy optimizationsMeador Inge2012-10-312-52/+49
| | | | | | | This patch migrates the strncpy optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167102
* LoopVectorize: Do not vectorize loops with tiny constant trip counts.Nadav Rotem2012-10-311-0/+8
| | | | llvm-svn: 167101
* This patch addresses an ABI compatibility issue with empty aggregateBill Schmidt2012-10-311-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | parameters. Examples of these are: struct { } a; union { } b[256]; int a[0]; An empty aggregate has an address, although dereferencing that address is pointless. When passed as a parameter, an empty aggregate does not consume a protocol register, nor does it consume a doubleword in the parameter save area. Passing an empty aggregate by reference passes an address just as for any other aggregate. Returning an empty aggregate uses GPR3 as a hidden address of the return value location, just as for any other aggregate. The patch modifies PPCTargetLowering::LowerFormalArguments_64SVR4 and PPCTargetLowering::LowerCall_64SVR4 to properly skip empty aggregate parameters passed by value. The handling of return values and by-reference parameters was already correct. Built on powerpc64-unknown-linux-gnu and tested with no new regressions. A test case is included to test proper handling of empty aggregate parameters on both sides of the function call protocol. llvm-svn: 167090
* Change signature of function RAFast::spillAll to avoid conversion betweenAkira Hatanaka2012-10-311-2/+2
| | | | | | type MachineInstr* and MachineBasicBlock::iterator. llvm-svn: 167088
* Check that iterator I is not the end iterator.Akira Hatanaka2012-10-311-2/+3
| | | | llvm-svn: 167086
* Add support for loops that don't start with Zero.Nadav Rotem2012-10-311-12/+19
| | | | | | | This is important for loops in the LAPACK test-suite. These loops start at 1 because they are auto-converted from fortran. llvm-svn: 167084
* instcombine: Migrate stpcpy optimizationsMeador Inge2012-10-312-53/+40
| | | | | | | | This patch migrates the stpcpy optimizations from the simplify-libcalls pass into the instcombine library call simplifier. Note that the __stpcpy_chk simplifications were migrated in a previous commit. llvm-svn: 167083
* instcombine: Split out the __stpcpy_chk simplifications from StrCpyChkOptMeador Inge2012-10-311-3/+54
| | | | | | | | | | | | | | | | r166198 migrated the strcpy optimization to instcombine. The strcpy simplifier that was migrated from Transforms/Scalar/SimplifyLibCalls.cpp was also doing some __strcpy_chk simplifications. Those fortified simplifications were migrated as well, but introduced a bug in the __stpcpy_chk simplifier in the process. This happened because the __strcpy_chk and __stpcpy_chk simplifiers were both mapped to StrCpyChkOpt which was updated with simplifications that worked for __strcpy_chk, but not __stpcpy_chk. This patch fixes the problem by adding proper test coverage and creating a new simplifier for __stpcpy_chk (instead of sharing one with __strcpy_chk). llvm-svn: 167082
* X86 SSE: update rsqrtss and rcpss to use two source operands andManman Ren2012-10-301-4/+39
| | | | | | | | | | | | the first source operand is tied to the destination operand. This is to accurately model the corresponding instructions where the upper bits are unmodified. rdar://12558838 PR14221 llvm-svn: 167064
* Fix regression in old-style JIT.Eli Friedman2012-10-301-7/+5
| | | | llvm-svn: 167057
* X86 MMX: optimize transfer from mmx to i32Manman Ren2012-10-303-2/+20
| | | | | | | | | We used to generate a store (movq) + a load. Now we use movd. rdar://9946746 llvm-svn: 167056
* Add documentation.Nadav Rotem2012-10-301-0/+5
| | | | llvm-svn: 167055
* Reformat and 80-column this. It's not strictly conformingEric Christopher2012-10-301-21/+29
| | | | | | yet, but it's better. llvm-svn: 167053
* Fix PR14212: For some strange reason I treated vectors differently fromChandler Carruth2012-10-301-4/+3
| | | | | | | | | integers in that the code to handle split alloca-wide integer loads or stores doesn't come first. It should, for the same reasons as with integers, and the PR attests to that. Also had to fix a busted assert in that this test case also covers. llvm-svn: 167051
* [inline asm] Get the mayLoad/mayStore directly from the MIOp_ExtraInfo operand.Chad Rosier2012-10-301-8/+2
| | | | llvm-svn: 167050
* BBVectorize: Cache fixed-order pairs instead of recomputing pointer info.Hal Finkel2012-10-301-51/+34
| | | | | | | | | | | | Instead of recomputing relative pointer information just prior to fusing, cache this information (which also needs to be computed during the candidate-pair selection process). This cuts down on the total number of SE queries made, and also is a necessary intermediate step on the road toward including shuffle costs in the pair selection procedure. No functionality change is intended. llvm-svn: 167049
* [mips] Allow tail-call optimization for vararg functions and functions whichAkira Hatanaka2012-10-302-15/+20
| | | | | | use the caller's stack. llvm-svn: 167048
* Add a comment for r167040.Chad Rosier2012-10-301-0/+4
| | | | llvm-svn: 167046
* LoopIdiom: Fix a serious missed optimization: we only turned top-level loops ↵Benjamin Kramer2012-10-301-4/+5
| | | | | | | | into memmove. Thanks to Preston Briggs for catching this! llvm-svn: 167045
* BBVectorize: Fix a small bug introduced in r167042.Hal Finkel2012-10-301-1/+0
| | | | | | | We need to make sure that we take the correct load/store alignment when the inputs are flipped. llvm-svn: 167044
* Add code for saving formal argument information to MipsFunctionInfo. ThisAkira Hatanaka2012-10-302-0/+13
| | | | | | | information will be used by IsEligibleForTailCallOptimization to determine whether a call can be tail-call optimized. llvm-svn: 167043
* BBVectorize: Simplify how input swapping is handled.Hal Finkel2012-10-301-43/+25
| | | | | | | | | Stop propagating the FlipMemInputs variable into the routines that create the replacement instructions. Instead, just flip the arguments of those routines. This allows for some associated cleanup (not all of which is done here). No functionality change is intended. llvm-svn: 167042
* Add definition of function MipsTargetLowering::passArgOnStack which emits nodesAkira Hatanaka2012-10-302-0/+22
| | | | | | for passing a function call argument on a stack. llvm-svn: 167041
* [inline asm] Implement mayLoad and mayStore for inline assembly. In general,Chad Rosier2012-10-304-8/+29
| | | | | | | | | | the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation. For inline assembly, however, we need to compute these based on the constraints. Revert r166929 as this is no longer needed, but leave the test case in place. rdar://12033048 and PR13504 llvm-svn: 167040
* Do not do tail-call optimization if target is mips16.Akira Hatanaka2012-10-301-0/+4
| | | | llvm-svn: 167039
* BBVectorize: Don't make calls to SE when the result is unused.Hal Finkel2012-10-301-2/+5
| | | | | | | SE was being called during the instruction-fusion process (when the result is unreliable, and thus ignored). No functionality change is intended. llvm-svn: 167037
* 80-colNadav Rotem2012-10-301-1/+2
| | | | llvm-svn: 167036
* LoopVectorize: Add support for write-only loops when the write destination ↵Nadav Rotem2012-10-301-0/+7
| | | | | | | | is a single pointer. Speedup SciMark by 1% llvm-svn: 167035
* PowerPC: Expand FSRQT for vector typesAdhemerval Zanella2012-10-301-0/+6
| | | | | | | This patch expands FSQRT for floating point vector types when altivec is used. llvm-svn: 167034
* LoopVectorize: Fix a bug in the initialization of reduction variables. AND ↵Nadav Rotem2012-10-301-7/+21
| | | | | | | | needs to start at all-one while XOR, and OR need to start at zero. llvm-svn: 167032
* Fix grammar.Bill Wendling2012-10-301-2/+2
| | | | llvm-svn: 167029
* Enable ELF machine type to be specified explicitly in X86 backendMichael Liao2012-10-303-15/+19
| | | | llvm-svn: 167027
* Change ForceSizeOpt attribute into MinSize attributeQuentin Colombet2012-10-306-11/+12
| | | | llvm-svn: 167020
* Fix isEliminableCastPair to work correctly in the presence of pointersDuncan Sands2012-10-303-12/+21
| | | | | | with different sizes. llvm-svn: 167018
* PowerPC: More support for Altivec compare operationsAdhemerval Zanella2012-10-302-13/+141
| | | | | | | | This patch adds more support for vector type comparisons using altivec. It adds correct support for v16i8, v8i16, v4i32, and v4f32 vector types for comparison operators ==, !=, >, >=, <, and <=. llvm-svn: 167015
* Add a helper for telling whether a type is a pointer or vector of pointer type.Duncan Sands2012-10-301-24/+6
| | | | | | | Simplify the implementation of the corresponding integer and float functions and move them inline while there. llvm-svn: 167014
* Enable some additional constant folding for PPCDoubleDouble.Ulrich Weigand2012-10-302-21/+5
| | | | | | This fixes Clang :: CodeGen/complex-builtints.c on PowerPC. llvm-svn: 167013
OpenPOWER on IntegriCloud