#include "X86.h"
#include "X86InstrBuilder.h"
#include "X86InstrInfo.h"
#include "X86MachineFunctionInfo.h"
#include "X86Subtarget.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/Support/raw_ostream.h"
usingnamespacellvm;
namespace {
class X86DynAllocaExpander : public MachineFunctionPass { … };
char X86DynAllocaExpander::ID = …;
}
INITIALIZE_PASS(…)
FunctionPass *llvm::createX86DynAllocaExpander() { … }
static int64_t getDynAllocaAmount(MachineInstr *MI, MachineRegisterInfo *MRI) { … }
X86DynAllocaExpander::Lowering
X86DynAllocaExpander::getLowering(int64_t CurrentOffset,
int64_t AllocaAmount) { … }
static bool isPushPop(const MachineInstr &MI) { … }
void X86DynAllocaExpander::computeLowerings(MachineFunction &MF,
LoweringMap &Lowerings) { … }
static unsigned getSubOpcode(bool Is64Bit) { … }
void X86DynAllocaExpander::lower(MachineInstr *MI, Lowering L) { … }
bool X86DynAllocaExpander::runOnMachineFunction(MachineFunction &MF) { … }