2012-05-04 20:18:50 +00:00
|
|
|
//===-- llvm/lib/Target/NVPTX/NVPTXLowerAggrCopies.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 lowering of
|
|
|
|
// aggregate copies
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-13 16:26:38 +00:00
|
|
|
#ifndef LLVM_LIB_TARGET_NVPTX_NVPTXLOWERAGGRCOPIES_H
|
|
|
|
#define LLVM_LIB_TARGET_NVPTX_NVPTXLOWERAGGRCOPIES_H
|
2012-05-04 20:18:50 +00:00
|
|
|
|
|
|
|
#include "llvm/CodeGen/MachineFunctionAnalysis.h"
|
2013-01-02 11:36:10 +00:00
|
|
|
#include "llvm/IR/DataLayout.h"
|
2012-12-04 07:12:27 +00:00
|
|
|
#include "llvm/Pass.h"
|
2012-05-04 20:18:50 +00:00
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
// actual analysis class, which is a functionpass
|
|
|
|
struct NVPTXLowerAggrCopies : public FunctionPass {
|
|
|
|
static char ID;
|
|
|
|
|
|
|
|
NVPTXLowerAggrCopies() : FunctionPass(ID) {}
|
|
|
|
|
2014-04-29 07:57:44 +00:00
|
|
|
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
2014-02-25 17:30:31 +00:00
|
|
|
AU.addRequired<DataLayoutPass>();
|
2013-12-19 03:17:11 +00:00
|
|
|
AU.addPreserved("stack-protector");
|
2012-05-04 20:18:50 +00:00
|
|
|
AU.addPreserved<MachineFunctionAnalysis>();
|
|
|
|
}
|
|
|
|
|
2014-04-29 07:57:44 +00:00
|
|
|
bool runOnFunction(Function &F) override;
|
2012-05-04 20:18:50 +00:00
|
|
|
|
|
|
|
static const unsigned MaxAggrCopySize = 128;
|
|
|
|
|
2014-04-29 07:57:44 +00:00
|
|
|
const char *getPassName() const override {
|
2012-05-04 20:18:50 +00:00
|
|
|
return "Lower aggregate copies/intrinsics into loops";
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
extern FunctionPass *createLowerAggrCopies();
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|