This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Use `if constexpr` in `StorageUniquer` and `IR/AffineExpr`
ClosedPublic

Authored by jloser on Dec 3 2022, 5:03 PM.

Details

Summary

Querying the type trait is something that can be done at compile time. So,
replace the runtime if with if constexpr.

Diff Detail

Event Timeline

jloser created this revision.Dec 3 2022, 5:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 3 2022, 5:03 PM
jloser requested review of this revision.Dec 3 2022, 5:03 PM
jloser updated this revision to Diff 479882.Dec 3 2022, 5:04 PM
jloser retitled this revision from [MLIR] Use `if constexpr` in `StorageUniquer` to [MLIR] Use `if constexpr` in `StorageUniquer` and `IR/AffineExpr`.

Update title to reflect IR/AffineExpr changes as well

rriddle accepted this revision.Dec 3 2022, 5:07 PM
This revision is now accepted and ready to land.Dec 3 2022, 5:07 PM