Update prebuilt Clang to match Android kernel.
Bug: 132428451
Change-Id: I8f6e2cb23f381fc0c02ddea99b867e58e925e5be
diff --git a/linux-x64/clang/include/llvm/CodeGen/MachineFrameInfo.h b/linux-x64/clang/include/llvm/CodeGen/MachineFrameInfo.h
index 02b2f1b..402a2dc 100644
--- a/linux-x64/clang/include/llvm/CodeGen/MachineFrameInfo.h
+++ b/linux-x64/clang/include/llvm/CodeGen/MachineFrameInfo.h
@@ -1,9 +1,8 @@
//===-- CodeGen/MachineFrameInfo.h - Abstract Stack Frame Rep. --*- C++ -*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
@@ -28,9 +27,14 @@
/// The CalleeSavedInfo class tracks the information need to locate where a
/// callee saved register is in the current frame.
+/// Callee saved reg can also be saved to a different register rather than
+/// on the stack by setting DstReg instead of FrameIdx.
class CalleeSavedInfo {
unsigned Reg;
- int FrameIdx;
+ union {
+ int FrameIdx;
+ unsigned DstReg;
+ };
/// Flag indicating whether the register is actually restored in the epilog.
/// In most cases, if a register is saved, it is also restored. There are
/// some situations, though, when this is not the case. For example, the
@@ -44,17 +48,29 @@
/// by implicit uses on the return instructions, however, the required
/// changes in the ARM backend would be quite extensive.
bool Restored;
+ /// Flag indicating whether the register is spilled to stack or another
+ /// register.
+ bool SpilledToReg;
public:
explicit CalleeSavedInfo(unsigned R, int FI = 0)
- : Reg(R), FrameIdx(FI), Restored(true) {}
+ : Reg(R), FrameIdx(FI), Restored(true), SpilledToReg(false) {}
// Accessors.
unsigned getReg() const { return Reg; }
int getFrameIdx() const { return FrameIdx; }
- void setFrameIdx(int FI) { FrameIdx = FI; }
+ unsigned getDstReg() const { return DstReg; }
+ void setFrameIdx(int FI) {
+ FrameIdx = FI;
+ SpilledToReg = false;
+ }
+ void setDstReg(unsigned SpillReg) {
+ DstReg = SpillReg;
+ SpilledToReg = true;
+ }
bool isRestored() const { return Restored; }
void setRestored(bool R) { Restored = R; }
+ bool isSpilledToReg() const { return SpilledToReg; }
};
/// The MachineFrameInfo class represents an abstract stack frame until
@@ -271,9 +287,9 @@
unsigned CVBytesOfCalleeSavedRegisters = 0;
/// The prolog/epilog code inserter fills in this vector with each
- /// callee saved register saved in the frame. Beyond its use by the prolog/
- /// epilog code inserter, this data used for debug info and exception
- /// handling.
+ /// callee saved register saved in either the frame or a different
+ /// register. Beyond its use by the prolog/ epilog code inserter,
+ /// this data is used for debug info and exception handling.
std::vector<CalleeSavedInfo> CSInfo;
/// Has CSInfo been set yet?