diff options
author | George Burgess IV <george.burgess.iv@gmail.com> | 2016-07-22 22:30:48 +0000 |
---|---|---|
committer | George Burgess IV <george.burgess.iv@gmail.com> | 2016-07-22 22:30:48 +0000 |
commit | 4ec1753ff44c283885202115f090d8cab425fe1b (patch) | |
tree | fee1e1082ef6a7642082aacd123e060c9325a420 /llvm/lib/Analysis/CFLGraph.h | |
parent | 716814aa8acfe7a19e60e56d41bd6920a51fdd05 (diff) | |
download | bcm5719-llvm-4ec1753ff44c283885202115f090d8cab425fe1b.tar.gz bcm5719-llvm-4ec1753ff44c283885202115f090d8cab425fe1b.zip |
[CFLAA] Add more offset-sensitivity tracking.
This patch teaches FunctionInfo about offsets.
Like the last patch, this one doesn't introduce any visible
functionality change (the core algorithm knows nothing about offsets;
they're just plumbed through). Tests will come when we start acting
differently because of the offsets.
Patch by Jia Chen.
(N.B. I made a tiny change to Jia's patch to avoid warnings by GCC: I
put DenseMapInfo specializations in the `llvm` namespace. Only realized
that those appeared when compiling locally. :) )
Differential Revision: https://reviews.llvm.org/D22634
llvm-svn: 276486
Diffstat (limited to 'llvm/lib/Analysis/CFLGraph.h')
-rw-r--r-- | llvm/lib/Analysis/CFLGraph.h | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/llvm/lib/Analysis/CFLGraph.h b/llvm/lib/Analysis/CFLGraph.h index 7da5571c95c..43e622016ca 100644 --- a/llvm/lib/Analysis/CFLGraph.h +++ b/llvm/lib/Analysis/CFLGraph.h @@ -24,18 +24,6 @@ namespace llvm { namespace cflaa { -// We use UnknownOffset to represent pointer offsets that cannot be determined -// at compile time. Note that MemoryLocation::UnknownSize cannot be used here -// because we require a signed value. -enum : int64_t { UnknownOffset = INT64_MAX }; - -inline int64_t addOffset(int64_t LHS, int64_t RHS) { - if (LHS == UnknownOffset || RHS == UnknownOffset) - return UnknownOffset; - // FIXME: Do we need to guard against integer overflow here? - return LHS + RHS; -} - /// \brief The Program Expression Graph (PEG) of CFL analysis /// CFLGraph is auxiliary data structure used by CFL-based alias analysis to /// describe flow-insensitive pointer-related behaviors. Given an LLVM function, |