This patch adds typing of inequalities to the simplex. This is a cental part of the coalesce algorithm and will be heavily used in later coalesce patches. Currently, only the three most basic types are supported with more to be introduced when they are needed.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/include/mlir/Analysis/Presburger/Simplex.h | ||
---|---|---|
561–567 | ||
mlir/lib/Analysis/Presburger/PresburgerSet.cpp | ||
421–424 ↗ | (On Diff #409177) | Could you write a comment here on what it's doing? I don't exactly understand what it is doing. |
427–429 ↗ | (On Diff #409177) | Use lowerCamelCase for variables, please. |
435–441 ↗ | (On Diff #409177) | You can remove the curly braces here. |
mlir/include/mlir/Analysis/Presburger/Simplex.h | ||
---|---|---|
493 | I think it might be best to move this down right above ineqType | |
567 | You should be able to drop this here | |
567 | Maybe rename to findIneqType. Function names should represent doing something | |
mlir/lib/Analysis/Presburger/PresburgerSet.cpp | ||
421 ↗ | (On Diff #409189) | As far as I can see, this doesn't change the functionality, but reimplements it in a different way to setup the rest of the coalesce patches? If so, I would leave it out for this patch. |
421–429 ↗ | (On Diff #409189) | Please capitalize starts of sentences and end them with full stops |
422–426 ↗ | (On Diff #409189) | I would suggest early exiting if it becomes false at any point |
423–433 ↗ | (On Diff #409189) | Is there a specific reason for using l as the iterator when k is unused? |
mlir/lib/Analysis/Presburger/Simplex.cpp | ||
1624 | I would just omit all the "if it exists" stuff. If it doesn't exist, it's plus/minus infinity and people can figure out whether that's >= or <= 0. This would make the whole doc much more understandable | |
1626 | ||
1627 | ||
1630 | Describe why the other case corresponds to the description of what "separate" means above |
I removed everything concerning looping strategy in coalesce. This is reduced purely to everything that concerns introducing inequality types.
I think it might be best to move this down right above ineqType