[PATCH] D79978: Call Frame Information (CFI) Handling for Basic Block Sections

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 10 23:22:36 PDT 2020


dblaikie added inline comments.


================
Comment at: llvm/test/CodeGen/X86/cfi-inserter-basic-block-sections-callee-save-registers.ll:21-36
+; Exhaust caller-saved parameter registers and  force callee saved registers to
+; be used.  This tests that CFI directives for callee saved registers are
+; generated with basic block sections.
+; extern void f1(int, int, int);
+;
+; void foo(bool k, int p1, int p2, int p3, int p4, int p5, int p6) {
+;   // Using a conditional forces a basic block section.
----------------
Thanks for this - totally makes sense to me now!
(Totally optional: I'd probably just write this with one parameter? And/or perhaps with constants for the first f1 call? - I've needed to do things like this when testing the DWARF OP_entry_values:

```
void f1(int);
extern bool b;
void f3(int i) {
  if (b) { // adds a basic block
    f1(1); // clobbers 'i', causing it to be spilled
    f1(i); // keeps 'i' alive
  }
}
```

Not to nitpick - just trying to help ensure tests are very specifically targeted - at least makes them easier for me to read, not sure about other folks? (if there's something interesting about testing more than one of these - some comments describing that'd be handy too)

What you've got is fine though, if you prefer it/find it valuable

Thanks for the general write-up of CFI and this patch - helped me understand a bit of what this patch in general, and this test in particular are all about!)


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

https://reviews.llvm.org/D79978





More information about the llvm-commits mailing list