Skip to content

Commit

Permalink
Rename cleanUpGCPreserve. Remove unnecessary include of gc_interface.h
Browse files Browse the repository at this point in the history
  • Loading branch information
qinsoon authored Nov 28, 2024
1 parent 483cb93 commit ce0d584
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/llvm-gc-interface-passes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 <map>
#include <string>
Expand Down Expand Up @@ -361,7 +360,7 @@ struct LateLowerGCFrame: private JuliaPassContext {
void PlaceGCFrameStores(State &S, unsigned MinColorRoot, ArrayRef<int> Colors, Value *GCFrame);
void PlaceRootsAndUpdateCalls(SmallVectorImpl<int> &Colors, State &S, std::map<Value *, std::pair<int, int>>);
void CleanupWriteBarriers(Function &F, State *S, const SmallVector<CallInst*, 0> &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<int, 1> GetPHIRefinements(PHINode *phi, State &S);
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-late-gc-lowering-mmtk.cpp
Original file line number Diff line number Diff line change
@@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/llvm-late-gc-lowering-stock.cpp
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion src/llvm-late-gc-lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ce0d584

Please sign in to comment.