Replies: 19 comments 14 replies
-
|
I feel that the primary contribution of the paper isn’t the alias analyses themselves, but the new evaluations and benchmarks they use that contextualize alias analyses within the optimizations they use for. The authors argue that static metrics like the "may-alias" set size are misleading because they don’t capture whether the analysis actually improves compiler optimizations. That is, precision isn’t meaningful in isolation from its downstream clients. Instead, they propose dynamic and limit-based evaluations, showing how an alias analysis should be measured by its impact on optimizations like redundant load elimination and by how close it gets to an upper bound of achievable improvement. I also found it striking how much language design influences alias precision: writing a sound alias analysis for a language like C with void pointers is inherently harder than for Java. This suggests that designing languages or type systems that enforce strong aliasing semantics could be just as impactful as designing better analyses themselves. Discussion question: |
Beta Was this translation helpful? Give feedback.
-
|
Critique Question |
Beta Was this translation helpful? Give feedback.
-
|
Critique This was a fun reach, and I think that baking types into alias analysis is a step in the right direction. The paper put forth solid arguments backed with good analysis -- I especially liked how it used a "shadow heap" to establish an upper bound on redundant loads and to justify that On a completely separate note, I'm extremely curious as to how Rust's type system can be used to perform alias analysis since it's impossible to have a mutable view into memory from two variables with intersecting lifetimes in safe Rust. Question
The in-class example would not compile in Rust! fn foo(a: &mut char, b: &mut char) -> bool { ... }
foo(&mut a, &mut a); // does not compile. a and b must alias different memory locations!
fn bar(a: &char, b: &char) -> bool { ... }
bar(&a, &a); // this is valid rust |
Beta Was this translation helpful? Give feedback.
-
CritiqueThe evaluation on this paper is pretty epic. It does a really good job breaking down why the authors felt comfortable stopping where they did in what when presented feels like a pretty simple analysis (at least compared to some of the other ones we've read about). However, I still question why they stop when they do. The argument the authors make after evaluating their cases is that with respect to RLE, the alias false positives their analysis detects aren't impactful. Maybe it's due to a lack of examples, or an absence of a classification of the contrived failure cases the authors mention, but I don't find the authors' argument extremely convincing. Phrase another way, I feel like I am curious about why, qualitatively, the cases which are missed don't hurt RLE's performance. QuestionThe authors mostly analyze objected oriented languages, Modula and Java and with strong but in the grand scheme of languages somewhat simple type systems. The authors describe how some languages features, like structural type equality, can hurt the alias analysis when incomplete programs are analyzed. How could other languages' features or languages not following the object oriented paradigm (for example, maybe OCaml) hurt or help this analysis? |
Beta Was this translation helpful? Give feedback.
-
|
critique I thought the optimisation presented seems like a reasonable follow-on to type-based programming. I'm a bit curious about some of the results presented in analysis, though. First, they use a simulator for testing the optimised programs --- is there a reason to do this? Or were the problems with using simulated systems not as widely known at the time? Second, they don't seem to cover the effect of their analysis on compilation time. I would think that the effect is perhaps lengthening compilation time a little, but wonder if that's the case. questions The paper seems like something 'obvious' for compilers to implement, and the results seem pretty promising. How wide is use of this type of system, and are there notable languages / compilers which don't implement it? Otherwise, to what extent is this type of alias analysis general to other types of compiler-y things? Like, beyond the realm of incidentally type-unsafe languages --- what about to dynamically typed and/or interpreted languages? Could we still benefit from using these types of metrics on them (albeit in a slightly different way)? |
Beta Was this translation helpful? Give feedback.
-
CritiqueI thought the paper did a good job showing how type information can make alias analysis simpler and still fairly effective. The evaluation feels thorough, with both static and dynamic analyses and even an upper-bound comparison. That said, it also seems quite tied to Modula-3's strong type-safety assumptions. I'm not entirely sure how much of the approach would hold up in more common languages like C or C++, where pointer casting is much looser and type information can be less reliable. It makes me wonder whether the strong results come more from the guarantees of Modula-3 rather than the analysis itself. Which, of course, could be made into an argument for type-safe languages. Discussion questions
|
Beta Was this translation helpful? Give feedback.
-
CritiqueI agree with most people here that the main contribution of the paper is in the evaluation -- the analysis techniques they presented are interesting, but (by their own evaluation) the more sophisticated techniques do not seem to make much of a difference. I especially like their "limit analysis" showing that most of the gain from RLE has been gotten just with simple techniques. QuestionsMy main question is about impact -- does other research now use similar evaluation methods? Do some compilers implement the more sophisticated analyses in this paper despite their small impact on these (small) benchmarks? Is there some case being missed by this paper's benchmarks that is now much more common or impactful? |
Beta Was this translation helpful? Give feedback.
-
CritiqueThis paper presented some type-based methods for doing alias analysis. The analysis ideas are fairly straightforward -- what was more interesting to me was their limit analysis for an upper bound on the possible gains. I seldom see this sort of analysis in empirical works, and it's certainly a useful thing to have for gauging just how useful a (simple) technique actually is. QuestionsGiven that their simple techniques seem to do quite well, do modern compilers do something much more complicated than this or something fairly simple? |
Beta Was this translation helpful? Give feedback.
-
|
I find the algorithm interesting in that a seemingly coarse analysis, relying only on type information, can achieve results close to those of a perfect analysis, at least for redundant load elimination (RLE). Its fast time complexity and sufficient analysis quality should make it a practical choice for real compilers. I also agree with others that the paper's strongest contribution lies in its evaluation methodology, especially the upper-bound analysis, which clearly demonstrates how much alias precision could theoretically improve optimization. However, I believe the paper should also evaluate other downstream optimizations beyond RLE, since different optimizations can vary in their sensitivity to alias precision. I also wonder how well TBAA would perform in less type-safe languages like C++, where arbitrary pointer casting is allowed. Questions:
|
Beta Was this translation helpful? Give feedback.
-
|
Critique: Question: |
Beta Was this translation helpful? Give feedback.
-
CritiqueAs mentioned above, the main value of this paper is the evaluation of type-based alias analysis. This paper was quite interesting to read. I found it really interesting that the simplest form of type-based alias analysis was nearly as performant as the most complex one. Question
|
Beta Was this translation helpful? Give feedback.
-
|
Critique Question What other factors should programmers consider when choosing a programming language for a new project (ex. libraries/tools, concurrency model, etc.)? |
Beta Was this translation helpful? Give feedback.
-
|
Critique: Question: |
Beta Was this translation helpful? Give feedback.
-
|
Critique: Questions: |
Beta Was this translation helpful? Give feedback.
-
|
Critique: Section 3.5 details how there is a tradeoff inherent in choosing the fast time bound as opposed to the optimal bound, wherein TBAA only removed between 30 and 90 percent of redundant loads. However, I don't know that the paper justified this tradeoff is worth it, at least without input from the programmer. If the program was run a million times, that ten percent matters significantly. Questions: Since this paper was published, has there been analyses that can bridge that missing gap? The authors claim that only a small percentage remain, but could those remaining references lead to large speedups? |
Beta Was this translation helpful? Give feedback.
-
|
Critique |
Beta Was this translation helpful? Give feedback.
-
|
Sorry for the late comment and missing the in-class discussion; I've been sick this week, but I figured better late than never :) I liked the evaluation section of this paper; I thought the metrics and methodologies used were well justified and reasonably comprehensive, especially for the time. The inclusion of the limit analysis is particularly innovative and interesting, and helps a lot to justify the utility and effectiveness of their alias analyses. Some questions/comments on the limitations of this work: (1) The authors mention that their analyses are not effective at disambiguating interprocedural aliases. This seems like a hard problem; is there later work that addresses this question? (2) Most of the evaluation focuses on RLE. What about other optimizations? Was RLE chosen to specifically highlight the benefits of type based alias analysis, and would this strategy work well for other optimizations that utilize aliasing? (3) As others have asked: what about behavior on/adaptability to languages that are not type safe? |
Beta Was this translation helpful? Give feedback.
-
|
Sorry I forgot to reply to this discussion. This paper is very interesting: a "coarse" analysis, that only using type information, could achieve performance comparable to a perfect analysis. Most of my questions are answered in this discussion chanell and also the class discussion. My only concern is about the evaluation: different downstrem optimizations have different sensitivities to alias precesion, and evaluating only one optimization (RLE) seems not enough. We would like to see following papers, evaluating this on more downstream optimizations, which could be some interesting evaluation papers. |
Beta Was this translation helpful? Give feedback.
-
|
Critique Question |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is the discussion thread for: Type-Based Alias Analysis
Amer Diwan, Kathryn S. McKinley, and J. Eliot B. Moss
Discussion leaders: Jonathan Brown @Smubge, Cynthia Shao @CynyuS, Pedro Pontes Garcia @pedropontesgarcia
Beta Was this translation helpful? Give feedback.
All reactions