PruneEH incorrectly sets MadeChange while adding function attributes. To determine whether a change was made it compares function attributes set with new attributes set. Function attributes set might include new attributes set as well as some other attributes. In this case MadeChange is set, however no change is made.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
As far as I can see this value is not reported or logged anywhere, so I can't see an easy way to test it. I come across this issue while running PruneEH in a fixed point iteration loop.
lib/Transforms/IPO/PruneEH.cpp | ||
---|---|---|
158 ↗ | (On Diff #38478) | I think it would be much clearer to restructure this code as: !F->hasFnAttribute(Attribute::NoUnwind)) { F->addFnAttr(Attribute::NoUnwind); MadeChange = true; } |