This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Address base discriminator overflow in X86DiscriminateMemOps
ClosedPublic

Authored by mtrofin on Dec 12 2018, 8:55 PM.

Details

Summary

Macros are expanded on a single line. In case of large expansions,
with sufficiently many instructions with memory operands (and when
-fdebug-info-for-profiling is requested), we may be unable to generate
new base discriminator values - new values overflow (base
discriminators may not be larger than 2^12).

This CL warns instead of asserting in such a case. A subsequent CL
will add APIs to check for overflow before creating new debug info.

See https://bugs.llvm.org/show_bug.cgi?id=39890

Diff Detail

Repository
rL LLVM

Event Timeline

mtrofin created this revision.Dec 12 2018, 8:55 PM
mtrofin edited the summary of this revision. (Show Details)Dec 12 2018, 8:58 PM
mtrofin added reviewers: wmi, gbedwell.
davidxl accepted this revision.Dec 13 2018, 11:41 AM
This revision is now accepted and ready to land.Dec 13 2018, 11:41 AM
This revision was automatically updated to reflect the committed changes.