[PATCH] D58728: [MCA] Highlight kernel bottlenecks in the summary view.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 27 12:34:16 PST 2019
lebedev.ri added inline comments.
================
Comment at: include/llvm/MCA/HWEventListener.h:143
+
+ HWPressureEvent(unsigned reason, ArrayRef<InstRef> Insts, uint64_t Mask = 0)
+ : Reason(reason), AffectedInstructions(Insts), ResourceMask(Mask) { }
----------------
```
HWPressureEvent(GenericReason reason,
```
?
================
Comment at: include/llvm/MCA/HWEventListener.h:147
+ // Reason for this increase in backend pressure.
+ unsigned Reason;
+
----------------
`GenericReason`?
================
Comment at: lib/MCA/HardwareUnits/Scheduler.cpp:232-233
+uint64_t Scheduler::analyzeResourcePressure(SmallVectorImpl<InstRef> &Insts) {
+ for (const InstRef &IR : ReadySet)
+ Insts.emplace_back(IR);
+ return BusyResourceUnits;
----------------
Isn't `ReadySet` a `std::vector`?
It would be best to do something like `Insts.insert(Insts.end(), ReadySet.begin(), ReadySet.end());`
E.g. because this way you avoid constant reallocations since you tell beforehand the amount of entries you want to insert.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58728/new/
https://reviews.llvm.org/D58728
More information about the llvm-commits
mailing list