[PATCH] D20295: When looking for a spill slot in reg scavenger, find one that matches RC
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Wed May 18 16:00:54 PDT 2016
MatzeB added inline comments.
================
Comment at: llvm/trunk/lib/CodeGen/RegisterScavenging.cpp:445
@@ +444,3 @@
+ llvm_unreachable(Msg.str().c_str());
+ report_fatal_error(Msg);
+ }
----------------
kparzysz wrote:
> I kept both.
This makes no sense. llvm_unreachable() is an indication that this case cannot happen and the compiler will actually optimize for this. There is a high chance it remove the report_fatal_error() in this case.
If you have an error that could actually be provoked by a user of the compiler (through inline assembly or similar) then report_fatal_error() is apropriate. If the problem can only be caused by a bug in llvm then llvm_unreachable() should be used.
Repository:
rL LLVM
http://reviews.llvm.org/D20295
More information about the llvm-commits
mailing list