[llvm] Opt-in flag for X86DiscriminateMemOps
authorMircea Trofin <mtrofin@google.com>
Fri, 25 Jan 2019 21:49:54 +0000 (21:49 +0000)
committerMircea Trofin <mtrofin@google.com>
Fri, 25 Jan 2019 21:49:54 +0000 (21:49 +0000)
commit519f42d914cce404febe6e619c8213588cb68730
tree715a50080af218be14361921e854f09f04360515
parent90bcfaa2a065bb43b2994c3eb3fa5775ef319e84
[llvm] Opt-in flag for X86DiscriminateMemOps

Summary:
Currently, if an instruction with a memory operand has no debug information,
X86DiscriminateMemOps will generate one based on the first line of the
enclosing function, or the last seen debug info.

This may cause confusion in certain debugging scenarios. The long term
approach would be to use the line number '0' in such cases, however, that
brings in challenges: the base discriminator value range is limited
(4096 values).

For the short term, adding an opt-in flag for this feature.

See bug 40319 (https://bugs.llvm.org/show_bug.cgi?id=40319)

Reviewers: dblaikie, jmorse, gbedwell

Reviewed By: dblaikie

Subscribers: aprantl, eraman, hiraditya

Differential Revision: https://reviews.llvm.org/D57257

llvm-svn: 352246
llvm/lib/Target/X86/X86DiscriminateMemOps.cpp
llvm/lib/Target/X86/X86InsertPrefetch.cpp
llvm/test/CodeGen/X86/discriminate-mem-ops.ll
llvm/test/CodeGen/X86/insert-prefetch-inline.ll
llvm/test/CodeGen/X86/insert-prefetch-invalid-instr.ll
llvm/test/CodeGen/X86/insert-prefetch.ll