mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-29 13:29:28 +00:00
This changes the MachineFrameInfo API to use the new SSPLayoutKind information produced by the StackProtector pass (instead of a boolean flag) and updates a few pass dependencies (to preserve the SSP analysis). The stack layout follows the same approach used prior to this change - i.e., only LargeArray stack objects will be placed near the canary and everything else will be laid out normally. After this change, structures containing large arrays will also be placed near the canary - a case previously missed by the old implementation. Out of tree targets will need to update their usage of MachineFrameInfo::CreateStackObject to remove the MayNeedSP argument. The next patch will implement the rules for sspstrong and sspreq. The end goal is to support ssp-strong stack layout rules. WIP. Differential Revision: http://llvm-reviews.chandlerc.com/D2158 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197653 91177308-0d34-0410-b5e6-96231b3b80d8
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
//===-- llvm/lib/Target/NVPTX/NVPTXSplitBBatBar.h ---------------*- C++ -*-===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file contains the declaration of the NVIDIA specific declarations
|
|
// for splitting basic blocks at barrier instructions.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef NVPTX_SPLIT_BB_AT_BAR_H
|
|
#define NVPTX_SPLIT_BB_AT_BAR_H
|
|
|
|
#include "llvm/CodeGen/MachineFunctionAnalysis.h"
|
|
#include "llvm/Pass.h"
|
|
|
|
namespace llvm {
|
|
|
|
// actual analysis class, which is a functionpass
|
|
struct NVPTXSplitBBatBar : public FunctionPass {
|
|
static char ID;
|
|
|
|
NVPTXSplitBBatBar() : FunctionPass(ID) {}
|
|
void getAnalysisUsage(AnalysisUsage &AU) const {
|
|
AU.addPreserved("stack-protector");
|
|
AU.addPreserved<MachineFunctionAnalysis>();
|
|
}
|
|
virtual bool runOnFunction(Function &F);
|
|
|
|
virtual const char *getPassName() const {
|
|
return "Split basic blocks at barrier";
|
|
}
|
|
};
|
|
|
|
extern FunctionPass *createSplitBBatBarPass();
|
|
}
|
|
|
|
#endif //NVPTX_SPLIT_BB_AT_BAR_H
|