From 35ccf53e753fab6b1b0221502cd4fcee1de6a2e9 Mon Sep 17 00:00:00 2001 From: Diana Picus Date: Sun, 14 Aug 2016 02:10:12 +0000 Subject: Revert "Codegen: Don't tail-duplicate blocks with un-analyzable fallthrough." This reverts commit r278288. r278287 broke the clang-cmake-thumbv7-a15-full-sh bot. Revert this so we can get to r278287. llvm-svn: 278620 --- llvm/lib/CodeGen/TailDuplicator.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'llvm/lib/CodeGen/TailDuplicator.cpp') diff --git a/llvm/lib/CodeGen/TailDuplicator.cpp b/llvm/lib/CodeGen/TailDuplicator.cpp index e9a5f14b04f..f3afbeb3a0e 100644 --- a/llvm/lib/CodeGen/TailDuplicator.cpp +++ b/llvm/lib/CodeGen/TailDuplicator.cpp @@ -525,16 +525,6 @@ bool TailDuplicator::shouldTailDuplicate(const MachineFunction &MF, else MaxDuplicateCount = TailDuplicateSize; - // If the block to be duplicated ends in an unanalyzable fallthrough, don't - // duplicate it. - // A similar check is necessary in MachineBlockPlacement to make sure pairs of - // blocks with unanalyzable fallthrough get layed out contiguously. - MachineBasicBlock *PredTBB = nullptr, *PredFBB = nullptr; - SmallVector PredCond; - if (TII->analyzeBranch(TailBB, PredTBB, PredFBB, PredCond, true) - && TailBB.canFallThrough()) - return false; - // If the target has hardware branch prediction that can handle indirect // branches, duplicating them can often make them predictable when there // are common paths through the code. The limit needs to be high enough -- cgit v1.2.3