[PATCH] D49598: [SystemZ] Use tablegen loops in SchedModels
Ulrich Weigand via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 25 02:35:04 PDT 2018
uweigand added a comment.
See inline comments. In general I agree with this approach.
================
Comment at: lib/Target/SystemZ/SystemZSchedule.td:32
+ LSULatency]>;
+}
----------------
I believe you can omit the braces if there's just a single statement inside the foreach.
================
Comment at: lib/Target/SystemZ/SystemZSchedule.td:54
// Load/store unit
-def LSU : SchedWrite;
-def LSU2 : SchedWrite;
-def LSU3 : SchedWrite;
-def LSU4 : SchedWrite;
-def LSU5 : SchedWrite;
+foreach Num = ["", "2", "3", "4", "5", "6"] in { def "LSU"#Num : SchedWrite; }
----------------
Why isn't this in the loop above as well?
================
Comment at: lib/Target/SystemZ/SystemZSchedule.td:59
def VecStr : SchedWrite;
-def VecXsPm : SchedWrite;
-def VecXsPm2 : SchedWrite;
+foreach Num = ["", "2"] in { def "VecXsPm"#Num : SchedWrite; }
----------------
I'd probably just but all of them in the loop too. Except the VecFPd, which is special.
https://reviews.llvm.org/D49598
More information about the llvm-commits
mailing list