Skip to content

Commit

Permalink
Revert "[DebugInfo][RemoveDIs] Add prototype storage classes for "new…
Browse files Browse the repository at this point in the history
…" debug-info"

And some intervening fixups. There are two remaining problems:
 * A memory leak via https://lab.llvm.org/buildbot/#/builders/236/builds/7120/steps/10/logs/stdio
 * A performance slowdown with -g where I'm not completely sure what the cause it

These might be fairly straightforwards to fix, but it's the end of the day
hear, so I figure I'll clear the buildbots til tomorrow.

This reverts commit 7d77bbe.
This reverts commit 9026f35.
This reverts commit d97b2b3.
  • Loading branch information
jmorse committed Nov 2, 2023
1 parent 495ed8d commit 957efa4
Show file tree
Hide file tree
Showing 25 changed files with 11 additions and 1,637 deletions.
53 changes: 0 additions & 53 deletions llvm/include/llvm/IR/BasicBlock.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "llvm/ADT/ilist_node.h"
#include "llvm/ADT/iterator.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/IR/DebugProgramInstruction.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/SymbolTableListTraits.h"
#include "llvm/IR/Value.h"
Expand Down Expand Up @@ -57,9 +56,6 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
public ilist_node_with_parent<BasicBlock, Function> {
public:
using InstListType = SymbolTableList<Instruction, ilist_iterator_bits<true>>;
/// Flag recording whether or not this block stores debug-info in the form
/// of intrinsic instructions (false) or non-instruction records (true).
bool IsNewDbgInfoFormat;

private:
friend class BlockAddress;
Expand All @@ -68,55 +64,6 @@ class BasicBlock final : public Value, // Basic blocks are data objects also
InstListType InstList;
Function *Parent;

public:
/// Attach a DPMarker to the given instruction. Enables the storage of any
/// debug-info at this position in the program.
DPMarker *createMarker(Instruction *I);
DPMarker *createMarker(InstListType::iterator It);

/// Convert variable location debugging information stored in dbg.value
/// intrinsics into DPMarker / DPValue records. Deletes all dbg.values in
/// the process and sets IsNewDbgInfoFormat = true. Only takes effect if
/// the UseNewDbgInfoFormat LLVM command line option is given.
void convertToNewDbgValues();

/// Convert variable location debugging information stored in DPMarkers and
/// DPValues into the dbg.value intrinsic representation. Sets
/// IsNewDbgInfoFormat = false.
void convertFromNewDbgValues();

/// Ensure the block is in "old" dbg.value format (\p NewFlag == false) or
/// in the new format (\p NewFlag == true), converting to the desired format
/// if necessary.
void setIsNewDbgInfoFormat(bool NewFlag);

/// Validate any DPMarkers / DPValues attached to instructions in this block,
/// and block-level stored data too (TrailingDPValues).
/// \p Assert Should this method fire an assertion if a problem is found?
/// \p Msg Should this method print a message to errs() if a problem is found?
/// \p OS Output stream to write errors to.
/// \returns True if a problem is found.
bool validateDbgValues(bool Assert = true, bool Msg = false,
raw_ostream *OS = nullptr);

/// Record that the collection of DPValues in \p M "trails" after the last
/// instruction of this block. These are equivalent to dbg.value intrinsics
/// that exist at the end of a basic block with no terminator (a transient
/// state that occurs regularly).
void setTrailingDPValues(DPMarker *M);

/// Fetch the collection of DPValues that "trail" after the last instruction
/// of this block, see \ref setTrailingDPValues. If there are none, returns
/// nullptr.
DPMarker *getTrailingDPValues();

/// Delete any trailing DPValues at the end of this block, see
/// \ref setTrailingDPValues.
void deleteTrailingDPValues();

void dumpDbgValues() const;

private:
void setParent(Function *parent);

/// Constructor.
Expand Down
4 changes: 0 additions & 4 deletions llvm/include/llvm/IR/DebugInfoMetadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -3765,10 +3765,6 @@ class DIArgList : public MDNode {
iterator args_begin() { return Args.begin(); }
iterator args_end() { return Args.end(); }

ReplaceableMetadataImpl *getReplaceableUses() {
return Context.getReplaceableUses();
}

static bool classof(const Metadata *MD) {
return MD->getMetadataID() == DIArgListKind;
}
Expand Down
Loading

0 comments on commit 957efa4

Please sign in to comment.