|
Jlm
|
#include <gtest/gtest.h>#include <jlm/llvm/ir/CallingConvention.hpp>#include <jlm/llvm/ir/Linkage.hpp>#include <jlm/llvm/ir/operators/alloca.hpp>#include <jlm/llvm/ir/operators/call.hpp>#include <jlm/llvm/ir/operators/GetElementPtr.hpp>#include <jlm/llvm/ir/operators/IntegerOperations.hpp>#include <jlm/llvm/ir/operators/lambda.hpp>#include <jlm/llvm/ir/operators/Load.hpp>#include <jlm/llvm/ir/operators/MemoryStateOperations.hpp>#include <jlm/llvm/ir/operators/operators.hpp>#include <jlm/llvm/ir/operators/Store.hpp>#include <jlm/llvm/ir/RvsdgModule.hpp>#include <jlm/llvm/ir/types.hpp>#include <jlm/llvm/opt/alias-analyses/LocalAliasAnalysis.hpp>#include <jlm/llvm/TestRvsdgs.hpp>#include <jlm/rvsdg/bitstring/constant.hpp>#include <jlm/rvsdg/bitstring/type.hpp>#include <jlm/rvsdg/control.hpp>#include <jlm/rvsdg/gamma.hpp>#include <jlm/rvsdg/graph.hpp>#include <jlm/rvsdg/theta.hpp>#include <jlm/rvsdg/view.hpp>
Go to the source code of this file.
Functions | |
| static void | Expect (jlm::llvm::aa::AliasAnalysis &aa, const jlm::rvsdg::Output &p1, size_t s1, const jlm::rvsdg::Output &p2, size_t s2, jlm::llvm::aa::AliasAnalysis::AliasQueryResponse expected) |
| TEST (LocalAliasAnalysisTests, TestLocalAliasAnalysis) | |
| TEST (LocalAliasAnalysisTests, TestLocalAliasAnalysisMultipleOrigins) | |
| TEST (LocalAliasAnalysisTests, testLoopVariantPointers) | |
| TEST (LocalAliasAnalysisTests, testAllocasArguments) | |
|
static |
Helper function for expecting an alias query to return a given result
Definition at line 35 of file LocalAliasAnalysisTests.cpp.
| TEST | ( | LocalAliasAnalysisTests | , |
| testAllocasArguments | |||
| ) |
Uses the RVSDG created by the LocalAliasAnalysisArgumentAllocaTest class.
Checks that pointer arguments and allocas defined in the function do not alias, even if the alloca escapes the function.
Definition at line 846 of file LocalAliasAnalysisTests.cpp.
| TEST | ( | LocalAliasAnalysisTests | , |
| TestLocalAliasAnalysis | |||
| ) |
Definition at line 254 of file LocalAliasAnalysisTests.cpp.
| TEST | ( | LocalAliasAnalysisTests | , |
| TestLocalAliasAnalysisMultipleOrigins | |||
| ) |
Definition at line 474 of file LocalAliasAnalysisTests.cpp.
| TEST | ( | LocalAliasAnalysisTests | , |
| testLoopVariantPointers | |||
| ) |
Uses the RVSDG created by the LocalAliasAnalysisLoopVariantPointersTest class.
The test checks that the local alias analysis responds NoAlias when queried about p and q, or between p and globalArray, or q and array. Queries between p and array, q and globalArray, should respond MayAlias. Queries between p and unknown should respond NoAlias, since array does not escape. However, queries between q and unknown should respond MayAlias. The responses are the same when using p and q from within the loop, and from outside it.
Definition at line 687 of file LocalAliasAnalysisTests.cpp.