Skip to content
Snippets Groups Projects
Commit 881903ec authored by Prakalp Srivastava's avatar Prakalp Srivastava
Browse files

Added support to preserve DFG info across NVPTX and X86 backend passes

parent b9461eea
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,7 @@ namespace {
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<BuildDFG>();
AU.addPreserved<BuildDFG>();
}
......@@ -648,7 +649,6 @@ namespace {
// function and add it to the DFNode GenFunc.
Function *F_nvptx = N->getGenFunc();
if(F_nvptx == NULL) {
errs() << "GenFunc is NULL\n";
// Clone the function
ValueToValueMapTy VMap;
F_nvptx = CloneFunction(F, VMap, true);
......@@ -661,8 +661,8 @@ namespace {
//Add generated function info to DFNode
N->setGenFunc(F_nvptx, DFNode::PTX);
} {
errs() << "GenFunc is not NULL\n" << *F_nvptx;
} else {
errs() << "WARNING: Visiting a node for which code already generated!\n";
}
transformFunctionToVoid(F_nvptx);
......
......@@ -43,6 +43,7 @@ public:
void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<BuildDFG>();
AU.addPreserved<BuildDFG>();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment