[PATCH] D48580: [AArch64] Support reserving x1-7 registers.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 4 17:29:44 PDT 2018


efriedma added inline comments.


================
Comment at: lib/Target/AArch64/AArch64RegisterInfo.cpp:183
+  WithColor::warning() << "An argument register was reserved, but "
+                       << MF.getName() << " function makes a function call.\n";
 }
----------------
LLVM library code isn't allowed to write directly to stderr; you have to go through LLVMContext::diagnose.

If you're going to put user data into an error message, you have to escape it; we don't want to send terminal escape codes stderr.

Fix that, and make it an error, and I guess I'm fine with this, assuming it's enough to handle the kernel usage.  It's still ugly, but given code that doesn't make any calls, argument registers aren't special, so it shouldn't miscompile.


https://reviews.llvm.org/D48580





More information about the llvm-commits mailing list