summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* BBVectorize: Use a more sophisticated check for input costHal Finkel2012-11-121-14/+43
| | | | | | | | | The old checking code, which assumed that input shuffles and insert-elements could always be folded (and thus were free) is too simple. This can only happen in special circumstances. Using the simple check caused infinite recursion. llvm-svn: 167750
* misched: Target-independent support for MacroFusion.Andrew Trick2012-11-121-5/+61
| | | | | | | | | Uses the infrastructure from r167742 to support clustering instructure that the target processor can "fuse". e.g. cmp+jmp. Next step: target hook implementations with test cases, and enable. llvm-svn: 167744
* BBVectorize: Check the types of compare instructionsHal Finkel2012-11-121-0/+2
| | | | | | | The pass would previously assert when trying to compute the cost of compare instructions with illegal vector types (like struct pointers). llvm-svn: 167743
* misched: Target-independent support for load/store clustering.Andrew Trick2012-11-122-12/+182
| | | | | | | | | | This infrastructure is generally useful for any target that wants to strongly prefer two instructions to be adjacent after scheduling. A following checkin will add target-specific hooks with unit tests. Then this feature will be enabled by default with misched. llvm-svn: 167742
* This change is to fix rdar://12571717 which is about assertion in ↵Shuxin Yang2012-11-121-8/+314
| | | | | | | | | | | | | | | | | | Reassociate pass. The assertion is trigged when the Reassociater tries to transform expression ... + 2 * n * 3 + 2 * m + ... into: ... + 2 * (n*3 + m). In the process of the transformation, a helper routine folds the constant 2*3 into 6, confusing optimizer which is trying the to eliminate the common factor 2, and cannot find 2 any more. Review is pending. But I'd like commit first in order to help those who are waiting for this fix. llvm-svn: 167740
* misched: Infrastructure for weak DAG edges.Andrew Trick2012-11-126-45/+100
| | | | | | | | This adds support for weak DAG edges to the general scheduling infrastructure in preparation for MachineScheduler support for heuristics based on weak edges. llvm-svn: 167738
* Make TOC order deterministic by using MapVector instead of DenseMap.Ulrich Weigand2012-11-121-3/+3
| | | | llvm-svn: 167737
* BBVectorize: Check the input types of shuffles for legalityHal Finkel2012-11-121-3/+6
| | | | | | | | | | This fixes a bug where shuffles were being fused such that the resulting input types were not legal on the target. This would occur only when both inputs and dependencies were also foldable operations (such as other shuffles) and there were other connected pairs in the same block. llvm-svn: 167731
* [ASan] fixup for r167725: Don't fetch name of StructType if it is literalAlexey Samsonov2012-11-121-2/+3
| | | | llvm-svn: 167729
* Fixup for r167558: Store raw pointer (instead of reference) to RelocMap in ↵Alexey Samsonov2012-11-123-20/+28
| | | | | | DIContext. This is needed to prevent crashes because of dangling reference if the clients don't provide RelocMap to DIContext constructor. llvm-svn: 167728
* Normalize memcmp constant folding results.Meador Inge2012-11-121-1/+8
| | | | | | | | | | | | | | | | | | | The library call simplifier folds memcmp calls with all constant arguments to a constant. For example: memcmp("foo", "foo", 3) -> 0 memcmp("hel", "foo", 3) -> 1 memcmp("foo", "hel", 3) -> -1 The folding is implemented in terms of the system memcmp that LLVM gets linked with. It currently just blindly uses the value returned from the system memcmp as the folded constant. This patch normalizes the values returned from the system memcmp to (-1, 0, 1) so that we get consistent results across multiple platforms. The test cases were adjusted accordingly. llvm-svn: 167726
* [ASan]: Add minimalistic support for turning off initialization-order ↵Alexey Samsonov2012-11-122-2/+16
| | | | | | checking for globals of specified types. Tests for this behavior will go to ASan test suite in compiler-rt. llvm-svn: 167725
* Remove unused field.Eric Christopher2012-11-121-1/+0
| | | | llvm-svn: 167719
* Fix PR14314Michael Liao2012-11-121-2/+2
| | | | | | | - Fix operand order for atomic sub, where the minuend is the value loaded from memory and the subtrahend is the parameter specified. llvm-svn: 167718
* [NVPTX] Add more precise PTX/SM target attributesJustin Holewinski2012-11-124-11/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each SM and PTX version is modeled as a subtarget feature/CPU. Additionally, PTX 3.1 is added as the default PTX version to be out-of-the-box compatible with CUDA 5.0. Available CPUs for this target: sm_10 - Select the sm_10 processor. sm_11 - Select the sm_11 processor. sm_12 - Select the sm_12 processor. sm_13 - Select the sm_13 processor. sm_20 - Select the sm_20 processor. sm_21 - Select the sm_21 processor. sm_30 - Select the sm_30 processor. sm_35 - Select the sm_35 processor. Available features for this target: ptx30 - Use PTX version 3.0. ptx31 - Use PTX version 3.1. sm_10 - Target SM 1.0. sm_11 - Target SM 1.1. sm_12 - Target SM 1.2. sm_13 - Target SM 1.3. sm_20 - Target SM 2.0. sm_21 - Target SM 2.1. sm_30 - Target SM 3.0. sm_35 - Target SM 3.5. llvm-svn: 167699
* Delete a stale comment. No functional change.Meador Inge2012-11-121-4/+0
| | | | llvm-svn: 167698
* Move some helper methods to being static functions in the implementation file.Craig Topper2012-11-112-20/+7
| | | | llvm-svn: 167696
* instcombine: Migrate memset optimizationsMeador Inge2012-11-112-27/+21
| | | | | | | This patch migrates the memset optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167689
* instcombine: Migrate memmove optimizationsMeador Inge2012-11-112-24/+22
| | | | | | | This patch migrates the memmove optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167687
* instcombine: Migrate memcpy optimizationsMeador Inge2012-11-112-24/+22
| | | | | | | This patch migrates the memcpy optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167686
* Use the isTruncFree and isZExtFree API to figure out of these operations are ↵Nadav Rotem2012-11-111-2/+10
| | | | | | free. Thanks Andy! llvm-svn: 167685
* Fix a comment typo and add comments.Nadav Rotem2012-11-111-4/+5
| | | | llvm-svn: 167684
* instcombine: Migrate memcmp optimizationsMeador Inge2012-11-112-52/+54
| | | | | | | This patch migrates the memcmp optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167683
* instcombine: Migrate strstr optimizationsMeador Inge2012-11-112-88/+83
| | | | | | | This patch migrates the strstr optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167682
* Add method for replacing instructions to LibCallSimplifierMeador Inge2012-11-112-5/+34
| | | | | | | | | | | | | | | In some cases the library call simplifier may need to replace instructions other than the library call being simplified. In those cases it may be necessary for clients of the simplifier to override how the replacements are actually done. As such, a new overrideable method for replacing instructions was added to LibCallSimplifier. A new subclass of LibCallSimplifier is also defined which overrides the instruction replacement method. This is because the instruction combiner defines its own replacement method which updates the worklist when instructions are replaced. llvm-svn: 167681
* instcombine: Migrate strcspn optimizationsMeador Inge2012-11-102-37/+35
| | | | | | | This patch migrates the strcspn optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167675
* Remove unnecessary subtraction and addition by 1 around a couple for loops.Craig Topper2012-11-101-6/+6
| | | | llvm-svn: 167673
* Tidy up spacing. No functional change.Craig Topper2012-11-101-4/+4
| | | | llvm-svn: 167671
* Removed unimplemented method declaration.Craig Topper2012-11-101-1/+0
| | | | llvm-svn: 167670
* Simplify custom emitter code for pcmp(e/i)str(i/m) and make the helper ↵Craig Topper2012-11-102-96/+42
| | | | | | functions static. llvm-svn: 167669
* instcombine: Query target library information to gate libcall simplificationsMeador Inge2012-11-101-19/+25
| | | | | | | | | Several of the simplifiers migrated from the simplify-libcalls pass to the instcombine pass were not correctly checking the target library information to gate the simplifications. This patch ensures that the check is made. llvm-svn: 167660
* Add more functions to the target library information.Meador Inge2012-11-101-0/+18
| | | | | | | | | | | In the process of migrating optimizations from the simplify-libcalls pass to the instcombine pass I noticed that a few functions are missing from the target library information. These functions need to be available for querying in the instcombine library call simplifiers. More functions will probably be added in the future as more simplifiers are migrated to instcombine. llvm-svn: 167659
* Disable the Thumb no-return call optimization:Evan Cheng2012-11-103-47/+2
| | | | | | | | | | | | mov lr, pc b.w _foo The "mov" instruction doesn't set bit zero to one, it's putting incorrect value in lr. It messes up backtraces. rdar://12663632 llvm-svn: 167657
* Cleanup pcmp(e/i)str(m/i) instruction definitions and load folding support.Craig Topper2012-11-104-161/+192
| | | | llvm-svn: 167652
* [NVPTX] Use ABI alignment for parameters when alignment is not specified.Justin Holewinski2012-11-091-0/+3
| | | | | | Affects SM 2.0+. Fixes bug 13324. llvm-svn: 167646
* Add ARM TARGET2 relocation. The testcase will follow with actualy use-case.Anton Korobeynikov2012-11-092-1/+6
| | | | | | Based on the patch by Logan Chien! llvm-svn: 167633
* Switch FreeBSD/i386 back to 4byte stack alignment. This partiallyRoman Divacky2012-11-091-3/+3
| | | | | | reverts r126226. llvm-svn: 167632
* Fix assertions in updateRegMaskSlots().Jakob Stoklund Olesen2012-11-091-4/+14
| | | | | | | | | The RegMaskSlots contains 'r' slots while NewIdx and OldIdx are 'B' slots. This broke the checks in the assertions. This fixes PR14302. llvm-svn: 167625
* Revert r167620; this can be implemented using an existing CL option.Chad Rosier2012-11-092-10/+5
| | | | llvm-svn: 167622
* Add support for -mstrict-align compiler option for ARM targets.Chad Rosier2012-11-092-5/+10
| | | | | | rdar://12340498 llvm-svn: 167620
* Silence GCC warning about falling off the end of a non-void function.Benjamin Kramer2012-11-091-0/+1
| | | | llvm-svn: 167618
* tsan: switch to new memory_order constants (ABI compatible)Dmitry Vyukov2012-11-091-8/+7
| | | | llvm-svn: 167615
* tsan: instrument all atomics (including fetch_add, exchange, cas, etc)Dmitry Vyukov2012-11-091-8/+76
| | | | llvm-svn: 167612
* Add support for memory runtime check. When we can, we calculate array bounds.Nadav Rotem2012-11-091-33/+191
| | | | | | | If the arrays are found to be disjoint then we run the vectorized version of the loop. If they are not, we run the scalar code. llvm-svn: 167608
* indentNadav Rotem2012-11-091-2/+2
| | | | llvm-svn: 167607
* llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and ↵NAKAMURA Takumi2012-11-081-9/+19
| | | | | | FoldReinterpretLoadFromConstPtr() Big-endian-aware. llvm-svn: 167595
* Drop the limitation to IEEE floating point types from the fdiv of pow2 -> ↵Benjamin Kramer2012-11-081-5/+0
| | | | | | | | fmul transform. This is safe for x87 long doubles and ppc double doubles too. llvm-svn: 167582
* Recommit modified r167540.Amara Emerson2012-11-081-4/+19
| | | | | | | Improve ARM build attribute emission for architectures types. This also changes the default architecture emitted for a generic CPU to "v7". llvm-svn: 167574
* Add support of RTM from TSX extensionMichael Liao2012-11-0811-46/+159
| | | | | | | | - Add RTM code generation support throught 3 X86 intrinsics: xbegin()/xend() to start/end a transaction region, and xabort() to abort a tranaction region llvm-svn: 167573
* instcombine: Migrate strspn optimizationsMeador Inge2012-11-082-34/+32
| | | | | | | This patch migrates the strspn optimizations from the simplify-libcalls pass into the instcombine library call simplifier. llvm-svn: 167568
OpenPOWER on IntegriCloud