This is an archive of the discontinued LLVM Phabricator instance.

[MLIR][Presburger] factor out duplicated function `parsePoly` into a Utils.h
ClosedPublic

Authored by arjunp on Feb 7 2022, 2:42 PM.

Diff Detail

Event Timeline

arjunp created this revision.Feb 7 2022, 2:42 PM
arjunp requested review of this revision.Feb 7 2022, 2:42 PM
arjunp updated this revision to Diff 406616.Feb 7 2022, 2:43 PM

Update file comment

Groverkss added inline comments.Feb 8 2022, 4:11 AM
mlir/unittests/Analysis/Presburger/Utils.h
10–11

I think a more general doc comment would be better. Something like:

"This file defines helper functions for testing the Presburger library"

26

Should this be static?

arjunp updated this revision to Diff 406770.Feb 8 2022, 4:26 AM

Fix file comment

mlir/unittests/Analysis/Presburger/Utils.h
26

I'm planning to make the MLIRContext static in another patch. The function is already static. Which one did you mean exactly?

Groverkss added inline comments.Feb 8 2022, 4:28 AM
mlir/unittests/Analysis/Presburger/Utils.h
26

Sorry. I meant is there any reason for this function to be static?

arjunp added inline comments.Feb 8 2022, 4:31 AM
mlir/unittests/Analysis/Presburger/Utils.h
26

Oh! Yeah, it violates ODR otherwise since all the test .cpp files get linked together.

arjunp marked an inline comment as done.Feb 8 2022, 4:31 AM
Groverkss accepted this revision.Feb 8 2022, 5:10 AM

LGTM.

This revision is now accepted and ready to land.Feb 8 2022, 5:10 AM