llvm.org GIT mirror llvm / 90597d4
DAG: propagate ConsecutiveRegs flags to returns too. Arguments already have a flag to inform backends when they have been split up. The AArch64 arm64_32 ABI makes use of these on return types too, so that code emitted for armv7k can be ABI-compliant. There should be no CodeGen changes yet, just making more information available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358399 91177308-0d34-0410-b5e6-96231b3b80d8 Tim Northover 6 months ago
1 changed file(s) with 18 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
18131813
18141814 const Function *F = I.getParent()->getParent();
18151815
1816 bool NeedsRegBlock = TLI.functionArgumentNeedsConsecutiveRegisters(
1817 I.getOperand(0)->getType(), F->getCallingConv(),
1818 /*IsVarArg*/ false);
1819
18161820 ISD::NodeType ExtendKind = ISD::ANY_EXTEND;
18171821 if (F->getAttributes().hasAttribute(AttributeList::ReturnIndex,
18181822 Attribute::SExt))
18491853 Flags.setPointer();
18501854 Flags.setPointerAddrSpace(
18511855 cast(I.getOperand(0)->getType())->getAddressSpace());
1856 }
1857
1858 if (NeedsRegBlock) {
1859 Flags.setInConsecutiveRegs();
1860 if (j == NumValues - 1)
1861 Flags.setInConsecutiveRegsLast();
18521862 }
18531863
18541864 // Propagate extension type if any
88318841 // points into the callers stack frame.
88328842 CLI.IsTailCall = false;
88338843 } else {
8844 bool NeedsRegBlock = functionArgumentNeedsConsecutiveRegisters(
8845 CLI.RetTy, CLI.CallConv, CLI.IsVarArg);
88348846 for (unsigned I = 0, E = RetTys.size(); I != E; ++I) {
8847 ISD::ArgFlagsTy Flags;
8848 if (NeedsRegBlock) {
8849 Flags.setInConsecutiveRegs();
8850 if (I == RetTys.size() - 1)
8851 Flags.setInConsecutiveRegsLast();
8852 }
88358853 EVT VT = RetTys[I];
88368854 MVT RegisterVT = getRegisterTypeForCallingConv(CLI.RetTy->getContext(),
88378855 CLI.CallConv, VT);