// so that a debugger-user sees the stop before the panic, and can examine the value.
case OpAddr, OpLocalAddr, OpOffPtr, OpStructSelect, OpPhi, OpITab, OpIData,
OpIMake, OpStringMake, OpSliceMake, OpStructMake0, OpStructMake1, OpStructMake2, OpStructMake3, OpStructMake4,
- OpConstBool, OpConst8, OpConst16, OpConst32, OpConst64, OpConst32F, OpConst64F, OpSB, OpSP:
+ OpConstBool, OpConst8, OpConst16, OpConst32, OpConst64, OpConst32F, OpConst64F, OpSB, OpSP,
+ OpArgIntReg, OpArgFloatReg:
return true
}
return false
// statement boundary.
func notStmtBoundary(op Op) bool {
switch op {
- case OpCopy, OpPhi, OpVarKill, OpVarDef, OpVarLive, OpUnknown, OpFwdRef, OpArg:
+ case OpCopy, OpPhi, OpVarKill, OpVarDef, OpVarLive, OpUnknown, OpFwdRef, OpArg, OpArgIntReg, OpArgFloatReg:
return true
}
return false
// slot. This can only happen with aggregate-typed arguments that are SSA-able
// and not address-taken (for non-SSA-able or address-taken arguments we always
// spill upfront).
+ // Note: spilling is unnecessary in the -N/no-optimize case, since all values
+ // will be considered non-SSAable and spilled up front.
// TODO(register args) Make liveness more fine-grained to that partial spilling is okay.
- if f.OwnAux.ABIInfo().InRegistersUsed() != 0 {
+ if f.OwnAux.ABIInfo().InRegistersUsed() != 0 && base.Flag.N == 0 {
// First, see if it is already spilled before it may be live. Look for a spill
// in the entry block up to the first safepoint.
type nameOff struct {