Even if noundef is deduced for a position, we should not manifest it when the position is dead.
This is because the associated values with dead positions are replaced with undef values by AAIsDead.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM, one minor note. The test will be part of the module slice patch, I'm fairly certain this cannot be tested right now but it makes sense.
llvm/lib/Transforms/IPO/AttributorAttributes.cpp | ||
---|---|---|
7814 | I'm not sure this should not be a false. |
Maybe this can be tested if we actually address the TODO for AANoUndef in AAUB? I think with that, this can be caught in module pass?
Just a suggestion.
Sorry, I was wrong. CheckBBLivenessOnly should be false because if it is true we cannot catch the assumed liveness of e.g. returned position.
When I changed it to true, a new AAIsDead was registered in manifestation, and segfault happened. So I register them in initialize.
Some tests are affected by this change.
I have difficulty in doing that because segfault happens when a fixpoint is indicated in initialize and updateImpl is not called even once.
TBH, I think we need to remove the assertion that you see (it should not be a segfault). And replace it with code that causes a pessimistic fixpoint for all attributes created after we are done with the update stage. They can initialize but that is it.
Yes, it was assertion failure. I used a wrong term, sorry for the confusion.
I agree to remove the assertion. Can I work on that?
No, I'm going to allow to query (initialize) new AA in the manifestation stage. That will save us from querying AAIsDead before the manifestation stage.
I'm not sure this should not be a false.