23 lines · cpp
1//===------ PollyFunctionPass.cpp - Polly function pass ------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#include "polly/Pass/PollyFunctionPass.h"10 11using namespace llvm;12using namespace polly;13 14PreservedAnalyses PollyFunctionPass::run(llvm::Function &F,15 llvm::FunctionAnalysisManager &FAM) {16 bool ModifiedIR = runPollyPass(F, FAM, Opts);17 18 // Be conservative about preserved analyses.19 // FIXME: May also need to invalidate/update Module/CGSCC passes, but cannot20 // reach them within a FunctionPassManager.21 return ModifiedIR ? PreservedAnalyses::none() : PreservedAnalyses::all();22}23