1//===---- Delinearization.h - MultiDimensional Index Delinearization ------===// 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-exception 6// 7//===----------------------------------------------------------------------===// 8// 9// This implements an analysis pass that tries to delinearize all GEP 10// instructions in all loops using the SCEV analysis functionality. This pass is 11// only used for testing purposes: if your pass needs delinearization, please 12// use the on-demand SCEVAddRecExpr::delinearize() function. 13// 14//===----------------------------------------------------------------------===// 15 16#ifndef LLVM_ANALYSIS_DELINEARIZATION_H 17#define LLVM_ANALYSIS_DELINEARIZATION_H 18 19#include "llvm/IR/PassManager.h" 20#include "llvm/Support/raw_ostream.h" 21 22namespace llvm { 23struct DelinearizationPrinterPass 24 : public PassInfoMixin<DelinearizationPrinterPass> { 25 explicit DelinearizationPrinterPass(raw_ostream &OS); 26 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); 27 28private: 29 raw_ostream &OS; 30}; 31} // namespace llvm 32 33#endif // LLVM_ANALYSIS_DELINEARIZATION_H 34