11 Commits

Author SHA1 Message Date
George Burgess IV
450453a6c0 [CFLAA] Check for pointer types in more places.
This patch fixes an assertion that fires when we try to add non-pointer
Values to the CFLGraph. Centralizing the check for whether something
is/isn't a pointer type isn't completely trivial (and, in some cases,
would end up being entirely redundant), but it may be beneficial to do
so if this trips us up more in the future.

Patch by Jia Chen.

Differential Revision: https://reviews.llvm.org/D22947


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-29 01:23:45 +00:00
George Burgess IV
3dba903392 [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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 22:30:48 +00:00
Reid Kleckner
12e1ff6f81 Use INT64_MAX instead of LLONG_MAX
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276419 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-22 14:11:58 +00:00
Reid Kleckner
09577f3859 Fix the clang-cl self-host with VS 2013 headers
std::numeric_limits<int64_t>::max() is not constexpr in VC 2013 headers,
and Clang complains that it isn't. MSVC 2013 itself is emitting a
dynamic initializer for this thing. Instead, use an enum.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276334 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-21 21:06:04 +00:00
George Burgess IV
7a905f9108 [CFLAA] Add offset tracking in CFLGraph.
(Also, refactor our constexpr handling to be less insane).

This patch lets us track field offsets in the CFL Graph, which is the
first step to making CFLAA field/offset sensitive. Woohoo! Note that
this patch shouldn't visibly change our behavior (since we make no use
of the offsets we're now tracking), so we can't quite add tests for this
yet.

Patch by Jia Chen.

Differential Revision: https://reviews.llvm.org/D22598


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276201 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-20 22:53:30 +00:00
George Burgess IV
723a3ff949 [CFLAA] Add an initial CFLAnders implementation.
This adds an incomplete anders-style implementation for CFLAA. It's
incomplete in that it's missing interprocedural analysis, attrs
handling, etc. and that it needs more tests. More tests and features
will be added in future commits.

Patch by Jia Chen.

Differential Revision: https://reviews.llvm.org/D22291


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-15 19:53:25 +00:00
George Burgess IV
581370e98f Attempt to make buildbots happy.
Woohoo, unused variable warnings in builds without asserts (as a result
of r275122).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-11 23:18:32 +00:00
George Burgess IV
9e937064ea [CFLAA] Simplify CFLGraphBuilder. NFC.
This patch simplifies the graph builder by encoding nodes as {Value,
Dereference Level} pairs. This lets us kill edge types, and allows us to
get rid of hacks in StratifiedSets (like addAttrsBelow/...). This
simplification also allows us to remove InstantiatedRelations and
InstantiatedAttrs.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D22080


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@275122 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-11 22:59:09 +00:00
George Burgess IV
654ec29586 [CFLAA] Move the graph builder out from CFLSteens. NFC.
Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D22022


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274958 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-09 02:54:42 +00:00
George Burgess IV
cc48e0f82a [CFLAA] Split out more things from CFLSteens. NFC.
"More things" = StratifiedAttrs and various bits like interprocedural
summaries.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21964


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274592 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-06 00:47:21 +00:00
George Burgess IV
02af278314 [CFLAA] Split the CFL graph out from CFLSteens. NFC.
Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21963


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274591 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-06 00:36:12 +00:00