Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hpvm-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
llvm
hpvm-release
Commits
683cec5d
Commit
683cec5d
authored
5 years ago
by
Akash Kothari
Browse files
Options
Downloads
Patches
Plain Diff
Updated Debug macro header file for LLVM-9 and use for HPVM
parent
94fc868d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
hpvm/llvm_patches/include/Support/Debug.h
+43
-19
43 additions, 19 deletions
hpvm/llvm_patches/include/Support/Debug.h
with
43 additions
and
19 deletions
hpvm/llvm_patches/include/Support/Debug.h
+
43
−
19
View file @
683cec5d
//===- llvm/Support/Debug.h - Easy way to add debug output ------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
...
...
@@ -11,17 +10,18 @@
// code, without it being enabled all of the time, and without having to add
// command line options to enable it.
//
// In particular, just wrap your code with the DEBUG() macro, and it will
be
// enabled automatically if you specify '-debug' on the command-line.
// DEBUG() requires the DEBUG_TYPE macro to be defined. Set it to "foo"
specify
// that your debug code belongs to class "foo". Be careful that you only
do
// this after including Debug.h and not around any #include of headers.
Headers
// should define and undef the macro acround the code that needs to use
the
// DEBUG() macro. Then, on the command line, you can specify
'-debug-only=foo'
// to enable JUST the debug information for the foo class.
// In particular, just wrap your code with the
LLVM_
DEBUG() macro, and it will
//
be
enabled automatically if you specify '-debug' on the command-line.
//
LLVM_
DEBUG() requires the DEBUG_TYPE macro to be defined. Set it to "foo"
//
specify
that your debug code belongs to class "foo". Be careful that you only
//
do
this after including Debug.h and not around any #include of headers.
//
Headers
should define and undef the macro acround the code that needs to use
//
the LLVM_
DEBUG() macro. Then, on the command line, you can specify
//
'-debug-only=foo'
to enable JUST the debug information for the foo class.
//
// When compiling without assertions, the -debug-* options and all code in
// DEBUG() statements disappears, so it does not affect the runtime of the code.
// LLVM_DEBUG() statements disappears, so it does not affect the runtime of the
// code.
//
//===----------------------------------------------------------------------===//
...
...
@@ -33,11 +33,6 @@ namespace llvm {
class
raw_ostream
;
#ifndef NDEBUG
/// DebugFlag - This boolean is set to true if the '-debug' command line option
/// is specified. This should probably not be referenced directly, instead, use
/// the DEBUG macro below.
///
extern
bool
DebugFlag
;
/// isCurrentDebugType - Return true if the specified string is the debug type
/// specified on the command line, or if none was specified on the command line
...
...
@@ -77,6 +72,33 @@ void setCurrentDebugTypes(const char **Types, unsigned Count);
#define DEBUG_WITH_TYPE(TYPE, X) do { } while (false)
#endif
/// This boolean is set to true if the '-debug' command line option
/// is specified. This should probably not be referenced directly, instead, use
/// the DEBUG macro below.
///
extern
bool
DebugFlag
;
/// \name Verification flags.
///
/// These flags turns on/off that are expensive and are turned off by default,
/// unless macro EXPENSIVE_CHECKS is defined. The flags allow selectively
/// turning the checks on without need to recompile.
/// \{
/// Enables verification of dominator trees.
///
extern
bool
VerifyDomInfo
;
/// Enables verification of loop info.
///
extern
bool
VerifyLoopInfo
;
/// Enables verification of MemorySSA.
///
extern
bool
VerifyMemorySSA
;
///\}
/// EnableDebugBuffering - This defaults to false. If true, the debug
/// stream will install signal handlers to dump any buffered debug
/// output. It allows clients to selectively allow the debug stream
...
...
@@ -95,8 +117,10 @@ raw_ostream &dbgs();
// debug build, then the code specified as the option to the macro will be
// executed. Otherwise it will not be. Example:
//
// DEBUG(dbgs() << "Bitset contains: " << Bitset << "\n");
//
LLVM_
DEBUG(dbgs() << "Bitset contains: " << Bitset << "\n");
//
#define LLVM_DEBUG(X) DEBUG_WITH_TYPE(DEBUG_TYPE, X)
#define DEBUG(X) DEBUG_WITH_TYPE(DEBUG_TYPE, X)
}
// end namespace llvm
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment