[PATCH] D145918: [DAG/AMDGPU] Use UniformityAnalysis in DAGISel

Sameer Sahasrabuddhe via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 13 22:09:02 PDT 2023


sameerds added inline comments.


================
Comment at: llvm/include/llvm/Analysis/UniformityAnalysis.h:23
 extern template class GenericUniformityInfo<SSAContext>;
-using UniformityInfo = GenericUniformityInfo<SSAContext>;
+struct UniformityInfo : public GenericUniformityInfo<SSAContext> {
+  using GenericUniformityInfo<SSAContext>::GenericUniformityInfo;
----------------
This looks a bit disturbing to me. And it is squarely outside the limits of my understanding of C++ data types. I am even surprised that a "class UniformityInfo" declaration did not just work.

What happens if you put the following in TargetLowering.h?

```
extern template class GenericUniformityInfo<SSAContext>;
using UniformityInfo = GenericUniformityInfo<SSAContext>;
```

I would certainly recommend that compared to the current approach.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D145918/new/

https://reviews.llvm.org/D145918



More information about the llvm-commits mailing list