[llvm] r318953 - Make helpers static. NFC.
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 24 06:55:41 PST 2017
Author: d0k
Date: Fri Nov 24 06:55:41 2017
New Revision: 318953
URL: http://llvm.org/viewvc/llvm-project?rev=318953&view=rev
Log:
Make helpers static. NFC.
Modified:
llvm/trunk/lib/CodeGen/MIRCanonicalizerPass.cpp
llvm/trunk/lib/Support/FileOutputBuffer.cpp
llvm/trunk/lib/Target/AMDGPU/AMDGPULibCalls.cpp
llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
Modified: llvm/trunk/lib/CodeGen/MIRCanonicalizerPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRCanonicalizerPass.cpp?rev=318953&r1=318952&r2=318953&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MIRCanonicalizerPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRCanonicalizerPass.cpp Fri Nov 24 06:55:41 2017
@@ -261,10 +261,10 @@ static std::vector<MachineInstr *> popul
return Candidates;
}
-void doCandidateWalk(std::vector<TypedVReg> &VRegs,
- std::queue <TypedVReg> &RegQueue,
- std::vector<MachineInstr *> &VisitedMIs,
- const MachineBasicBlock *MBB) {
+static void doCandidateWalk(std::vector<TypedVReg> &VRegs,
+ std::queue<TypedVReg> &RegQueue,
+ std::vector<MachineInstr *> &VisitedMIs,
+ const MachineBasicBlock *MBB) {
const MachineFunction &MF = *MBB->getParent();
const MachineRegisterInfo &MRI = MF.getRegInfo();
Modified: llvm/trunk/lib/Support/FileOutputBuffer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/FileOutputBuffer.cpp?rev=318953&r1=318952&r2=318953&view=diff
==============================================================================
--- llvm/trunk/lib/Support/FileOutputBuffer.cpp (original)
+++ llvm/trunk/lib/Support/FileOutputBuffer.cpp Fri Nov 24 06:55:41 2017
@@ -28,6 +28,7 @@
using namespace llvm;
using namespace llvm::sys;
+namespace {
// A FileOutputBuffer which creates a temporary file in the same directory
// as the final output file. The final output file is atomically replaced
// with the temporary file on commit().
@@ -94,6 +95,7 @@ private:
OwningMemoryBlock Buffer;
unsigned Mode;
};
+} // namespace
static Expected<std::unique_ptr<InMemoryBuffer>>
createInMemoryBuffer(StringRef Path, size_t Size, unsigned Mode) {
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPULibCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPULibCalls.cpp?rev=318953&r1=318952&r2=318953&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPULibCalls.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPULibCalls.cpp Fri Nov 24 06:55:41 2017
@@ -217,8 +217,8 @@ INITIALIZE_PASS(AMDGPUUseNativeCalls, "a
false, false)
template <typename IRB>
-CallInst *CreateCallEx(IRB &B, Value *Callee, Value *Arg, const Twine &Name="")
-{
+static CallInst *CreateCallEx(IRB &B, Value *Callee, Value *Arg,
+ const Twine &Name = "") {
CallInst *R = B.CreateCall(Callee, Arg, Name);
if (Function* F = dyn_cast<Function>(Callee))
R->setCallingConv(F->getCallingConv());
@@ -226,8 +226,8 @@ CallInst *CreateCallEx(IRB &B, Value *Ca
}
template <typename IRB>
-CallInst *CreateCallEx2(IRB &B, Value *Callee, Value *Arg1, Value *Arg2,
- const Twine &Name="") {
+static CallInst *CreateCallEx2(IRB &B, Value *Callee, Value *Arg1, Value *Arg2,
+ const Twine &Name = "") {
CallInst *R = B.CreateCall(Callee, {Arg1, Arg2}, Name);
if (Function* F = dyn_cast<Function>(Callee))
R->setCallingConv(F->getCallingConv());
Modified: llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp?rev=318953&r1=318952&r2=318953&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SimpleLoopUnswitch.cpp Fri Nov 24 06:55:41 2017
@@ -136,10 +136,10 @@ static bool updateIDomWithKnownCommonDom
// FIXME: Neither of these issues are a big deal and could be addressed with
// some amount of refactoring of IDFCalculator. That would allow us to share
// the core logic here (which is solving the same core problem).
-void appendDomFrontier(DomTreeNode *Node,
- SmallSetVector<BasicBlock *, 4> &Worklist,
- SmallVectorImpl<DomTreeNode *> &DomNodes,
- SmallPtrSetImpl<BasicBlock *> &DomSet) {
+static void appendDomFrontier(DomTreeNode *Node,
+ SmallSetVector<BasicBlock *, 4> &Worklist,
+ SmallVectorImpl<DomTreeNode *> &DomNodes,
+ SmallPtrSetImpl<BasicBlock *> &DomSet) {
assert(DomNodes.empty() && "Must start with no dominator nodes.");
assert(DomSet.empty() && "Must start with an empty dominator set.");
More information about the llvm-commits
mailing list