History log of /external/llvm/lib/CodeGen/BranchFolding.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f7b5e016363b664461f33a4a391b27bea637209d 24-Jun-2013 Andrew Trick <atrick@apple.com> Fix tail merging to assign the (more) correct BasicBlock when splitting.

This makes it possible to write unit tests that are less susceptible
to minor code motion, particularly copy placement. block-placement.ll
covers this case with -pre-RA-sched=source which will soon be
default. One incorrectly named block is already fixed, but without
this fix, enabling new coalescing and scheduling would cause more
failures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184680 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
a38cfb2fceb266bd78164021c08284dc59a1e8a3 07-Jul-2011 Eli Friedman <eli.friedman@gmail.com> When tail-merging multiple blocks, make sure to correctly update the live-in list on the merged block to correctly account for the live-outs of all the predecessors. They might not be the same in all cases (the testcase I have involves a PHI node where one of the operands is an IMPLICIT_DEF).

Unfortunately, the testcase I have is large and confidential, so I don't have a test to commit at the moment; I'll see if I can come up with something smaller where this issue reproduces.

<rdar://problem/9716278>



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134565 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
f924dea8ddb74df8d591f8fdc409fc5b8b5e10d4 14-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Add 132986 back, but avoid non-determinism if a bb address gets reused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132995 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
7a07083c25074b560fea1198a86facf3a95af850 14-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> revert 132986 to see if the bots go green.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132988 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
3a42565ccb169ec4acf79698b38d7da880f13364 14-Jun-2011 Rafael Espindola <rafael.espindola@gmail.com> Make the threshold used by branch folding softer. Before we would get a
sharp all or nothing transition when one extra predecessor was added. Now
we still test first ones for merging.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132974 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
cbc988be22bc9411d95215c8b7251b5f85710674 12-May-2011 Evan Cheng <evan.cheng@apple.com> Re-commit 131172 with fix. MachineInstr identity checks should check dead
markers. In some cases a register def is dead on one path, but not on
another.

This is passing Clang self-hosting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131214 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
41cdc16e7301c91d2460aa14412f592695b0d4ed 11-May-2011 Rafael Espindola <rafael.espindola@gmail.com> Revert 131172 as it is causing clang to miscompile itself. I will try
to provide a reduced testcase.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131176 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
7e20a574eb3f4fc3840a0490c814443d756e2e0e 11-May-2011 Evan Cheng <evan.cheng@apple.com> Add a late optimization to BranchFolding that hoist common instruction sequences
at the start of basic blocks to their common predecessor. It's actually quite
common (e.g. about 50 times in JM/lencod) and has shown to be a nice code size
benefit. e.g.

pushq %rax
testl %edi, %edi
jne LBB0_2
## BB#1:
xorb %al, %al
popq %rdx
ret
LBB0_2:
xorb %al, %al
callq _foo
popq %rdx
ret

=>

pushq %rax
xorb %al, %al
testl %edi, %edi
je LBB0_2
## BB#1:
callq _foo
LBB0_2:
popq %rdx
ret

rdar://9145558


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131172 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
4d54e5b2dd4a3d3bed38ff9c7aa57fc66adb5855 22-Jun-2010 Evan Cheng <evan.cheng@apple.com> Tail merging pass shall not break up IT blocks. rdar://8115404


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106517 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
15acadde5f87703da5f36721a19c09a7e3f97f53 26-Nov-2009 Bob Wilson <bob.wilson@apple.com> Split tail duplication into a separate pass. This is needed to avoid
running tail duplication when doing branch folding for if-conversion, and
we also want to be able to run tail duplication earlier to fix some
reg alloc problems. Move the CanFallThrough function from BranchFolding
to MachineBasicBlock so that it can be shared by TailDuplication.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89904 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
56ea69c3a251434db3fef489881368e29c95712d 17-Nov-2009 Bob Wilson <bob.wilson@apple.com> Perform tail duplication only once, after tail merging is complete.
It was too difficult to keep the heuristics for merging and duplication
consistent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89105 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
72b2990a7495b9df89e151eb711c1e7abdd5f2e5 12-Nov-2009 Dan Gohman <gohman@apple.com> Make the BranchFolderPass class local to BranchFolding.cpp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86928 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
ffe644ebf4dcc50b314261ddd2d08c841f629349 11-Nov-2009 Dan Gohman <gohman@apple.com> Promote MergePotentialsElt and SameTailElt to be regular classes
instead of typedefs for std::pair. This simplifies the type of
SameTails, which previously was std::vector<std::pair<std::vector<std::pair<unsigned, MachineBasicBlock *> >::iterator, MachineBasicBlock::iterator>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86885 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
412a3b90d1f4f1ad42c6c0e7e4e596f7ab688cb7 11-Nov-2009 Dan Gohman <gohman@apple.com> Check in the changes to this file too.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86873 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
a597103c328e29fb763e7a4864bd7c29a588fc9d 28-Oct-2009 Bob Wilson <bob.wilson@apple.com> Revert r85346 change to control tail merging by CodeGenOpt::Level.
I'm going to redo this using the OptimizeForSize function attribute.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85426 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
cd4f04d6bcb7aefa24d92582fbadfe17519f4756 28-Oct-2009 Bob Wilson <bob.wilson@apple.com> Record CodeGen optimization level in the BranchFolding pass so that we can
use it to control tail merging when there is a tradeoff between performance
and code size. When there is only 1 instruction in the common tail, we have
been merging. That can be good for code size but is a definite loss for
performance. Now we will avoid tail merging in that case when the
optimization level is "Aggressive", i.e., "-O3". Radar 7338114.

Since the IfConversion pass invokes BranchFolding, it too needs to know
the optimization level. Note that I removed the RegisterPass instantiation
for IfConversion because it required a default constructor. If someone
wants to keep that for some reason, we can add a default constructor with
a hard-wired optimization level.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85346 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h
030a0a0cdb38924e55773a8e0b5fe7347aa664aa 04-Sep-2009 Evan Cheng <evan.cheng@apple.com> Run branch folding if if-converter make some transformations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80994 91177308-0d34-0410-b5e6-96231b3b80d8
/external/llvm/lib/CodeGen/BranchFolding.h