This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Do not increment SDNodeOrder for debug intrinsics.
AbandonedPublic

Authored by fhahn on Nov 30 2016, 8:57 AM.

Details

Summary
Some parts of CodeGen rely on the IR order (e.g. ScheduleDAGRRList)
and debug intrinsics previously affected the ordering.

This problem was found using check_cfc.py. With this patch, the build
failures for llvm's test-suite with check_cfc.py go from 113 down to 77
in x86_64.

Diff Detail

Event Timeline

fhahn updated this revision to Diff 79757.Nov 30 2016, 8:57 AM
fhahn retitled this revision from to [SelectionDAG] Do not increment SDNodeOrder for debug intrinsics. .
fhahn updated this object.
fhahn added reviewers: danielcdh, echristo, bogner.
fhahn added a subscriber: llvm-commits.

Adding aprantl for debug info stuff.

The description sounds similar to https://reviews.llvm.org/D25318

aprantl edited edge metadata.Nov 30 2016, 11:15 AM

Can't say that I fully understand the implication of this (I don't know what the node order is used for), but given your explanation this appears to be fine.

lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
4975

Extra whitespace :-)

aprantl added inline comments.Nov 30 2016, 11:17 AM
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
877

Any way the purpose of this condition could be documented?

fhahn added a comment.EditedNov 30 2016, 11:22 AM

Thanks @MatzeB I wasn't aware of this review! It looks like it addresses a similar problem, but the test case is different. I'll test my change with the test case from the D25318.

fhahn updated this revision to Diff 79795.Nov 30 2016, 12:23 PM
fhahn edited edge metadata.

Added a comment and removed stray line.

fhahn marked an inline comment as done.Nov 30 2016, 12:24 PM
fhahn added inline comments.
lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp
877

I hope my comment change makes is clearer.

fhahn marked an inline comment as done.Nov 30 2016, 2:56 PM
fhahn added a comment.Dec 1 2016, 8:08 AM

After having a closer look at D25318 I think it solves the problem in a slightly better way.

fhahn updated this revision to Diff 80041.Dec 2 2016, 2:22 AM

Upload 2 test cases for use with D25318

fhahn abandoned this revision.Jan 25 2017, 4:24 PM

Abandoned, because merged in rL292485