forked from OSchip/llvm-project
Give helpers internal linkage. NFC.
This commit is contained in:
parent
64249f177e
commit
1d42764df7
|
@ -82,6 +82,7 @@ static unsigned getRegisterSize(const TargetRegisterInfo &TRI, Register Reg) {
|
||||||
return TRI.getSpillSize(*RC);
|
return TRI.getSpillSize(*RC);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
// Cache used frame indexes during statepoint re-write to re-use them in
|
// Cache used frame indexes during statepoint re-write to re-use them in
|
||||||
// processing next statepoint instruction.
|
// processing next statepoint instruction.
|
||||||
// Two strategies. One is to preserve the size of spill slot while another one
|
// Two strategies. One is to preserve the size of spill slot while another one
|
||||||
|
@ -282,6 +283,7 @@ public:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} // namespace
|
||||||
|
|
||||||
bool FixupStatepointCallerSaved::runOnMachineFunction(MachineFunction &MF) {
|
bool FixupStatepointCallerSaved::runOnMachineFunction(MachineFunction &MF) {
|
||||||
if (skipFunction(MF.getFunction()))
|
if (skipFunction(MF.getFunction()))
|
||||||
|
|
|
@ -78,7 +78,7 @@ void LostDebugLocObserver::createdInstr(MachineInstr &MI) {
|
||||||
PotentialMIsForDebugLocs.insert(&MI);
|
PotentialMIsForDebugLocs.insert(&MI);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool irTranslatorNeverAddsLocations(unsigned Opcode) {
|
static bool irTranslatorNeverAddsLocations(unsigned Opcode) {
|
||||||
switch (Opcode) {
|
switch (Opcode) {
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -515,7 +515,7 @@ void MVEGatherScatterLowering::pushOutMul(PHINode *&Phi,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return true if the given intrinsic is a gather or scatter
|
// Return true if the given intrinsic is a gather or scatter
|
||||||
bool isGatherScatter(IntrinsicInst *IntInst) {
|
static bool isGatherScatter(IntrinsicInst *IntInst) {
|
||||||
if (IntInst == nullptr)
|
if (IntInst == nullptr)
|
||||||
return false;
|
return false;
|
||||||
unsigned IntrinsicID = IntInst->getIntrinsicID();
|
unsigned IntrinsicID = IntInst->getIntrinsicID();
|
||||||
|
@ -537,7 +537,7 @@ bool isGatherScatter(IntrinsicInst *IntInst) {
|
||||||
|
|
||||||
// Check whether all usages of this instruction are as offsets of
|
// Check whether all usages of this instruction are as offsets of
|
||||||
// gathers/scatters or simple arithmetics only used by gathers/scatters
|
// gathers/scatters or simple arithmetics only used by gathers/scatters
|
||||||
bool hasAllGatScatUsers(Instruction *I) {
|
static bool hasAllGatScatUsers(Instruction *I) {
|
||||||
if (I->hasNUses(0)) {
|
if (I->hasNUses(0)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6016,6 +6016,7 @@ std::string AAMemoryLocation::getMemoryLocationsAsStr(
|
||||||
return S;
|
return S;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
struct AAMemoryLocationImpl : public AAMemoryLocation {
|
struct AAMemoryLocationImpl : public AAMemoryLocation {
|
||||||
|
|
||||||
AAMemoryLocationImpl(const IRPosition &IRP, Attributor &A)
|
AAMemoryLocationImpl(const IRPosition &IRP, Attributor &A)
|
||||||
|
@ -6978,6 +6979,7 @@ struct AAValueConstantRangeCallSiteArgument : AAValueConstantRangeFloating {
|
||||||
STATS_DECLTRACK_CSARG_ATTR(value_range)
|
STATS_DECLTRACK_CSARG_ATTR(value_range)
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
} // namespace
|
||||||
|
|
||||||
const char AAReturnedValues::ID = 0;
|
const char AAReturnedValues::ID = 0;
|
||||||
const char AANoUnwind::ID = 0;
|
const char AANoUnwind::ID = 0;
|
||||||
|
|
|
@ -241,8 +241,8 @@ template <> struct GraphTraits<Loop> : LoopBodyTraits {};
|
||||||
} // namespace llvm
|
} // namespace llvm
|
||||||
|
|
||||||
// Overloaded wrappers to go with the function template below.
|
// Overloaded wrappers to go with the function template below.
|
||||||
BasicBlock *unwrapBlock(BasicBlock *B) { return B; }
|
static BasicBlock *unwrapBlock(BasicBlock *B) { return B; }
|
||||||
BasicBlock *unwrapBlock(LoopBodyTraits::NodeRef &N) { return N.second; }
|
static BasicBlock *unwrapBlock(LoopBodyTraits::NodeRef &N) { return N.second; }
|
||||||
|
|
||||||
static void createNaturalLoop(LoopInfo &LI, DominatorTree &DT, Function *F,
|
static void createNaturalLoop(LoopInfo &LI, DominatorTree &DT, Function *F,
|
||||||
SetVector<BasicBlock *> &Blocks,
|
SetVector<BasicBlock *> &Blocks,
|
||||||
|
|
|
@ -199,10 +199,12 @@ static ParseResult parseGenericOp(OpAsmParser &parser, OperationState &result) {
|
||||||
parser.getCurrentLocation(), result.operands);
|
parser.getCurrentLocation(), result.operands);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace {
|
||||||
template <typename GenericOpType>
|
template <typename GenericOpType>
|
||||||
struct BlockArgsVerifier {
|
struct BlockArgsVerifier {
|
||||||
static LogicalResult verify(GenericOpType op, Block &block);
|
static LogicalResult verify(GenericOpType op, Block &block);
|
||||||
};
|
};
|
||||||
|
} // namespace
|
||||||
|
|
||||||
template <typename GenericOpType>
|
template <typename GenericOpType>
|
||||||
LogicalResult BlockArgsVerifier<GenericOpType>::verify(GenericOpType op,
|
LogicalResult BlockArgsVerifier<GenericOpType>::verify(GenericOpType op,
|
||||||
|
@ -492,7 +494,8 @@ void mlir::linalg::ReshapeOp::build(
|
||||||
// Common verifier for reshape-like types. Fills `expandedType` and
|
// Common verifier for reshape-like types. Fills `expandedType` and
|
||||||
// `collapsedType` with the proper `src` or `result` type.
|
// `collapsedType` with the proper `src` or `result` type.
|
||||||
template <typename Op, typename T>
|
template <typename Op, typename T>
|
||||||
LogicalResult verifyReshapeLikeTypes(Op op, T &expandedType, T &collapsedType) {
|
static LogicalResult verifyReshapeLikeTypes(Op op, T &expandedType,
|
||||||
|
T &collapsedType) {
|
||||||
expandedType = op.getSrcType();
|
expandedType = op.getSrcType();
|
||||||
collapsedType = op.getResultType();
|
collapsedType = op.getResultType();
|
||||||
unsigned expandedRank = expandedType.getRank();
|
unsigned expandedRank = expandedType.getRank();
|
||||||
|
|
Loading…
Reference in New Issue