File tree Expand file tree Collapse file tree
lib/PhasarLLVM/DataFlowSolver/IfdsIde/IFDSFieldSensTaintAnalysis/Utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 strategy :
1313 fail-fast : true
1414 matrix :
15- compiler : [ [clang++-12 , clang-12 ] ]
15+ compiler : [ [clang++-13 , clang-13 ] ]
1616 build : [ Debug, Release ]
1717
1818 continue-on-error : false
@@ -42,16 +42,16 @@ jobs:
4242 shell : bash
4343 run : |
4444 sudo apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key
45- sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main'
45+ sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
4646 sudo apt-get update
4747 sudo apt-get -y install --no-install-recommends \
4848 ${{ matrix.compiler[1] }} \
49- llvm-12 -dev \
50- libllvm12 \
51- libclang-common-12 -dev \
52- libclang-12 -dev \
53- libclang-cpp12 -dev \
54- clang-tidy-12
49+ llvm-13 -dev \
50+ libllvm13 \
51+ libclang-common-13 -dev \
52+ libclang-13 -dev \
53+ libclang-cpp13 -dev \
54+ clang-tidy-13
5555
5656 - name : Building Phasar in ${{ matrix.build }} with ${{ matrix.compiler[0] }}
5757 env :
Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ jobs:
1515 - tool : clang-format
1616 install : |
1717 sudo apt-key adv --fetch-keys https://apt.llvm.org/llvm-snapshot.gpg.key
18- sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-12 main'
18+ sudo add-apt-repository -y 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-13 main'
1919 sudo apt-get update
20- sudo apt-get -y install --no-install-recommends clang-format-12
20+ sudo apt-get -y install --no-install-recommends clang-format-13
2121 regex : \.(h|c|hpp|cpp)$
22- command : clang-format-12 --style=file -i
22+ command : clang-format-13 --style=file -i
2323
2424 continue-on-error : false
2525 steps :
Original file line number Diff line number Diff line change 1010 - id : check-added-large-files
1111 - id : requirements-txt-fixer
1212- repo : https://github.com/pre-commit/mirrors-clang-format
13- rev : ' v12 .0.1 '
13+ rev : ' v13 .0.0 '
1414 hooks :
1515 - id : clang-format
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ include_directories(${SQLITE3_INCLUDE_DIR})
171171# LLVM
172172if (NOT PHASAR_IN_TREE)
173173 # Only search for LLVM if we build out of tree
174- find_package (LLVM 12 REQUIRED CONFIG )
174+ find_package (LLVM 13 REQUIRED CONFIG )
175175 include_directories (${LLVM_INCLUDE_DIRS} )
176176 link_directories (${LLVM_LIB_PATH} ${LLVM_LIBRARY_DIRS} )
177177endif ()
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ foreach(component ${phasar_FIND_COMPONENTS})
99endforeach ()
1010
1111function (phasar_config executable )
12- find_package (LLVM 12 REQUIRED CONFIG )
12+ find_package (LLVM 13 REQUIRED CONFIG )
1313 include_directories (${LLVM_INCLUDE_DIRS} )
1414 link_directories (${LLVM_LIB_PATH} ${LLVM_LIBRARY_DIRS} )
1515 find_library (LLVM_LIBRARY NAMES LLVM HINTS ${LLVM_LIBRARY_DIRS} )
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ Phasar requires C++-17.
2626
2727Currently supported version of LLVM
2828-----------------------------------
29- Phasar is currently set up to support LLVM-12 .0.
29+ Phasar is currently set up to support LLVM-13 .0.
3030
3131What is Phasar?
3232---------------
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ source ./utils/safeCommandsSet.sh
55
66readonly PHASAR_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " > /dev/null 2>&1 && pwd ) "
77readonly PHASAR_INSTALL_DIR=" /usr/local/phasar"
8- readonly LLVM_INSTALL_DIR=" /usr/local/llvm-12 "
8+ readonly LLVM_INSTALL_DIR=" /usr/local/llvm-13 "
99
1010NUM_THREADS=$( nproc)
11- LLVM_RELEASE=llvmorg-12 .0.0
11+ LLVM_RELEASE=llvmorg-13 .0.0
1212DO_UNIT_TEST=true
1313
1414
Original file line number Diff line number Diff line change @@ -269,6 +269,11 @@ template <typename T> class BitVectorSet {
269269 [[nodiscard]] size_t size () const noexcept { return Bits.count (); }
270270
271271 friend bool operator ==(const BitVectorSet &Lhs, const BitVectorSet &Rhs) {
272+ bool LeftEmpty = Lhs.empty ();
273+ bool RightEmpty = Rhs.empty ();
274+ if (LeftEmpty || RightEmpty) {
275+ return LeftEmpty == RightEmpty;
276+ }
272277 // Check, whether Lhs and Rhs actually have the same bits set and not
273278 // whether their internal representation is exactly identitcal
274279 auto LhsWords = Lhs.Bits .getData ();
Original file line number Diff line number Diff line change @@ -272,6 +272,10 @@ normalizeGlobalGEPs(const std::vector<const llvm::Value *> &MemLocationSeq) {
272272 GepInst->idx_end ());
273273
274274 auto *SplittedGEPInst = llvm::GetElementPtrInst::CreateInBounds (
275+ NormalizedMemLocationSeq.back ()
276+ ->getType ()
277+ ->getScalarType ()
278+ ->getPointerElementType (),
275279 const_cast <llvm::Value *>(NormalizedMemLocationSeq.back ()),
276280 {Indices[0 ], Indices[1 ]}, " gepsplit0" );
277281 NormalizedMemLocationSeq.push_back (SplittedGEPInst);
@@ -286,6 +290,10 @@ normalizeGlobalGEPs(const std::vector<const llvm::Value *> &MemLocationSeq) {
286290 NameStream << " gepsplit" << (I - 1 );
287291
288292 SplittedGEPInst = llvm::GetElementPtrInst::CreateInBounds (
293+ NormalizedMemLocationSeq.back ()
294+ ->getType ()
295+ ->getScalarType ()
296+ ->getPointerElementType (),
289297 const_cast <llvm::Value *>(NormalizedMemLocationSeq.back ()),
290298 {ConstantZero, Index}, NameStream.str ());
291299 NormalizedMemLocationSeq.push_back (SplittedGEPInst);
You can’t perform that action at this time.
0 commit comments