[llvm-commits] [llvm] r132882 - in /llvm/trunk: lib/CodeGen/AsmPrinter/AsmPrinter.cpp lib/Target/X86/X86InstrInfo.cpp test/CodeGen/Thumb2/machine-licm.ll

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Jun 11 23:58:42 PDT 2011


On Jun 11, 2011, at 8:20 PM, Rafael Espindola wrote:

> -  // Otherwise, check the last instruction.
> -  const MachineInstr &LastInst = Pred->back();
> -  return !LastInst.getDesc().isBarrier();
> +  // Otherwise, ask the backend.
> +  const TargetInstrInfo *TII = MF->getTarget().getInstrInfo();
> +  MachineBasicBlock *PredTBB = NULL, *PredFBB = NULL;
> +  SmallVector<MachineOperand, 4> PredCond;
> +  if (TII->AnalyzeBranch(*Pred, PredTBB, PredFBB, PredCond))
> +    return false;
> +
> +  if (PredCond.empty())
> +    return true;
> +  return !PredFBB || PredFBB == MBB;
> }

The double-CFG-edge hack was added as a compile time optimization.

While I like to see it go, we should at least confirm that it was a premature optimization.

Did you measure before/after compile times? The -O0 compile times are extra interesting.

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110611/1dc869b0/attachment.html>


More information about the llvm-commits mailing list