Polly 22.0.0git
ForwardOpTree.cpp File Reference
#include "polly/ForwardOpTree.h"
#include "polly/Options.h"
#include "polly/ScopBuilder.h"
#include "polly/ScopInfo.h"
#include "polly/Support/GICHelper.h"
#include "polly/Support/ISLOStream.h"
#include "polly/Support/ISLTools.h"
#include "polly/Support/VirtualInstruction.h"
#include "polly/ZoneAlgo.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "isl/ctx.h"
#include "isl/isl-noexceptions.h"
#include <cassert>
#include <memory>
#include "polly/Support/PollyDebug.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "polly-optree"

Functions

static cl::opt< bool > AnalyzeKnown ("polly-optree-analyze-known", cl::desc("Analyze array contents for load forwarding"), cl::cat(PollyCategory), cl::init(true), cl::Hidden)
static cl::opt< bool > NormalizePHIs ("polly-optree-normalize-phi", cl::desc("Replace PHIs by their incoming values"), cl::cat(PollyCategory), cl::init(false), cl::Hidden)
static cl::opt< unsigned > MaxOps ("polly-optree-max-ops", cl::desc("Maximum number of ISL operations to invest for known " "analysis; 0=no limit"), cl::init(1000000), cl::cat(PollyCategory), cl::Hidden)
static cl::opt< bool > PollyPrintOptree ("polly-print-optree", cl::desc("Polly - Print forward operand tree result"), cl::cat(PollyCategory))
 STATISTIC (KnownAnalyzed, "Number of successfully analyzed SCoPs")
 STATISTIC (KnownOutOfQuota, "Analyses aborted because max_operations was reached")
 STATISTIC (TotalInstructionsCopied, "Number of copied instructions")
 STATISTIC (TotalKnownLoadsForwarded, "Number of forwarded loads because their value was known")
 STATISTIC (TotalReloads, "Number of reloaded values")
 STATISTIC (TotalReadOnlyCopied, "Number of copied read-only accesses")
 STATISTIC (TotalForwardedTrees, "Number of forwarded operand trees")
 STATISTIC (TotalModifiedStmts, "Number of statements with at least one forwarded tree")
 STATISTIC (ScopsModified, "Number of SCoPs with at least one forwarded tree")
 STATISTIC (NumValueWrites, "Number of scalar value writes after OpTree")
 STATISTIC (NumValueWritesInLoops, "Number of scalar value writes nested in affine loops after OpTree")
 STATISTIC (NumPHIWrites, "Number of scalar phi writes after OpTree")
 STATISTIC (NumPHIWritesInLoops, "Number of scalar phi writes nested in affine loops after OpTree")
 STATISTIC (NumSingletonWrites, "Number of singleton writes after OpTree")
 STATISTIC (NumSingletonWritesInLoops, "Number of singleton writes nested in affine loops after OpTree")

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "polly-optree"

Definition at line 42 of file ForwardOpTree.cpp.

Function Documentation

◆ AnalyzeKnown()

cl::opt< bool > AnalyzeKnown ( "polly-optree-analyze-known" ,
cl::desc("Analyze array contents for load forwarding") ,
cl::cat(PollyCategory) ,
cl::init(true) ,
cl::Hidden  )
static

References PollyCategory.

◆ MaxOps()

cl::opt< unsigned > MaxOps ( "polly-optree-max-ops" ,
cl::desc("Maximum number of ISL operations to invest for known " "analysis; 0=no limit") ,
cl::init(1000000) ,
cl::cat(PollyCategory) ,
cl::Hidden  )
static

References PollyCategory.

◆ NormalizePHIs()

cl::opt< bool > NormalizePHIs ( "polly-optree-normalize-phi" ,
cl::desc("Replace PHIs by their incoming values") ,
cl::cat(PollyCategory) ,
cl::init(false) ,
cl::Hidden  )
static

References PollyCategory.

◆ PollyPrintOptree()

cl::opt< bool > PollyPrintOptree ( "polly-print-optree" ,
cl::desc("Polly - Print forward operand tree result") ,
cl::cat(PollyCategory)  )
static

References PollyCategory.

Referenced by polly::runForwardOpTree().

◆ STATISTIC() [1/15]

STATISTIC ( KnownAnalyzed ,
"Number of successfully analyzed SCoPs"  )

◆ STATISTIC() [2/15]

STATISTIC ( KnownOutOfQuota ,
"Analyses aborted because max_operations was reached"  )

◆ STATISTIC() [3/15]

STATISTIC ( NumPHIWrites ,
"Number of scalar phi writes after OpTree"  )

◆ STATISTIC() [4/15]

STATISTIC ( NumPHIWritesInLoops ,
"Number of scalar phi writes nested in affine loops after OpTree"  )

◆ STATISTIC() [5/15]

STATISTIC ( NumSingletonWrites ,
"Number of singleton writes after OpTree"  )

◆ STATISTIC() [6/15]

STATISTIC ( NumSingletonWritesInLoops ,
"Number of singleton writes nested in affine loops after OpTree"  )

◆ STATISTIC() [7/15]

STATISTIC ( NumValueWrites ,
"Number of scalar value writes after OpTree"  )

◆ STATISTIC() [8/15]

STATISTIC ( NumValueWritesInLoops ,
"Number of scalar value writes nested in affine loops after OpTree"  )

◆ STATISTIC() [9/15]

STATISTIC ( ScopsModified ,
"Number of SCoPs with at least one forwarded tree"  )

◆ STATISTIC() [10/15]

STATISTIC ( TotalForwardedTrees ,
"Number of forwarded operand trees"  )

◆ STATISTIC() [11/15]

STATISTIC ( TotalInstructionsCopied ,
"Number of copied instructions"  )

◆ STATISTIC() [12/15]

STATISTIC ( TotalKnownLoadsForwarded ,
"Number of forwarded loads because their value was known"  )

◆ STATISTIC() [13/15]

STATISTIC ( TotalModifiedStmts ,
"Number of statements with at least one forwarded tree"  )

◆ STATISTIC() [14/15]

STATISTIC ( TotalReadOnlyCopied ,
"Number of copied read-only accesses"  )

◆ STATISTIC() [15/15]

STATISTIC ( TotalReloads ,
"Number of reloaded values"  )