[PATCH] D98174: [MCA] Add tests for IPC on Cortex-A55

Greg Bedwell via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 9 07:08:45 PST 2021


gbedwell added inline comments.


================
Comment at: llvm/test/tools/llvm-mca/AArch64/Cortex/IPC/A55-0.s:1
+# RUN: llvm-mca -mtriple=aarch64 -mcpu=cortex-a55 --dispatch-stats --iterations=1000 < %s | FileCheck %s
+# CHECK: IPC:
----------------
asavonic wrote:
> andreadb wrote:
> > Do you actually need --dispatch-stats?
> > If the goal of these tests is to simply check the IPC, then you should be able to simply pass flags `--all-views=false -summary-view`.
> > 
> > I also suggest to pass all these tests through the update_mca python script. If you only enable the summary-view, then the number of checks in the output will be very small.
> > Do you actually need --dispatch-stats?
> > If the goal of these tests is to simply check the IPC, then you should be able to simply pass flags `--all-views=false -summary-view`.
> 
> Thanks. I replaced --dispatch-stats with --summary-view.
> 
> > I also suggest to pass all these tests through the update_mca python script. If you only enable the summary-view, then the number of checks in the output will be very small.
> 
> I cannot figure out to how to combine both the reference checks and the checks
> from update_mca. They match the same lines (IPC: X.XX), so we cannot use different
> check prefixes:
> ```
>     # RUN: llvm-mca $(args) < %s | FileCheck %s --check-prefixes=CHECK,CHECK-IPC
>     # CHECK-IPC: IPC:
>     # CHECK-IPC-SAME: 1.00
> 
>     add	w8, w8, #1
> 
>     # CHECK:      Iterations:        1000  <-- this check does not match, scan continues from IPC: 1.00
>     # CHECK-NEXT: Instructions:      1000 
> ```         
> I tried to add two FileCheck calls, but update_mca cannot handle this:
> ```
>     # RUN: llvm-mca $(args) < %s > %t.log
>     # RUN: FileCheck %s < %t.log
>     # RUN: FileCheck %s --check-prefix CHECK-IPC < %t.log
> 
>     update_mca_test_checks.py:93: Warning: could not split tool and filecheck commands
> ```
> 
> 
> 
For the non-xfailing tests the auto-generated checks should serve the purpose as they will explicitly contain the line:

```
# CHECK-NEXT: IPC:               1.00
```

For the XFAIL tests, I think you'd have to do the trick of splitting the llvm-mca and FileCheck lines as above, in order to prevent the script from overwriting the checks.  The advantage of the update script is that it automates the process for anyone running the script across (for example) the entire Aarch64 directory tree after making some change, but probably no big deal either way.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98174/new/

https://reviews.llvm.org/D98174



More information about the llvm-commits mailing list