[PATCH] D35844: Correct dwarf unwind information in function epilogue

Violeta Vukobrat via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 4 08:12:18 PDT 2017


violetav added a comment.

Hi Kyle,
Here are a few more details, on top of what Petar said:

So, there were a few issues, the first one being that some sanitizer tests on PPC64 were failing due to this change (in stage 2). I saw that the CFIInfoVerifier reported incorrect offsets during stage2 build for PPC, and realised what was causing this. Even if the values for cfa offset and register are not initialized for platforms other that X86, cfa offset value can get set in recalculateCFIInfo(), so it doesn't remain uninitialized. I confirmed that CFIInstrInserter and CFIInfoVerifier were causing the failures on PPC, and not the changes made to CFI instructions in general. So, I added a target hook so that these two passes run only for platforms that maintain CFI info. This resolved the issue for PPC.
The second was the group of issues that caused incorrect offset reports with recursive LLVM builds (which I unfortunately didn't test before). I started debugging the example that Eli reported: http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20170626/465290.html. This example had two issues, which I have described in the first comment. Resolving these two issues resulted in successfully building the CGStmtOpenMP.cpp.o example. I have also changed the CFIInfoVerifier to emit errors as Eli suggested, and not just to print them out. After that, I have built clang+llvm+compiler-rt+lld, ran make check-all, did a recursive build, ran make check with that, ran the llvm-test suite, and got no failures.


Repository:
  rL LLVM

https://reviews.llvm.org/D35844





More information about the llvm-commits mailing list