Commit Graph

9 Commits

Author SHA1 Message Date
Hal Finkel db5f86a9bf [CFL-AA] CFL-AA should not assert on an va_arg instruction
The CFL-AA implementation was missing a visit* routine for va_arg instructions,
causing it to assert when run on a function that had one. For now, handle these
in a conservative way.

Fixes PR20954.

llvm-svn: 219718
2014-10-14 20:51:26 +00:00
Hal Finkel 8eae3ad2ff [CFL-AA] Update for handling of globals and more tests
We used to return PartialAlias if *either* variable being queried interacted
with arguments or globals. AFAICT, we can change this to only returning
MayAlias iff *both* variables being queried interacted with arguments or
globals.

Also, adding some basic functionality tests: some basic IPA tests, checking
that we give conservative responses with arguments/globals thrown in the mix,
and ensuring that we trace values through stores and loads.

Note that saying that 'x' interacted with arguments or globals means that the
Attributes of the StratifiedSet that 'x' belongs to has any bits set.

Patch by George Burgess IV, thanks!

llvm-svn: 219122
2014-10-06 14:42:56 +00:00
Argyrios Kyrtzidis 0b9f5507c8 Adds 'override' to overriding methods. NFC.
llvm-svn: 218815
2014-10-01 21:00:44 +00:00
Hal Finkel 85f2692d2f [CFLAA] Remove one final initializer list
Maybe MSVC will be happy now...

llvm-svn: 217000
2014-09-03 00:06:47 +00:00
Hal Finkel 1ae325f53d [CFLAA] And even more MSVC fixes
Remove a couple more initializer lists and constexpr dependencies.

llvm-svn: 216998
2014-09-02 23:50:01 +00:00
Hal Finkel ca616acd73 [CFLAA] More cleanup for MSVC
Remove more initializer lists, etc.

llvm-svn: 216994
2014-09-02 23:29:48 +00:00
Hal Finkel 8d1590dc4b [CFLAA] No initializer lists for MSVC
MSVC 2012 does not understand initializer lists; remove them.

llvm-svn: 216991
2014-09-02 22:52:30 +00:00
Hal Finkel 7d7087c124 [CFLAA] constexpr -> LLVM_CONSTEXPR
Attempt to fix the MSVC build by not using constexpr.

llvm-svn: 216979
2014-09-02 22:13:00 +00:00
Hal Finkel 7529c55c02 Add a CFL Alias Analysis implementation
This provides an implementation of CFL alias analysis (including some
supporting data structures). Currently, we don't have any extremely fancy
features, sans some interprocedural analysis (i.e. no field sensitivity, etc.),
and we do best sitting behind BasicAA + TBAA. In such a configuration, we take
~0.6-0.8% of total compile time, and give ~7-8% NoAlias responses to queries
TBAA and BasicAA couldn't answer when bootstrapping LLVM. In testing this on
other projects, we've seen up to 10.5% of queries dropped by BasicAA+TBAA
answered with NoAlias by this algorithm.

Patch by George Burgess IV (with minor modifications by me -- mostly adapting
some BasicAA tests), thanks!

llvm-svn: 216970
2014-09-02 21:43:13 +00:00