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

Violeta Vukobrat via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 20 09:46:37 PDT 2018


violetav added inline comments.


================
Comment at: lib/CodeGen/CFIInstrInserter.cpp:182
+        // TODO: Add support for handling cfi_remember_state.
+#ifndef NDEBUG
+        report_fatal_error(
----------------
thegameg wrote:
> Why are the `report_fatal_error`s guarded by `NDEBUG` here?
I thought that possible wrong value of CFA should not be reported and abort compilation in release builds. Do you think that these should be reported as errors in release builds as well?


================
Comment at: test/CodeGen/X86/stack-probe-red-zone.ll:4
 ; Ensure that red zone usage occurs.
-define void @testStackProbesOff() {
+define signext i8 @testStackProbesOff() {
   %array = alloca [40096 x i8], align 16
----------------
Because now CFI instructions don't get in the way of merging add/sub instructions, I changed this test a bit so that 'sub' and 'add' don't end up next to each other and get merged, with only 'ret' remaining. This way red zone can still get checked in the test.


Repository:
  rL LLVM

https://reviews.llvm.org/D42848





More information about the llvm-commits mailing list