[llvm] r279890 - [AArch64][CallLowering] Do not assert for not implemented part.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 17:18:28 PDT 2016
Author: qcolombet
Date: Fri Aug 26 19:18:28 2016
New Revision: 279890
URL: http://llvm.org/viewvc/llvm-project?rev=279890&view=rev
Log:
[AArch64][CallLowering] Do not assert for not implemented part.
When doing the ABI lowering, report a failure to the caller instead of
asserting. This gives a chance for the caller to recover.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64CallLowering.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64CallLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64CallLowering.cpp?rev=279890&r1=279889&r2=279890&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64CallLowering.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64CallLowering.cpp Fri Aug 26 19:18:28 2016
@@ -70,19 +70,22 @@ bool AArch64CallLowering::handleAssignme
for (unsigned i = 0; i != NumArgs; ++i, ++CurVT) {
bool Res = AssignFn(i, *CurVT, *CurVT, CCValAssign::Full, ISD::ArgFlagsTy(),
CCInfo);
- assert(!Res && "Call operand has unhandled type");
- (void)Res;
+ if (Res)
+ return false;
}
assert(ArgLocs.size() == ArgTypes.size() &&
"We have a different number of location and args?!");
for (unsigned i = 0, e = ArgLocs.size(); i != e; ++i) {
CCValAssign &VA = ArgLocs[i];
- assert(VA.isRegLoc() && "Not yet implemented");
+ // FIXME: Support non-register argument.
+ if (!VA.isRegLoc())
+ return false;
switch (VA.getLocInfo()) {
default:
- llvm_unreachable("Unknown loc info!");
+ // Unknown loc info!
+ return false;
case CCValAssign::Full:
break;
case CCValAssign::BCvt:
@@ -94,8 +97,8 @@ bool AArch64CallLowering::handleAssignme
case CCValAssign::SExt:
case CCValAssign::ZExt:
// Zero/Sign extend the register.
- assert(0 && "Not yet implemented");
- break;
+ // FIXME: Not yet implemented
+ return false;
}
// Everything checks out, tell the caller where we've decided this
More information about the llvm-commits
mailing list