Skip to content

Commit

Permalink
Bump to llvm 18 (#880)
Browse files Browse the repository at this point in the history
* suppress external uses stuff for now

* bump to LLVM 18
  • Loading branch information
regehr authored May 30, 2024
1 parent 8376c76 commit a55864f
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ if(NOT EXISTS ${LLVM_CONFIG_EXECUTABLE})
endif()

find_path(ZSTD_LIBRARY_DIR
NAMES libzstd.a libzstd.dylib libzstd.so
HINTS /usr/local/lib /opt/homebrew/lib)
NAMES libzstd.a libzstd.dylib libzstd.so libzstd.so.1
HINTS /usr/local/lib /opt/homebrew/lib /usr/lib/x86_64-linux-gnu)

execute_process(
COMMAND ${LLVM_CONFIG_EXECUTABLE} --includedir
Expand Down
8 changes: 4 additions & 4 deletions build_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ fi

ncpus=$(command nproc 2>/dev/null || command sysctl -n hw.ncpu 2>/dev/null || echo 8)

# hiredis latest as of May 7 2021
hiredis_commit=869f3d0ef1513dd0258ad7190c9914df16dcc4a4
# hiredis latest as of May 30 2024
hiredis_commit=19cfd60d92da1fdb958568cdd7d36264ab14e666
llvm_repo=https://github.com/regehr/llvm-project.git
# llvm_commit specifies the git branch or hash to checkout to
llvm_commit=disable-peepholes-llvmorg-17.0.3-1
llvm_commit=disable-peepholes-llvmorg-18.1.6
klee_repo=https://github.com/regehr/klee
klee_branch=klee-for-souper-17-2
alive_commit=v7
alive_repo=https://github.com/manasij7479/alive2.git
z3_repo=https://github.com/Z3Prover/z3.git
z3_commit=z3-4.12.2
z3_commit=z3-4.13.0

llvm_build_type=Release
if [ -n "$1" ] ; then
Expand Down
4 changes: 2 additions & 2 deletions include/klee/Config/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#define LLVM_VERSION_MAJOR 17
#define LLVM_VERSION_MINOR 0
#define LLVM_VERSION_MAJOR 18
#define LLVM_VERSION_MINOR 1
4 changes: 2 additions & 2 deletions lib/Extractor/Candidates.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ Inst *ExprBuilder::makeArrayRead(Value *V) {
// with this approach, we might be restricting the constant
// range harvesting. Because range info. might be coming from
// llvm values other than instruction.
auto LVIRange = LVI.getConstantRange(V, I);
auto LVIRange = LVI.getConstantRange(V, I, /*UndefAllowed=*/false);
auto SC = SE.getSCEV(V);
auto R1 = LVIRange.intersectWith(SE.getSignedRange(SC));
auto R2 = LVIRange.intersectWith(SE.getUnsignedRange(SC));
Expand Down Expand Up @@ -940,7 +940,7 @@ void PrintDataflowInfo(Function &F, Instruction &I, LazyValueInfo &LVI,
ConstantRange Range = llvm::ConstantRange(Width, /*isFullSet=*/true);
if (V->getType()->isIntegerTy()) {
if (Instruction *I = dyn_cast<Instruction>(V)) {
auto LVIRange = LVI.getConstantRange(V, I);
auto LVIRange = LVI.getConstantRange(V, I, /*UndefAllowed=*/false);
auto SC = SE.getSCEV(V);
auto R1 = LVIRange.intersectWith(SE.getSignedRange(SC));
auto R2 = LVIRange.intersectWith(SE.getUnsignedRange(SC));
Expand Down
10 changes: 5 additions & 5 deletions lib/Pass/Pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ struct SouperPass : PassInfoMixin<SouperPass> {
Function *RegisterFunc = M->getFunction("_souper_profile_register");
if (!RegisterFunc) {
Type *RegisterArgs[] = {
PointerType::getInt8PtrTy(C),
PointerType::getInt8PtrTy(C),
PointerType::getInt64PtrTy(C),
PointerType::get(Type::getInt8Ty(C), 0),
PointerType::get(Type::getInt8Ty(C), 0),
PointerType::get(Type::getInt64Ty(C), 0),
};
FunctionType *RegisterType = FunctionType::get(Type::getVoidTy(C),
RegisterArgs, false);
Expand All @@ -143,15 +143,15 @@ struct SouperPass : PassInfoMixin<SouperPass> {
Constant *ReplVar = new GlobalVariable(*M, Repl->getType(), true,
GlobalValue::PrivateLinkage, Repl, "");
Constant *ReplPtr = ConstantExpr::getPointerCast(ReplVar,
PointerType::getInt8PtrTy(C));
PointerType::get(Type::getInt8Ty(C), 0));

Constant *Field = ConstantDataArray::getString(C, "dprofile " + Loc.str(),
true);
Constant *FieldVar = new GlobalVariable(*M, Field->getType(), true,
GlobalValue::PrivateLinkage, Field,
"");
Constant *FieldPtr = ConstantExpr::getPointerCast(FieldVar,
PointerType::getInt8PtrTy(C));
PointerType::get(Type::getInt8Ty(C), 0));

Constant *CntVar = new GlobalVariable(*M, Type::getInt64Ty(C), false,
GlobalValue::PrivateLinkage,
Expand Down
2 changes: 1 addition & 1 deletion test/Solver/alive-phi.opt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ infer %5
%6:i32 = add %1, %2
result %6

; CHECK: LGTM
; CHECK: Invalid


%0 = block 2
Expand Down
File renamed without changes.

0 comments on commit a55864f

Please sign in to comment.