Unless I am reading the code wrong... :-)

Evan
On May 15, 2007, at 10:09 PM, Evan Cheng wrote:

It shouldn't. :-) I am missing an assert.

This check earlier ensures that the block ends with either a conditional branch or a conditional branch + a unconditional branch.
  if (TII->AnalyzeBranch(*BB, BBI.TBB, BBI.FBB, BBI.Cond)
      || !BBI.TBB || BBI.Cond.size() == 0)

BBI.FBB is only NULL if it's the former.

The comments in TargetInstrInfo.h is incorrect. I'll fix.

Thanks,

Evan

On May 15, 2007, at 8:07 PM, Devang Patel wrote:


On May 15, 2007, at 7:01 PM, Evan Cheng wrote:

+   if (!BBI.FBB)
+     BBI.FBB = findFalseBlock(BB, BBI.TBB);
+   AnalyzeBlock(BBI.FBB);
+   BBInfo &FBBI = BBAnalysis[BBI.FBB->getNumber()];

If findFalseBlock returns NULL then AnalyzeBlock may crash here.

-
Devang
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to