[llvm] edea476 - [AMDGPU] Use simpler alternatives to !foldl. NFC.
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 20 04:59:21 PDT 2021
Author: Jay Foad
Date: 2021-04-20T12:59:04+01:00
New Revision: edea476142685c408ad086a5622c1a01f230a362
URL: https://github.com/llvm/llvm-project/commit/edea476142685c408ad086a5622c1a01f230a362
DIFF: https://github.com/llvm/llvm-project/commit/edea476142685c408ad086a5622c1a01f230a362.diff
LOG: [AMDGPU] Use simpler alternatives to !foldl. NFC.
Added:
Modified:
llvm/lib/Target/AMDGPU/SIRegisterInfo.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/SIRegisterInfo.td b/llvm/lib/Target/AMDGPU/SIRegisterInfo.td
index 6add7d0417ce..b00ed56126c1 100644
--- a/llvm/lib/Target/AMDGPU/SIRegisterInfo.td
+++ b/llvm/lib/Target/AMDGPU/SIRegisterInfo.td
@@ -36,12 +36,12 @@ foreach Index = 1...31 in {
foreach Size = {2...6,8,16} in {
foreach Index = Indexes<!sub(33, Size)>.slice in {
- def !foldl("", Indexes<Size>.slice, acc, cur,
- !strconcat(acc#!if(!eq(acc,""),"","_"), "sub"#!add(cur, Index))) :
+ def !interleave(!foreach(cur, Indexes<Size>.slice, "sub"#!add(cur, Index)),
+ "_") :
SubRegIndex<!mul(Size, 32), !shl(Index, 5)> {
let CoveringSubRegIndices =
- !foldl([]<SubRegIndex>, Indexes<Size>.slice, acc, cur,
- !listconcat(acc, [!cast<SubRegIndex>(sub#!add(cur, Index))]));
+ !foreach(cur, Indexes<Size>.slice,
+ !cast<SubRegIndex>(sub#!add(cur, Index)));
}
}
}
More information about the llvm-commits
mailing list