[PATCH] D25381: [AMDGPU] Add amdgpu-unify-metadata pass

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 16:44:31 PST 2016


rampitec added a comment.

In https://reviews.llvm.org/D25381#588102, @tstellarAMD wrote:

> It seems like merging the OpenCl metadata would have to be done in an AMDGPU backend pass, since it uses rules specific to our target.  However, I think de-duplicating generic metadata like .ident should be handled in a target independent way.


I agree. When https://reviews.llvm.org/D20582 is submitted we can remove one line from this change.



================
Comment at: lib/Target/AMDGPU/AMDGPUUnifyMetadata.cpp:105
+    if (E == 1) return false;
+    std::string All;
+    bool First = true;
----------------
tstellarAMD wrote:
> Would it be better to use Twine here?
I have to modify the string each iteration (potentially). That is not how Twine does work, it is basically not created to be modified later. In particular is does not have operator=(), only constructor.


Repository:
  rL LLVM

https://reviews.llvm.org/D25381





More information about the llvm-commits mailing list