This is an archive of the discontinued LLVM Phabricator instance.

[Hexagon] Weaken over-aggressive assertion in RDFGraph
AbandonedPublic

Authored by niravd on Oct 19 2016, 1:43 PM.

Details

Reviewers
kparzysz
Summary

Improvements in consecutive merge stores in SelectionDAG (D14834)
trigger assertion failures in getNextRef during clang
bootstrapping. Rework to make cases that assertion failure return
default "nullptr" instead.

Event Timeline

niravd updated this revision to Diff 75213.Oct 19 2016, 1:43 PM
niravd retitled this revision from to [Hexagon] Weaken over-aggressive assertion in RDFGraph.
niravd added a reviewer: kparzysz.
niravd updated this object.
niravd added a subscriber: llvm-commits.
kparzysz edited edge metadata.Oct 19 2016, 1:51 PM

Hitting this assertion is very bad. The list of nodes is a circular list with a single "code" and a bunch of "refs". Once you visit the last ref, the next node should be the code, there is no other possibility.

Something is seriously wrong somewhere.

How are you getting this assertion? I applied D14384, built clang, then built another clang from scratch with the previous one, ran check-llvm-codegen-hexagon and I didn't get any errors.

How are you getting this assertion? I applied D14384, built clang, then built another clang from scratch with the previous one, ran check-llvm-codegen-hexagon and I didn't get any errors.

If you checkout 284154 you should see the problem replicated during bootstrapping. I've verified that the tests generate the same SelectionDAG as before and that the problem still holds with -O0 for the stage 1 compiler where D14834 should do nothing. This should mean that the problem is in the release compilation of Hexagon backend with D14834.

What is stage 1 compiler? One built using the default C++ compiler? If the problem happens when clang is built with -O0, why do you conclude that the problem is in the release build?

niravd abandoned this revision.Nov 2 2016, 9:52 AM