OpenASIP  2.0
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
llvm::TCETTIImpl Class Reference

#include <TCETargetTransformInfo.hh>

Inheritance diagram for llvm::TCETTIImpl:
Inheritance graph
Collaboration diagram for llvm::TCETTIImpl:
Collaboration graph

Public Member Functions

 TCETTIImpl (const TCETargetMachine *TM, const Function &F)
 
bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE, AssumptionCache &AC, TargetLibraryInfo *LibInfo, HardwareLoopInfo &HWLoopInfo)
 

Private Types

typedef BasicTTIImplBase< TCETTIImplBaseT
 
typedef TargetTransformInfo TTI
 

Private Member Functions

const TCESubtargetgetST () const
 
const TCETargetLoweringgetTLI () const
 

Private Attributes

friend BaseT
 
const TCESubtargetST
 
const TCETargetLoweringTLI
 

Detailed Description

Definition at line 42 of file TCETargetTransformInfo.hh.

Member Typedef Documentation

◆ BaseT

typedef BasicTTIImplBase<TCETTIImpl> llvm::TCETTIImpl::BaseT
private

Definition at line 43 of file TCETargetTransformInfo.hh.

◆ TTI

typedef TargetTransformInfo llvm::TCETTIImpl::TTI
private

Definition at line 44 of file TCETargetTransformInfo.hh.

Constructor & Destructor Documentation

◆ TCETTIImpl()

llvm::TCETTIImpl::TCETTIImpl ( const TCETargetMachine TM,
const Function &  F 
)
inlineexplicit

Definition at line 60 of file TCETargetTransformInfo.hh.

61  : BaseT(TM, F.getParent()->getDataLayout()),
62  ST(TM->getSubtargetImpl()),
63  TLI(static_cast<const TCETargetLowering *>(
64  ST->getTargetLowering())) {}

Member Function Documentation

◆ getST()

const TCESubtarget* llvm::TCETTIImpl::getST ( ) const
inlineprivate

Definition at line 51 of file TCETargetTransformInfo.hh.

51  {
52  return ST;
53  }

References ST.

◆ getTLI()

const TCETargetLowering* llvm::TCETTIImpl::getTLI ( ) const
inlineprivate

Definition at line 55 of file TCETargetTransformInfo.hh.

55  {
56  return TLI;
57  }

References TLI.

◆ isHardwareLoopProfitable()

bool TCETTIImpl::isHardwareLoopProfitable ( Loop *  L,
ScalarEvolution &  SE,
AssumptionCache &  AC,
TargetLibraryInfo *  LibInfo,
HardwareLoopInfo &  HWLoopInfo 
)

Definition at line 43 of file TCETargetTransformInfo.cc.

45  {
46  // Check TCE flag for hwloop
49  if (options == NULL || options->disableHWLoops()) return false;
50 
51  // We should do hwloop only for single BB loop
52  if (L->getNumBlocks() != 1) {
53  LLVM_DEBUG(
54  dbgs() << "HWLoops: Loop has " << L->getNumBlocks()
55  << " BB. Not converting to hwloop: " << L->getName()
56  << "\n");
57  return false;
58  }
59 
60  // Set counter type and loop decrement value
61  LLVMContext &C = L->getHeader()->getContext();
62  HWLoopInfo.CountType = Type::getInt32Ty(C);
63  HWLoopInfo.LoopDecrement = ConstantInt::get(HWLoopInfo.CountType, 1);
64  HWLoopInfo.IsNestingLegal = false;
65  return true;
66 }

References Application::cmdLineOptions(), and options.

Here is the call graph for this function:

Member Data Documentation

◆ BaseT

friend llvm::TCETTIImpl::BaseT
private

Definition at line 45 of file TCETargetTransformInfo.hh.

◆ ST

const TCESubtarget* llvm::TCETTIImpl::ST
private

Definition at line 47 of file TCETargetTransformInfo.hh.

Referenced by getST().

◆ TLI

const TCETargetLowering* llvm::TCETTIImpl::TLI
private

Definition at line 48 of file TCETargetTransformInfo.hh.

Referenced by getTLI().


The documentation for this class was generated from the following files:
llvm::TCETTIImpl::TLI
const TCETargetLowering * TLI
Definition: TCETargetTransformInfo.hh:48
llvm::TCETTIImpl::BaseT
BasicTTIImplBase< TCETTIImpl > BaseT
Definition: TCETargetTransformInfo.hh:43
llvm::TCETTIImpl::ST
const TCESubtarget * ST
Definition: TCETargetTransformInfo.hh:47
Application::cmdLineOptions
static CmdLineOptions * cmdLineOptions()
Definition: Application.cc:397
LLVMTCECmdLineOptions
Definition: LLVMTCECmdLineOptions.hh:48
llvm::TCESubtarget::getTargetLowering
virtual const TargetLowering * getTargetLowering() const override
Definition: TCESubtarget.cc:103
options
static MachInfoCmdLineOptions options
Definition: MachInfo.cc:46