[llvm] c6f08b1 - Hide some internal symbols. NFC.

Benjamin Kramer via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 31 08:28:13 PDT 2020


Author: Benjamin Kramer
Date: 2020-07-31T17:28:02+02:00
New Revision: c6f08b14d4895928232fac38d266bb53aafa6b29

URL: https://github.com/llvm/llvm-project/commit/c6f08b14d4895928232fac38d266bb53aafa6b29
DIFF: https://github.com/llvm/llvm-project/commit/c6f08b14d4895928232fac38d266bb53aafa6b29.diff

LOG: Hide some internal symbols. NFC.

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
    llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
    llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
index 58f251fec5e98..372c5154acef0 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
@@ -723,10 +723,10 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
 ///
 /// Note: This only supports non-TFE/LWE image intrinsic calls; those have
 ///       struct returns.
-Value *simplifyAMDGCNMemoryIntrinsicDemanded(InstCombiner &IC,
-                                             IntrinsicInst &II,
-                                             APInt DemandedElts,
-                                             int DMaskIdx = -1) {
+static Value *simplifyAMDGCNMemoryIntrinsicDemanded(InstCombiner &IC,
+                                                    IntrinsicInst &II,
+                                                    APInt DemandedElts,
+                                                    int DMaskIdx = -1) {
 
   auto *IIVTy = cast<VectorType>(II.getType());
   unsigned VWidth = IIVTy->getNumElements();

diff  --git a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
index 2746d4d456e4f..d037fe7537d20 100644
--- a/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
+++ b/llvm/lib/Target/ARM/MVEGatherScatterLowering.cpp
@@ -172,7 +172,7 @@ bool MVEGatherScatterLowering::isLegalTypeAndAlignment(unsigned NumElements,
   return false;
 }
 
-bool checkOffsetSize(Value *Offsets, unsigned TargetElemCount) {
+static bool checkOffsetSize(Value *Offsets, unsigned TargetElemCount) {
   // Offsets that are not of type <N x i32> are sign extended by the
   // getelementptr instruction, and MVE gathers/scatters treat the offset as
   // unsigned. Thus, if the element size is smaller than 32, we can only allow
@@ -1030,9 +1030,8 @@ bool MVEGatherScatterLowering::optimiseOffsets(Value *Offsets, BasicBlock *BB,
   return true;
 }
 
-Value *CheckAndCreateOffsetAdd(Value *X, Value *Y, Value *GEP,
-                               IRBuilder<> &Builder) {
-
+static Value *CheckAndCreateOffsetAdd(Value *X, Value *Y, Value *GEP,
+                                      IRBuilder<> &Builder) {
   // Splat the non-vector value to a vector of the given type - if the value is
   // a constant (and its value isn't too big), we can even use this opportunity
   // to scale it to the size of the vector elements

diff  --git a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
index 0af71e9b72b83..523e7b19ecb1d 100644
--- a/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp
@@ -1859,6 +1859,7 @@ void DFSanVisitor::visitPHINode(PHINode &PN) {
   DFSF.setShadow(&PN, ShadowPN);
 }
 
+namespace {
 class DataFlowSanitizerLegacyPass : public ModulePass {
 private:
   std::vector<std::string> ABIListFiles;
@@ -1874,6 +1875,7 @@ class DataFlowSanitizerLegacyPass : public ModulePass {
     return DataFlowSanitizer(ABIListFiles).runImpl(M);
   }
 };
+} // namespace
 
 char DataFlowSanitizerLegacyPass::ID;
 


        


More information about the llvm-commits mailing list