LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 1359 - Finish Danny Berlin's Re-implementation of Andersen's AA
Summary: Finish Danny Berlin's Re-implementation of Andersen's AA
Status: RESOLVED FIXED
Alias: None
Product: libraries
Classification: Unclassified
Component: Global Analyses (show other bugs)
Version: trunk
Hardware: All All
: P enhancement
Assignee: Unassigned LLVM Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-25 15:37 PDT by Reid Spencer
Modified: 2007-09-19 11:28 PDT (History)
3 users (show)

See Also:
Fixed By Commit(s):


Attachments
Danny's changes to Andersens.cpp (57.50 KB, text/plain)
2007-04-25 15:37 PDT, Reid Spencer
Details
gcc imploementation of bitmap (35.10 KB, text/plain)
2007-04-25 15:38 PDT, Reid Spencer
Details
gcc delcaration of bitmap (17.55 KB, text/plain)
2007-04-25 15:38 PDT, Reid Spencer
Details
gcc implementation of obstack (15.98 KB, text/plain)
2007-04-25 15:39 PDT, Reid Spencer
Details
gcc declaration of obstack (20.39 KB, text/plain)
2007-04-25 15:40 PDT, Reid Spencer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reid Spencer 2007-04-25 15:37:24 PDT
From Danny:

Hi guys, i'm not going to have time to work on this for a month or
two, so i figured i'd post it.

This patch

1. reworks the andersen's implementation to support field sensitivity
(though field-sensitive constraints are not generated directly yet),
and uses it to do indirect function call support.
2. Rewrites the solver to be state of the art in terms of speed.
kimwitu++ used to take <i stopped it after a few hours> to solve, and
now it takes < 2 seconds.
3. Reworks the rest of the implementation to make it easy to support
offline variable substitution.

There are still more improvements to be made, and in particular
implementing ovs. This is not more than a couple hundred lines of
code, and would speed it up by another few orders of magnitude (as
well as reduce memory usage greatly).

The main thing blocking this patch, however, is that someone needs to
rewrite bitmap.c/bitmap.h, obstack.c and obstack.h, into C++. They
are currently just modified versions of what gcc is using.
You can get rid of the obstacks, of course.

Using set<u32> or BitVector or something like it will result in a
slowdown of mammoth proporations, and about a 10x memory increase.
Trust me here, you don't want to use a non-sparse bitmap.
BDD's are acceptable, but are about a 2x slowdown. With various
optimizations that are going to be published in the next few months,
you can get bitmaps to use just as little memory as BDDs would, while
being much faster.

Anyway, i've attached the patch.
The two new .h files go include/llvm/ADT
the two new .cc files go into lib/VMCore

Of course, you can put them wherever you really want.
Comment 1 Reid Spencer 2007-04-25 15:37:57 PDT
Created attachment 803 [details]
Danny's changes to Andersens.cpp
Comment 2 Reid Spencer 2007-04-25 15:38:28 PDT
Created attachment 804 [details]
gcc imploementation of bitmap
Comment 3 Reid Spencer 2007-04-25 15:38:58 PDT
Created attachment 805 [details]
gcc delcaration of bitmap
Comment 4 Reid Spencer 2007-04-25 15:39:59 PDT
Created attachment 806 [details]
gcc implementation of obstack
Comment 5 Reid Spencer 2007-04-25 15:40:40 PDT
Created attachment 807 [details]
gcc declaration of obstack
Comment 6 Daniel Berlin 2007-09-19 11:28:44 PDT
Fixed