From ce0d5846fb66c45a73e1d8899417dfa496e9b68b Mon Sep 17 00:00:00 2001 From: Yi Lin Date: Fri, 29 Nov 2024 12:02:55 +1300 Subject: [PATCH] Rename cleanUpGCPreserve. Remove unnecessary include of gc_interface.h --- src/llvm-gc-interface-passes.h | 3 +-- src/llvm-late-gc-lowering-mmtk.cpp | 2 +- src/llvm-late-gc-lowering-stock.cpp | 2 +- src/llvm-late-gc-lowering.cpp | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/llvm-gc-interface-passes.h b/src/llvm-gc-interface-passes.h index b58f12fe255c6..fb7fbb729fb47 100644 --- a/src/llvm-gc-interface-passes.h +++ b/src/llvm-gc-interface-passes.h @@ -43,7 +43,6 @@ #include "julia.h" #include "julia_internal.h" #include "julia_assert.h" -#include "gc-interface.h" #include "llvm-pass-helpers.h" #include #include @@ -361,7 +360,7 @@ struct LateLowerGCFrame: private JuliaPassContext { void PlaceGCFrameStores(State &S, unsigned MinColorRoot, ArrayRef Colors, Value *GCFrame); void PlaceRootsAndUpdateCalls(SmallVectorImpl &Colors, State &S, std::map>); void CleanupWriteBarriers(Function &F, State *S, const SmallVector &WriteBarriers, bool *CFGModified); - void cleanupGCPreserve(Function &F, CallInst *CI, Value *callee, Type *T_size); + void CleanupGCPreserve(Function &F, CallInst *CI, Value *callee, Type *T_size); bool CleanupIR(Function &F, State *S, bool *CFGModified); void NoteUseChain(State &S, BBState &BBS, User *TheUser); SmallVector GetPHIRefinements(PHINode *phi, State &S); diff --git a/src/llvm-late-gc-lowering-mmtk.cpp b/src/llvm-late-gc-lowering-mmtk.cpp index 057962cc23b82..786be78498074 100644 --- a/src/llvm-late-gc-lowering-mmtk.cpp +++ b/src/llvm-late-gc-lowering-mmtk.cpp @@ -1,6 +1,6 @@ #include "llvm-gc-interface-passes.h" -void LateLowerGCFrame::cleanupGCPreserve(Function &F, CallInst *CI, Value *callee, Type *T_size) { +void LateLowerGCFrame::CleanupGCPreserve(Function &F, CallInst *CI, Value *callee, Type *T_size) { if (callee == gc_preserve_begin_func) { // Initialize an IR builder. IRBuilder<> builder(CI); diff --git a/src/llvm-late-gc-lowering-stock.cpp b/src/llvm-late-gc-lowering-stock.cpp index b8f4065b06f59..0f2d1fa009d88 100644 --- a/src/llvm-late-gc-lowering-stock.cpp +++ b/src/llvm-late-gc-lowering-stock.cpp @@ -1,5 +1,5 @@ #include "llvm-gc-interface-passes.h" -void LateLowerGCFrame::cleanupGCPreserve(Function &F, CallInst *CI, Value *callee, Type *T_size) { +void LateLowerGCFrame::CleanupGCPreserve(Function &F, CallInst *CI, Value *callee, Type *T_size) { // Do nothing for the stock GC } diff --git a/src/llvm-late-gc-lowering.cpp b/src/llvm-late-gc-lowering.cpp index 2e41ebe4b5023..fc62ab5109133 100644 --- a/src/llvm-late-gc-lowering.cpp +++ b/src/llvm-late-gc-lowering.cpp @@ -2085,7 +2085,7 @@ bool LateLowerGCFrame::CleanupIR(Function &F, State *S, bool *CFGModified) { /* No replacement */ } else if (callee && (callee == gc_preserve_begin_func || callee == gc_preserve_end_func)) { - cleanupGCPreserve(F, CI, callee, T_size); + CleanupGCPreserve(F, CI, callee, T_size); } else if (pointer_from_objref_func != nullptr && callee == pointer_from_objref_func) { auto *obj = CI->getOperand(0); auto *ASCI = new AddrSpaceCastInst(obj, CI->getType(), "", CI);