Make helper functions static. NFC.
authorBenjamin Kramer <benny.kra@googlemail.com>
Thu, 20 Aug 2015 09:57:22 +0000 (09:57 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Thu, 20 Aug 2015 09:57:22 +0000 (09:57 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@245549 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/PeepholeOptimizer.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp

index e695282b750476c6d013c044afe91112a327057f..9aaecacc15e968fc723365ad8823d182e5bdd4a6 100644 (file)
@@ -721,7 +721,7 @@ bool PeepholeOptimizer::findNextSource(unsigned Reg, unsigned SubReg,
 /// successfully traverse a PHI instruction and find suitable sources coming
 /// from its edges. By inserting a new PHI, we provide a rewritten PHI def
 /// suitable to be used in a new COPY instruction.
 /// successfully traverse a PHI instruction and find suitable sources coming
 /// from its edges. By inserting a new PHI, we provide a rewritten PHI def
 /// suitable to be used in a new COPY instruction.
-MachineInstr *
+static MachineInstr *
 insertPHI(MachineRegisterInfo *MRI, const TargetInstrInfo *TII,
           const SmallVectorImpl<TargetInstrInfo::RegSubRegPair> &SrcRegs,
           MachineInstr *OrigPHI) {
 insertPHI(MachineRegisterInfo *MRI, const TargetInstrInfo *TII,
           const SmallVectorImpl<TargetInstrInfo::RegSubRegPair> &SrcRegs,
           MachineInstr *OrigPHI) {
index f38360e62187ad8c8d05904dd49ef4978b18c4d2..6e633cc39beb173f94252c6fdabebd0c64e545d1 100644 (file)
@@ -518,7 +518,7 @@ struct EstimatedUnrollCost {
 /// \returns Optional value, holding the RolledDynamicCost and UnrolledCost. If
 /// the analysis failed (no benefits expected from the unrolling, or the loop is
 /// too big to analyze), the returned value is None.
 /// \returns Optional value, holding the RolledDynamicCost and UnrolledCost. If
 /// the analysis failed (no benefits expected from the unrolling, or the loop is
 /// too big to analyze), the returned value is None.
-Optional<EstimatedUnrollCost>
+static Optional<EstimatedUnrollCost>
 analyzeLoopUnrollCost(const Loop *L, unsigned TripCount, DominatorTree &DT,
                       ScalarEvolution &SE, const TargetTransformInfo &TTI,
                       int MaxUnrolledLoopSize) {
 analyzeLoopUnrollCost(const Loop *L, unsigned TripCount, DominatorTree &DT,
                       ScalarEvolution &SE, const TargetTransformInfo &TTI,
                       int MaxUnrolledLoopSize) {