#include "ARM.h"
#include "ARMBaseInstrInfo.h"
#include "ARMBaseRegisterInfo.h"
#include "ARMSubtarget.h"
#include "Utils/ARMBaseInfo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineInstrBundleIterator.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/ReachingDefAnalysis.h"
#include "llvm/CodeGen/Register.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/IR/DebugLoc.h"
#include "llvm/InitializePasses.h"
#include "llvm/MC/MCInstrDesc.h"
#include "llvm/Pass.h"
#include "llvm/PassRegistry.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <assert.h>
#include <stdint.h>
usingnamespacellvm;
#define DEBUG_TYPE …
namespace {
class ARMFixCortexA57AES1742098 : public MachineFunctionPass { … };
char ARMFixCortexA57AES1742098::ID = …;
}
INITIALIZE_PASS_BEGIN(ARMFixCortexA57AES1742098, DEBUG_TYPE,
"ARM fix for Cortex-A57 AES Erratum 1742098", false,
false)
INITIALIZE_PASS_DEPENDENCY(ReachingDefAnalysis);
INITIALIZE_PASS_END(ARMFixCortexA57AES1742098, DEBUG_TYPE,
"ARM fix for Cortex-A57 AES Erratum 1742098", false, false)
bool ARMFixCortexA57AES1742098::isFirstAESPairInstr(MachineInstr &MI) { … }
bool ARMFixCortexA57AES1742098::isSafeAESInput(MachineInstr &MI) { … }
bool ARMFixCortexA57AES1742098::runOnMachineFunction(MachineFunction &F) { … }
void ARMFixCortexA57AES1742098::analyzeMF(
MachineFunction &MF, ReachingDefAnalysis &RDA,
const ARMBaseRegisterInfo *TRI,
SmallVectorImpl<AESFixupLocation> &FixupLocsForFn) const { … }
void ARMFixCortexA57AES1742098::insertAESFixup(
AESFixupLocation &FixupLoc, const ARMBaseInstrInfo *TII,
const ARMBaseRegisterInfo *TRI) const { … }
FunctionPass *llvm::createARMFixCortexA57AES1742098Pass() { … }