Skip to content

Nullness Analysis for GenBCode#4516

Closed
lrytz wants to merge 2 commits intoscala:2.12.xfrom
lrytz:opt/nullness
Closed

Nullness Analysis for GenBCode#4516
lrytz wants to merge 2 commits intoscala:2.12.xfrom
lrytz:opt/nullness

Conversation

@lrytz
Copy link
Member

@lrytz lrytz commented May 22, 2015

No description provided.

lrytz added 2 commits May 22, 2015 17:36
Tracks nullness of values using an ASM analyzer.

Tracking nullness requires alias tracking for local variables and
stack values. For example, after an instance call, local variables
that point to the same object as the receiver are treated not-null.
When inlining an instance call, the inliner has to ensure that a NPE
is still thrown if the receiver object is null. By using the nullness
analysis, we can avoid emitting this code in case the receiver object
is known to be not-null.
@scala-jenkins scala-jenkins added this to the 2.12.0-M2 milestone May 22, 2015
@lrytz
Copy link
Member Author

lrytz commented May 22, 2015

Recommended path for reviewing:

  1. The big comment in NullnessAnalyzer
  2. The NullnessAnalyzerTest
  3. The AliasingFrame class
  4. The NullnessAnalyzer and the rest

Review by @retronym.

@lrytz
Copy link
Member Author

lrytz commented May 22, 2015

Build failed to resolve the upgraded org.scala-lang.modules:scala-asm:jar:5.0.4-scala-1. Note that it's there on maven central (https://repo1.maven.org/maven2/org/scala-lang/modules/scala-asm/5.0.4-scala-1/), and the scala-ci artifactory has maven central as a remote repository defined (https://scala-ci.typesafe.com/artifactory/webapp/repositoryconfig.html?5). So I don't know.. cc @adriaanm

@adriaanm
Copy link
Contributor

@adriaanm
Copy link
Contributor

Ugh, jenkins why you abort jobs and call them a success???

@adriaanm
Copy link
Contributor

I restarted the validate-test for the commit currently failing because jenkins helpfully scheduled both jobs on the same worker, even though we have a whole behemoth sitting idle... shot

@adriaanm
Copy link
Contributor

See also scala/scala-jenkins-infra#33

@lrytz
Copy link
Member Author

lrytz commented May 22, 2015

for the first job, scabot shows main as failed even though test is still running..

@adriaanm
Copy link
Contributor

thats because jenkins doesn't recognize the rebuild as part of that flow

@adriaanm
Copy link
Contributor

scala/scabot#2

@lrytz
Copy link
Member Author

lrytz commented May 22, 2015

aha!

@lrytz
Copy link
Member Author

lrytz commented May 22, 2015

Started a bootstrap with the optimizer and nullness analysis enabled: it didn't get far :) https://scala-webapps.epfl.ch/jenkins/view/All/job/scala-checkin-manual/1390/console

Will look at it next week.

lrytz added a commit to lrytz/scala that referenced this pull request May 24, 2015
Address feedback in  scala#4516 / 57b8da4. Save allocations of
NullnessValue - there's only 4 possible instances. Also save tuple
allocations in InstructionStackEffect.
@lrytz
Copy link
Member Author

lrytz commented May 24, 2015

I accidentally submitted this to 2.12 - resubmitted in #4519

@lrytz lrytz closed this May 24, 2015
lrytz added a commit to lrytz/scala that referenced this pull request May 25, 2015
Address feedback in  scala#4516 / 57b8da4. Save allocations of
NullnessValue - there's only 4 possible instances. Also save tuple
allocations in InstructionStackEffect.
@lrytz lrytz deleted the opt/nullness branch June 4, 2015 13:01
@SethTisue SethTisue removed this from the 2.12.0-M2 milestone Jul 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants