|
@@ -693,6 +693,14 @@ void PMTopLevelManager::schedulePass(Pass *P) {
|
|
|
dbgs(), std::string("*** IR Dump After ") + P->getPassName() + " ***");
|
|
|
PP->assignPassManager(activeStack, getTopLevelPassManagerType());
|
|
|
}
|
|
|
+
|
|
|
+ // HLSL Change - begin
|
|
|
+ if (PI && !PI->isAnalysis() && this->HLSLPrintAfterAll) {
|
|
|
+ Pass *PP = P->createPrinterPass(
|
|
|
+ errs(), std::string("*** IR Dump After ") + P->getPassName() + " (" + PI->getPassArgument() + ") ***");
|
|
|
+ PP->assignPassManager(activeStack, getTopLevelPassManagerType());
|
|
|
+ }
|
|
|
+ // HLSL Change - end
|
|
|
}
|
|
|
|
|
|
/// Find the pass that implements Analysis AID. Search immutable
|
|
@@ -1401,6 +1409,7 @@ FunctionPassManager::~FunctionPassManager() {
|
|
|
|
|
|
void FunctionPassManager::add(Pass *P) {
|
|
|
// HLSL Change Starts
|
|
|
+ FPM->HLSLPrintAfterAll = this->HLSLPrintAfterAll;
|
|
|
std::unique_ptr<Pass> PPtr(P); // take ownership of P, even on failure paths
|
|
|
if (TrackPassOS) {
|
|
|
P->dumpConfig(*TrackPassOS);
|
|
@@ -1749,6 +1758,7 @@ PassManager::~PassManager() {
|
|
|
|
|
|
void PassManager::add(Pass *P) {
|
|
|
// HLSL Change Starts
|
|
|
+ PM->HLSLPrintAfterAll = this->HLSLPrintAfterAll;
|
|
|
std::unique_ptr<Pass> PPtr(P); // take ownership of P, even on failure paths
|
|
|
if (TrackPassOS) {
|
|
|
P->dumpConfig(*TrackPassOS);
|