Skip to content

Commit

Permalink
Restore braces
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbeckingsale authored and ggeorgakoudis committed Dec 10, 2024
1 parent 713818b commit 30a5986
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion lib/JitEngineHost.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ class JitEngineHost : public JitEngine {
void addStaticLibrarySymbols();
JitCache<void *> CodeCache;
SmallVector<RuntimeConstant, 8> JitVariables;

};

} // namespace proteus
Expand Down
17 changes: 10 additions & 7 deletions pass/ProteusPass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,8 @@ class ProteusJitPassImpl {
Int32Ty = Type::getInt32Ty(M.getContext());
Int64Ty = Type::getInt64Ty(M.getContext());
Int128Ty = Type::getInt128Ty(M.getContext());
RuntimeConstantTy = StructType::create({Int128Ty, Int32Ty}, "struct.args", true);
RuntimeConstantTy =
StructType::create({Int128Ty, Int32Ty}, "struct.args", true);
}

bool run(Module &M, bool IsLTO) {
Expand Down Expand Up @@ -918,6 +919,7 @@ class ProteusJitPassImpl {
FATAL_ERROR("instrumentRegisterJITFunc only callable with `EnableHIP or "
"EnableCUDA set.");
return;
}

Function *RegisterFunction = M.getFunction(RegisterFunctionName);
assert(RegisterFunction &&
Expand Down Expand Up @@ -985,9 +987,9 @@ class ProteusJitPassImpl {
dbgs() << "finding jit variables" << "\n";
dbgs() << "users..." << "\n";

SmallVector<Function*, 16> JitFunctions;
SmallVector<Function *, 16> JitFunctions;

for (auto& F : M.getFunctionList()) {
for (auto &F : M.getFunctionList()) {
if (F.getName().contains("jit_variable")) {
JitFunctions.push_back(&F);
}
Expand All @@ -997,12 +999,13 @@ class ProteusJitPassImpl {
for (auto User : Function->users()) {

CallBase *CB = dyn_cast<CallBase>(User);
if (!CB)
FATAL_ERROR("Expected CallBase as user of proteus::jit_variable function");
if (!CB)
FATAL_ERROR(
"Expected CallBase as user of proteus::jit_variable function");

dbgs() << "call: " << *CB << "\n";
StoreInst *S = dyn_cast<StoreInst>(*(CB->users().begin()));
if (!S)
if (!S)
FATAL_ERROR("Expected StoreInst");
dbgs() << "store: " << *S << "\n";
Value *V = S->getPointerOperand();
Expand All @@ -1020,7 +1023,7 @@ class ProteusJitPassImpl {
}
}
}

dbgs() << "done." << "\n";
}
};
Expand Down

0 comments on commit 30a5986

Please sign in to comment.