[LLVMdev] Assert in BlockFrequency pass

Ivan Baev ibaev at codeaurora.org
Thu Jun 4 12:28:11 PDT 2015


Hi, we got the following assert:

assert(!Working[0].isLoopHeader() && "entry block is a loop header");

[in BlockFrequencyInfoImpl<BT>::tryToComputeMassInFunction(),
BlockFrequencyInfoImpl.h] on a Hexagon target - the entry block is a loop
header. Has someone seen this assert on other targets?

What would be a preferable way to fix it:
- extend BlockFrequency pass to handle this case, e.g. by inserting a
dummy entry block, or
- make this BlockFrequncy's assumption/requirement more clearly
articulated and avoid creating this situation in a preceding pass (in the
particular case, a machine-level loop rotation)?

Thanks,
Ivan





More information about the llvm-dev mailing list