@@ -0,0 +1,114 @@
+# Key Instructions debug info in LLVM
+
+Key Instructions reduces the jumpiness of optimized code debug stepping. This
document explains the feature and how it is implemented in LLVM. For Clang
support please see the [Clang docs](../../clang/docs/KeyInstructio
@@ -0,0 +1,114 @@
+# Key Instructions debug info in LLVM
+
+Key Instructions reduces the jumpiness of optimized code debug stepping. This
document explains the feature and how it is implemented in LLVM. For Clang
support please see the [Clang docs](../../clang/docs/KeyInstructio
@@ -0,0 +1,114 @@
+# Key Instructions debug info in LLVM
+
+Key Instructions reduces the jumpiness of optimized code debug stepping. This
document explains the feature and how it is implemented in LLVM. For Clang
support please see the [Clang docs](../../clang/docs/KeyInstructio
@@ -0,0 +1,46 @@
+# Key Instructions in Clang
+
+Key Instructions is an LLVM feature that reduces the jumpiness of optimized
code debug stepping. This document explains how Clang applies the necessary
metadata.
+
+## Implementation
+
+See the [LLVM docs](../../llvm/docs/KeyInstr
@@ -0,0 +1,114 @@
+# Key Instructions debug info in LLVM
+
+Key Instructions reduces the jumpiness of optimized code debug stepping. This
document explains the feature and how it is implemented in LLVM. For Clang
support please see the [Clang docs](../../clang/docs/KeyInstructio
@@ -0,0 +1,114 @@
+# Key Instructions debug info in LLVM
+
+Key Instructions reduces the jumpiness of optimized code debug stepping. This
document explains the feature and how it is implemented in LLVM. For Clang
support please see the [Clang docs](../../clang/docs/KeyInstructio
@@ -102,6 +103,10 @@ Clang
:doc:`CFIVerify`
A description of the verification tool for Control Flow Integrity.
+:doc: `KeyInstructionsClang`
jryans wrote:
Does this render correctly as a link to your page...? None of the other lines
have a space between `:
@@ -0,0 +1,114 @@
+# Key Instructions debug info in LLVM
+
+Key Instructions reduces the jumpiness of optimized code debug stepping. This
document explains the feature and how it is implemented in LLVM. For Clang
support please see the [Clang docs](../../clang/docs/KeyInstructio
@@ -0,0 +1,114 @@
+# Key Instructions debug info in LLVM
+
+Key Instructions reduces the jumpiness of optimized code debug stepping. This
document explains the feature and how it is implemented in LLVM. For Clang
support please see the [Clang docs](../../clang/docs/KeyInstructio
@@ -0,0 +1,114 @@
+# Key Instructions debug info in LLVM
+
+Key Instructions reduces the jumpiness of optimized code debug stepping. This
document explains the feature and how it is implemented in LLVM. For Clang
support please see the [Clang docs](../../clang/docs/KeyInstructio
@@ -187,6 +192,10 @@ Optimizations
This is a migration guide describing how to move from debug info using
intrinsics such as dbg.value to using the non-instruction DbgRecord object.
+:doc: `KeyInstructionsDebugInfo`
jryans wrote:
Same question about the
https://github.com/jryans commented:
Overall, looks good. Most of my comments are stylistic nits.
I do think it's important to link to this new feature from the "how to updated
debug info" page, as without that, pass writers (esp. in the future) are quite
unlikely to know they need to do some
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/137991
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
jryans wrote:
IIRC, there are still some open review threads in this PR, mainly related to
reducing duplication in the symbolication bits.
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:/
https://github.com/jryans approved this pull request.
New docs look good, thanks for working on this!
Yes, the value is quite clear indeed. :smile:
https://github.com/llvm/llvm-project/pull/107279
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/jryans approved this pull request.
This part looks good to me, thanks for working on this! 😄
https://github.com/llvm/llvm-project/pull/107279
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
@@ -22,6 +23,67 @@ namespace llvm {
class LLVMContext;
class raw_ostream;
class DILocation;
+ class Function;
+
+#if ENABLE_DEBUGLOC_COVERAGE_TRACKING
+ // Used to represent different "kinds" of DebugLoc, expressing that a
DebugLoc
+ // is either ordinary, containing
https://github.com/jryans approved this pull request.
This part looks good overall, thanks for working on this! 😄
One small note inline below.
https://github.com/llvm/llvm-project/pull/108214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/108214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -90,12 +90,23 @@ class IRBuilderCallbackInserter : public
IRBuilderDefaultInserter {
/// Common base class shared among various IRBuilders.
class IRBuilderBase {
/// Pairs of (metadata kind, MDNode *) that should be added to all newly
- /// created instructions, like !db
@@ -1279,6 +1279,9 @@ void Instruction::swapProfMetadata() {
void Instruction::copyMetadata(const Instruction &SrcInst,
ArrayRef WL) {
+ if (WL.empty() || is_contained(WL, LLVMContext::MD_dbg))
+setDebugLoc(SrcInst.getDebugLoc());
--
@@ -48,22 +64,29 @@ namespace llvm {
Temporary
};
- // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify
- // to ignore intentionally-empty DebugLocs.
- class DILocAndCoverageTracking : public TrackingMDNodeRef {
+ // Extends TrackingMDNodeRef
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0,
void **StackTrace,
return true;
}
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+void sys::symbolizeAddresses(AddressSet &Addresses,
+ SymbolizedAddressMap &SymbolizedAddresses)
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -487,14 +490,15 @@ def Main():
if bugs_metadata == "DILocation":
try:
+origin = bug["origin"]
action = bug["action"]
bb_name = bug["bb-name"]
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -115,6 +138,23 @@ namespace llvm {
DebugLocKind getKind() const { return Loc.Kind; }
#endif
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+#if !ENABLE_DEBUGLOC_COVERAGE_TRACKING
+#error Cannot enable DebugLoc origin-tracking without coverage-tracking!
+#endif
jr
@@ -22,6 +23,67 @@ namespace llvm {
class LLVMContext;
class raw_ostream;
class DILocation;
+ class Function;
+
+#if ENABLE_DEBUGLOC_COVERAGE_TRACKING
+ // Used to represent different "kinds" of DebugLoc, expressing that a
DebugLoc
+ // is either ordinary, containing
@@ -48,22 +64,29 @@ namespace llvm {
Temporary
};
- // Extends TrackingMDNodeRef to also store a DebugLocKind, allowing Debugify
- // to ignore intentionally-empty DebugLocs.
- class DILocAndCoverageTracking : public TrackingMDNodeRef {
+ // Extends TrackingMDNodeRef
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0,
void **StackTrace,
return true;
}
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+void sys::symbolizeAddresses(AddressSet &Addresses,
+ SymbolizedAddressMap &SymbolizedAddresses)
@@ -115,6 +138,23 @@ namespace llvm {
DebugLocKind getKind() const { return Loc.Kind; }
#endif
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+#if !ENABLE_DEBUGLOC_COVERAGE_TRACKING
+#error Cannot enable DebugLoc origin-tracking without coverage-tracking!
+#endif
jr
@@ -487,14 +490,15 @@ def Main():
if bugs_metadata == "DILocation":
try:
+origin = bug["origin"]
action = bug["action"]
bb_name = bug["bb-name"]
@@ -28,6 +31,11 @@
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/JSON.h"
#include
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+// We need the Signals header to operate on stacktraces if we're using DebugLoc
jryans wrote:
stacktrace -> stack trace
http
@@ -253,6 +253,122 @@ static bool printSymbolizedStackTrace(StringRef Argv0,
void **StackTrace,
return true;
}
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+void sys::symbolizeAddresses(AddressSet &Addresses,
+ SymbolizedAddressMap &SymbolizedAddresses)
@@ -50,11 +50,15 @@ class TargetRegisterInfo;
class MergePotentialsElt {
unsigned Hash;
MachineBasicBlock *Block;
- DebugLoc BranchDebugLoc;
+ // We use MDNode rather than DebugLoc here because under certain CMake
+ // options*, DebugLoc may conta
@@ -1279,6 +1279,9 @@ void Instruction::swapProfMetadata() {
void Instruction::copyMetadata(const Instruction &SrcInst,
ArrayRef WL) {
+ if (WL.empty() || is_contained(WL, LLVMContext::MD_dbg))
+setDebugLoc(SrcInst.getDebugLoc());
--
@@ -55,6 +73,28 @@ namespace sys {
///specified, the entire frame is printed.
void PrintStackTrace(raw_ostream &OS, int Depth = 0);
+#if ENABLE_DEBUGLOC_ORIGIN_TRACKING
+#ifdef NDEBUG
+#error DebugLoc origin-tracking should not be enabled in Release builds.
+#endif
https://github.com/jryans requested changes to this pull request.
More exciting work! 😄 Seems roughly sensible, but appears to duplicate some
code that can hopefully be shared.
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing l
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/107369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -22,6 +23,67 @@ namespace llvm {
class LLVMContext;
class raw_ostream;
class DILocation;
+ class Function;
+
+#if ENABLE_DEBUGLOC_COVERAGE_TRACKING
+ // Used to represent different "kinds" of DebugLoc, expressing that a
DebugLoc
+ // is either ordinary, containing
@@ -11,6 +11,22 @@
#include "llvm/IR/DebugInfo.h"
using namespace llvm;
+#if ENABLE_DEBUGLOC_COVERAGE_TRACKING
+DILocAndCoverageTracking::DILocAndCoverageTracking(const DILocation *L)
+: TrackingMDNodeRef(const_cast(L)),
+ Kind(DebugLocKind::Normal) {}
+
+DebugLoc Deb
@@ -2080,6 +2081,10 @@ void DwarfDebug::beginInstruction(const MachineInstr
*MI) {
}
if (!DL) {
+// FIXME: We could assert that `DL.getKind() != DebugLocKind::Temporary`
+// here, or otherwise record any temporary DebugLocs seen to ensure that
+// transient co
https://github.com/jryans commented:
Looks good overall, a few comments inline.
Thanks for working on this feature, I believe this will be quite useful! 😄
https://github.com/llvm/llvm-project/pull/107279
___
cfe-commits mailing list
cfe-commits@list
https://github.com/jryans edited
https://github.com/llvm/llvm-project/pull/107279
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans approved this pull request.
Thanks for clarifying the pre-script fixes. With that resolved, this looks good
to me.
https://github.com/llvm/llvm-project/pull/91724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https:
https://github.com/jryans commented:
Overall, your process looks good to me! Thanks for working on this and
including such a detailed description. This will surely aid downstream
maintainers. 😄
There's one part I did not fully understand. How did you identify the
"pre-script fixups"? What's
jryans wrote:
It would be great to add a few notes to document this additional op in the
[`DIExpression` list of ops](https://llvm.org/docs/LangRef.html#diexpression).
It would be especially good for those added docs to clarify the difference
between this and `DW_OP_LLVM_fragment`. (I do under
https://github.com/jryans approved this pull request.
https://github.com/llvm/llvm-project/pull/90882
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans commented:
AIUI, this is straightforward case of updating tools to use new option names. I
suppose there is a chance it triggers failures in e.g. older linkers that don't
support the newer names, but I assume on Apple platforms there's less risk of
that anyway.
Do yo
jryans wrote:
Perhaps good to edit the PR title, it mentions the same flag twice at the
moment.
https://github.com/llvm/llvm-project/pull/88810
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe
https://github.com/jryans approved this pull request.
Thanks, seems like a fine temporary measure to me! 😄
https://github.com/llvm/llvm-project/pull/73626
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/l
https://github.com/jryans approved this pull request.
> This patch makes sure we encode the constant in a `DIExpression` on
> definitions, which is tested. And we have tests for ensuring that
> `DW_OP_constu` expressions get turned into `DW_AT_const_value`s (I know of at
> least `llvm/test/Deb
@@ -5503,11 +5516,17 @@ void
CGDebugInfo::EmitGlobalVariable(llvm::GlobalVariable *Var,
}
AppendAddressSpaceXDeref(AddressSpace, Expr);
+llvm::DIExpression *E = nullptr;
+if (Expr.empty()) {
+ if (auto const *InitVal = evaluateConstantInitializer(D))
+
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/72730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans commented:
Overall this looks good, thanks!
I think we may want to add a test to check that the output DWARF has a const
value in the expected place, since consumers are relying on it.
https://github.com/llvm/llvm-project/pull/72730
___
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans approved this pull request.
Looks good to me, thanks! 😄
Other reviewers had more comments last time around, so probably best to wait
for at least one more review before landing.
https://github.com/llvm/llvm-project/pull/66745
_
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jryans edited https://github.com/llvm/llvm-project/pull/66745
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Author: J. Ryan Stinnett
Date: 2023-08-08T12:44:48+01:00
New Revision: 241cceb9af844ef7d7a87124407a04b0a64991fe
URL:
https://github.com/llvm/llvm-project/commit/241cceb9af844ef7d7a87124407a04b0a64991fe
DIFF:
https://github.com/llvm/llvm-project/commit/241cceb9af844ef7d7a87124407a04b0a64991fe.di
Author: Caleb Zulawski
Date: 2023-01-18T18:20:59Z
New Revision: ecade80d93960ad01d8665db02c23841e055a80f
URL:
https://github.com/llvm/llvm-project/commit/ecade80d93960ad01d8665db02c23841e055a80f
DIFF:
https://github.com/llvm/llvm-project/commit/ecade80d93960ad01d8665db02c23841e055a80f.diff
LOG
Author: jryans
Date: Thu May 30 09:46:22 2019
New Revision: 362113
URL: http://llvm.org/viewvc/llvm-project?rev=362113&view=rev
Log:
[Docs] Modernize references to macOS
Summary:
This updates all places in documentation that refer to "Mac OS X", "OS X", etc.
to instead use the modern name "macOS"
Author: jryans
Date: Thu May 30 09:46:22 2019
New Revision: 362113
URL: http://llvm.org/viewvc/llvm-project?rev=362113&view=rev
Log:
[Docs] Modernize references to macOS
Summary:
This updates all places in documentation that refer to "Mac OS X", "OS X", etc.
to instead use the modern name "macOS"
68 matches
Mail list logo