This is an archive of the discontinued LLVM Phabricator instance.

[X86] [CodeView] Add codeview mappings for registers ST0-ST7
ClosedPublic

Authored by mstorsjo on Jan 24 2022, 1:13 PM.

Details

Summary

These can end up needed after https://reviews.llvm.org/D116821.

Suggested by @aganea.

This doesn't come with any tests right now - do we need them here, and
are there any suggestion on what kind that should be? (The issue
that originally triggered this probably doesn't reproduce hitting
these register types, as that feature has been disabled/reverted for
now.)

Diff Detail

Event Timeline

mstorsjo created this revision.Jan 24 2022, 1:13 PM
mstorsjo requested review of this revision.Jan 24 2022, 1:13 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2022, 1:13 PM

The feature can still be enabled with -mllvm -experimental-debug-variable-locations=true, so D116821 wasn't completely reverted.

Why not adding your initial bug repro as a test, along with the flags above on the cmd line? It also looks like that prior mappings were added without test coverage.

rnk accepted this revision.Jan 24 2022, 2:16 PM

lgtm

I think the plan is to reland the feature, so we'll have test coverage for this soon enough.

This revision is now accepted and ready to land.Jan 24 2022, 2:16 PM
mstorsjo updated this revision to Diff 402664.Jan 24 2022, 2:27 PM

Add a testcase.

The feature can still be enabled with -mllvm -experimental-debug-variable-locations=true, so D116821 wasn't completely reverted.

Why not adding your initial bug repro as a test, along with the flags above on the cmd line? It also looks like that prior mappings were added without test coverage.

Ok, I made such a testcase. I'm a bit afraid that it might be a little brittle in the long run though...

aganea accepted this revision.Jan 24 2022, 3:25 PM

The feature can still be enabled with -mllvm -experimental-debug-variable-locations=true, so D116821 wasn't completely reverted.
(l
Why not adding your initial bug repro as a test, along with the flags above on the cmd line? It also looks like that prior mappings were added without test coverage.

Ok, I made such a testcase. I'm a bit afraid that it might be a little brittle in the long run though...

I was simply surprised that a such simple testcase wasn't catched elsewhere. Could you please explain 'brittle'? Do you think the outcome of this test isn't stable in the long run?
In any case LGTM.
I'll let the choice (to add a test or not) to your discretion ;-) I felt that it could make you loose time again later down the line...

I think the plan is to reland the feature, so we'll have test coverage for this soon enough.

I was under the impression that the discussions in D11681 were revolving around resources not correctness?

The feature can still be enabled with -mllvm -experimental-debug-variable-locations=true, so D116821 wasn't completely reverted.
(l
Why not adding your initial bug repro as a test, along with the flags above on the cmd line? It also looks like that prior mappings were added without test coverage.

Ok, I made such a testcase. I'm a bit afraid that it might be a little brittle in the long run though...

I was simply surprised that a such simple testcase wasn't catched elsewhere. Could you please explain 'brittle'? Do you think the outcome of this test isn't stable in the long run?
In any case LGTM.
I'll let the choice (to add a test or not) to your discretion ;-) I felt that it could make you loose time again later down the line...

Brittle, in the sense that it depends on all the internal machinery, whether this input piece of code actually produces the debug info we want to test. (Up until recently, it didn't, and now it does with a flag only.) I mean, it would be more robust if I'd take the intermediate output from a stage when everything has been settled about what debug info to produce, and then only produce codeview debug info out of it. I.e. at a point where the input specifically says "debug info for X86::ST0". But then on the other hand, that test would pretty much just test whether X86::ST0 is include in the table too.

So I guess this is fine - and in case the test causes problems later, we can reconsider if it has to be kept or not.

This revision was landed with ongoing or failed builds.Jan 25 2022, 12:10 AM
This revision was automatically updated to reflect the committed changes.