This is an archive of the discontinued LLVM Phabricator instance.

WIP: abstract results on GlobalOp
DraftPublic

Authored by unterumarmung on Jul 6 2022, 6:14 AM.
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
sscalpone

Diff Detail

Event Timeline

unterumarmung created this revision.Jul 6 2022, 6:14 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald Transcript
Herald added a subscriber: mehdi_amini. · View Herald Transcript

Overall it feels a bit weird to have the same pass dealing with two different things. Maybe having two passes or a single pass on module would be better.

flang/include/flang/Tools/CLOptions.inc
186

Maybe a single pass on module can do th trick?

flang/lib/Optimizer/Transforms/AbstractResult.cpp
262

This is not super clear what it tries to achieve. At least a comment would be good..

unterumarmung added inline comments.Jul 11 2022, 2:01 AM
flang/include/flang/Tools/CLOptions.inc
186

Yeah! I thought that too..
But when I refactored code to be the pass on module, all tests that include functions with abstract results that should be converted were failing. I do not know why but the pass stopped them converting.
I guessed that since there is no module declaration in the tests (like in abstract-results.fir), the pass doesn't convert functions, because they are not in a module.
Could that be a reason?

flang/lib/Optimizer/Transforms/AbstractResult.cpp
262

Yeah, I'll add comments when I get things working