This is needed for the next patch which will add more patterns
to the same match.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Making the caller pass a dummy seems awkward.
I don't have any suggestions to improve it, but adding some more potential reviewers.
Wouldn't it be a pointer to a pointer in that case?
Since we already have 'X' in the caller, we could just always pass 'X' instead of using 'Dummy' even if it is not used.
I don't have a strong opinion on it, so LGTM.
Although I am still hoping we can find an alternative to complicated (yet ultimately still fragile) pattern-matching that is trying to work around limits of reassociation and multi-use.
Yes
Since we already have 'X' in the caller, we could just always pass 'X' instead of using 'Dummy' even if it is not used.
This will clobber X even if pattern is not matched, and then X is used later at line 1800.
I don't have a strong opinion on it, so LGTM.
Although I am still hoping we can find an alternative to complicated (yet ultimately still fragile) pattern-matching that is trying to work around limits of reassociation and multi-use.
I hope D114126 is a right answer to multi-use problem, although somewhat complex.