[llvm] 367b1f2 - [NFC][AMDGPULowerModuleLDSPass] Fix buildbot santizier failed to compile
Juan Manuel MARTINEZ CAAMAÑO via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 12 02:08:25 PDT 2023
Author: Juan Manuel MARTINEZ CAAMAÑO
Date: 2023-07-12T11:08:16+02:00
New Revision: 367b1f28dbcfda5b7909f4d271bcace063398143
URL: https://github.com/llvm/llvm-project/commit/367b1f28dbcfda5b7909f4d271bcace063398143
DIFF: https://github.com/llvm/llvm-project/commit/367b1f28dbcfda5b7909f4d271bcace063398143.diff
LOG: [NFC][AMDGPULowerModuleLDSPass] Fix buildbot santizier failed to compile
It seems that the sanitizer-x86_64-linux-android wasn't able to deduce
the template argument:
AMDGPULowerModuleLDSPass.cpp:1192:53: error: no viable constructor or
deduction guide for deduction of template arguments of 'vector'
auto TableLookupVariablesOrdered = sortByName(std::vector(
This patch makes the template argument explicit.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
index c83da618749233..4cd138e3f6fbce 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -1189,8 +1189,9 @@ class AMDGPULowerModuleLDS : public ModulePass {
// The order must be consistent between lookup table and accesses to
// lookup table
- auto TableLookupVariablesOrdered = sortByName(std::vector(
- TableLookupVariables.begin(), TableLookupVariables.end()));
+ auto TableLookupVariablesOrdered =
+ sortByName(std::vector<GlobalVariable *>(TableLookupVariables.begin(),
+ TableLookupVariables.end()));
GlobalVariable *LookupTable = buildLookupTable(
M, TableLookupVariablesOrdered, OrderedKernels, KernelToReplacement);
@@ -1337,8 +1338,8 @@ class AMDGPULowerModuleLDS : public ModulePass {
// The order of fields in this struct depends on the order of
// varables in the argument which varies when changing how they
// are identified, leading to spurious test breakage.
- auto Sorted = sortByName(
- std::vector(LDSVarsToTransform.begin(), LDSVarsToTransform.end()));
+ auto Sorted = sortByName(std::vector<GlobalVariable *>(
+ LDSVarsToTransform.begin(), LDSVarsToTransform.end()));
for (GlobalVariable *GV : Sorted) {
OptimizedStructLayoutField F(GV,
@@ -1427,7 +1428,7 @@ class AMDGPULowerModuleLDS : public ModulePass {
// A hack... we need to insert the aliasing info in a predictable order for
// lit tests. Would like to have them in a stable order already, ideally the
// same order they get allocated, which might mean an ordered set container
- std::vector<GlobalVariable *> LDSVarsToTransform = sortByName(std::vector(
+ auto LDSVarsToTransform = sortByName(std::vector<GlobalVariable *>(
LDSVarsToTransformArg.begin(), LDSVarsToTransformArg.end()));
// Create alias.scope and their lists. Each field in the new structure
More information about the llvm-commits
mailing list