summaryrefslogtreecommitdiff
path: root/lib/Target/README.txt
AgeCommit message (Collapse)Author
2017-12-04[CodeGen] Unify MBB reference format in both MIR and debug outputFrancis Visoiu Mistrih
As part of the unification of the debug format and the MIR format, print MBB references as '%bb.5'. The MIR printer prints the IR name of a MBB only for block definitions. * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)->getNumber\(\)/" << printMBBReference(*\1)/g' * find . \( -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#" << ([a-zA-Z0-9_]+)\.getNumber\(\)/" << printMBBReference(\1)/g' * find . \( -name "*.txt" -o -name "*.s" -o -name "*.mir" -o -name "*.cpp" -o -name "*.h" -o -name "*.ll" \) -type f -print0 | xargs -0 sed -i '' -E 's/BB#([0-9]+)/%bb.\1/g' * grep -nr 'BB#' and fix Differential Revision: https://reviews.llvm.org/D40422 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319665 91177308-0d34-0410-b5e6-96231b3b80d8
2016-10-05Test commit permissionOren Ben Simhon
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@283318 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-15Remove the ScalarReplAggregates passDavid Majnemer
Nearly all the changes to this pass have been done while maintaining and updating other parts of LLVM. LLVM has had another pass, SROA, which has superseded ScalarReplAggregates for quite some time. Differential Revision: http://reviews.llvm.org/D21316 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272737 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-05Rename all references to old mailing lists to new lists.llvm.org address.Tanya Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243999 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-26InstCombine: fold (A << C) == (B << C) --> ((A^B) & (~0U >> C)) == 0Benjamin Kramer
Anding and comparing with zero can be done in a single instruction on most archs so this is a bit cheaper. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233291 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-21[SimplifyLibCalls] Turn memchr(const, C, const) into a bitfield check.Benjamin Kramer
strchr("123!", C) != nullptr is a common pattern to check if C is one of 1, 2, 3 or !. If the largest element of the string is smaller than the target's register size we can easily create a bitfield and just do a simple test for set membership. int foo(char C) { return strchr("123!", C) != nullptr; } now becomes cmpl $64, %edi ## range check sbbb %al, %al movabsq $0xE000200000001, %rcx btq %rdi, %rcx ## bit test sbbb %cl, %cl andb %al, %cl ## and the two conditions andb $1, %cl movzbl %cl, %eax ## returning an int ret (imho the backend should expand this into a series of branches, but that's a different story) The code is currently limited to bit fields that fit in a register, so usually 64 or 32 bits. Sadly, this misses anything using alpha chars or {}. This could be fixed by just emitting a i128 bit field, but that can generate really ugly code so we have to find a better way. To some degree this is also recreating switch lowering logic, but we can't simply emit a switch instruction and thus change the CFG within instcombine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232902 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-16Delete -std-compile-opts.Rafael Espindola
These days -std-compile-opts was just a silly alias for -O3. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@219951 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-21Reassociate x + -0.1234 * y into x - 0.1234 * yErik Verbruggen
This does not require -ffast-math, and it gives CSE/GVN more options to eliminate duplicate expressions in, e.g.: return ((x + 0.1234 * y) * (x - 0.1234 * y)); Differential Revision: http://reviews.llvm.org/D4904 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216169 91177308-0d34-0410-b5e6-96231b3b80d8
2014-08-15Remove testcase from README which we didn't get. We do get it now.Erik Verbruggen
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215699 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-28Revert "InstCombine: merge constants in both operands of icmp."Erik Verbruggen
This reverts commit r204912, and follow-up commit r204948. This introduced a performance regression, and the fix is not completely clear yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205010 91177308-0d34-0410-b5e6-96231b3b80d8
2014-03-27InstCombine: merge constants in both operands of icmp.Erik Verbruggen
Transform: icmp X+Cst2, Cst into: icmp X, Cst-Cst2 when Cst-Cst2 does not overflow, and the add has nsw. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204912 91177308-0d34-0410-b5e6-96231b3b80d8
2012-12-13Remove two popcount patterns which we are already able to recognize.Shuxin Yang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170158 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-08Move TargetData to DataLayout.Micah Villmow
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165402 91177308-0d34-0410-b5e6-96231b3b80d8
2012-08-19Fabs folding is implemented.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162186 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-23Test revert of test changes.Micah Villmow
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160632 91177308-0d34-0410-b5e6-96231b3b80d8
2012-07-23Test commit.Micah Villmow
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160631 91177308-0d34-0410-b5e6-96231b3b80d8
2012-06-23Add a microoptimization note.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159082 91177308-0d34-0410-b5e6-96231b3b80d8
2012-04-12Remove README entry obsoleted by register masks.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154588 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-28Add another note about a missed compare with nsw arithmetic instcombine.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153574 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-27Add a note about a cute little fabs optimization.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153543 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-27Add two missed instcombines related to compares with nsw arithmetic.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153542 91177308-0d34-0410-b5e6-96231b3b80d8
2011-09-07Add two notes for correlated-expression optimizations.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139263 91177308-0d34-0410-b5e6-96231b3b80d8
2011-07-14Don't emit a bit test if there is only one case the test can yield false. A ↵Benjamin Kramer
simple SETNE is sufficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135126 91177308-0d34-0410-b5e6-96231b3b80d8
2011-06-13InstCombine: Fold A-b == C --> b == A-C if A and C are constants.Benjamin Kramer
The backend already knew this trick. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132915 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-23clarify this, apparently it is confusing :)Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131916 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22add a note.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131863 91177308-0d34-0410-b5e6-96231b3b80d8
2011-05-22move PR9408 here.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131841 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-26Transform: "icmp eq (trunc (lshr(X, cst1)), cst" to "icmp (and X, mask), cst"Chris Lattner
when X has multiple uses. This is useful for exposing secondary optimizations, but the X86 backend isn't ready for this when X has a single use. For example, this can disable load folding. This is inching towards resolving PR6627. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130238 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-25add a missed bitfield instcombine.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130137 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-22DAGCombine: fold "(zext x) == C" into "x == (trunc C)" if the trunc is lossless.Benjamin Kramer
On x86 this allows to fold a load into the cmp, greatly reducing register pressure. movzbl (%rdi), %eax cmpl $47, %eax -> cmpb $47, (%rdi) This shaves 8k off gcc.o on i386. I'll leave applying the patch in README.txt to Chris :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@130005 91177308-0d34-0410-b5e6-96231b3b80d8
2011-04-14add a minor missed dag combine that is blocking mid-level optimizationChris Lattner
improvements, that will lead to fixing PR6627. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129504 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-25Add a note.Benjamin Kramer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128286 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-22A bit more analysis of a memset-related README entry.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128107 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-21This README entry was fixed recently.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127982 91177308-0d34-0410-b5e6-96231b3b80d8
2011-03-01add a noteChris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126719 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-26Add some DAGCombines for (adde 0, 0, glue), which are useful to optimize ↵Benjamin Kramer
legalized code for large integer arithmetic. 1. Inform users of ADDEs with two 0 operands that it never sets carry 2. Fold other ADDs or ADDCs into the ADDE if possible It would be neat if we could do the same thing for SETCC+ADD eventually, but we can't do that in target independent code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126557 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21add a missed loop deletion case.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126103 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-21add an idiom that loop idiom could theoretically catch.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126101 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17This has been implemented.Duncan Sands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125738 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-17add some notes on compares + binops. Remove redundant entries.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125702 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16Add a few missed xforms from GCC PR14753Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125681 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16Remove outdated README entry.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125660 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16Remove outdated README entry.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125659 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-16Update README entry.Eli Friedman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125658 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-06Remove a virtual inheritance case that clang can devirtualize fully now.Anders Carlsson
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124989 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-02SimplifyCFG: Turn switches into sub+icmp+branch if possible.Benjamin Kramer
This makes the job of the later optzn passes easier, allowing the vast amount of icmp transforms to chew on it. We transform 840 switches in gcc.c, leading to a 16k byte shrink of the resulting binary on i386-linux. The testcase from README.txt now compiles into decl %edi cmpl $3, %edi sbbl %eax, %eax andl $1, %eax ret git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124724 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-31add a note, progress unblocked by PR8575 being fixed.Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124599 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-30Teach DAGCombine to fold fold (sra (trunc (sr x, c1)), c2) -> (trunc (sra x, ↵Benjamin Kramer
c1+c2) when c1 equals the amount of bits that are truncated off. This happens all the time when a smul is promoted to a larger type. On x86-64 we now compile "int test(int x) { return x/10; }" into movslq %edi, %rax imulq $1717986919, %rax, %rax movq %rax, %rcx shrq $63, %rcx sarq $34, %rax <- used to be "shrq $32, %rax; sarl $2, %eax" addl %ecx, %eax This fires 96 times in gcc.c on x86-64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124559 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-24this isn't a memset, we do convert dest[i] to one though :)Chris Lattner
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124097 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-24with recent work, we now optimize this into:Chris Lattner
define i32 @foo(i32 %x) nounwind readnone ssp { entry: %tobool = icmp eq i32 %x, 0 %tmp5 = select i1 %tobool, i32 2, i32 1 ret i32 %tmp5 } git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124091 91177308-0d34-0410-b5e6-96231b3b80d8