summaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CodeGenOptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend/CodeGenOptions.h')
-rw-r--r--include/clang/Frontend/CodeGenOptions.h53
1 files changed, 47 insertions, 6 deletions
diff --git a/include/clang/Frontend/CodeGenOptions.h b/include/clang/Frontend/CodeGenOptions.h
index 86aabf7b95ec..3d532cea3431 100644
--- a/include/clang/Frontend/CodeGenOptions.h
+++ b/include/clang/Frontend/CodeGenOptions.h
@@ -16,6 +16,7 @@
#include <string>
#include <vector>
+#include "llvm/Support/Regex.h"
namespace clang {
@@ -50,12 +51,27 @@ public:
};
enum DebugInfoKind {
- NoDebugInfo, // Don't generate debug info.
- DebugLineTablesOnly, // Emit only debug info necessary for generating
- // line number tables (-gline-tables-only).
- LimitedDebugInfo, // Limit generated debug info to reduce size
- // (-flimit-debug-info).
- FullDebugInfo // Generate complete debug info.
+ NoDebugInfo, /// Don't generate debug info.
+
+ LocTrackingOnly, /// Emit location information but do not generate
+ /// debug info in the output. This is useful in
+ /// cases where the backend wants to track source
+ /// locations for instructions without actually
+ /// emitting debug info for them (e.g., when -Rpass
+ /// is used).
+
+ DebugLineTablesOnly, /// Emit only debug info necessary for generating
+ /// line number tables (-gline-tables-only).
+
+ LimitedDebugInfo, /// Limit generated debug info to reduce size
+ /// (-fno-standalone-debug). This emits
+ /// forward decls for types that could be
+ /// replaced with forward decls in the source
+ /// code. For dynamic C++ classes type info
+ /// is only emitted int the module that
+ /// contains the classe's vtable.
+
+ FullDebugInfo /// Generate complete debug info.
};
enum TLSModel {
@@ -134,6 +150,31 @@ public:
/// Name of the profile file to use with -fprofile-sample-use.
std::string SampleProfileFile;
+ /// Name of the profile file to use as input for -fprofile-instr-use
+ std::string InstrProfileInput;
+
+ /// Regular expression to select optimizations for which we should enable
+ /// optimization remarks. Transformation passes whose name matches this
+ /// expression (and support this feature), will emit a diagnostic
+ /// whenever they perform a transformation. This is enabled by the
+ /// -Rpass=regexp flag.
+ std::shared_ptr<llvm::Regex> OptimizationRemarkPattern;
+
+ /// Regular expression to select optimizations for which we should enable
+ /// missed optimization remarks. Transformation passes whose name matches this
+ /// expression (and support this feature), will emit a diagnostic
+ /// whenever they tried but failed to perform a transformation. This is
+ /// enabled by the -Rpass-missed=regexp flag.
+ std::shared_ptr<llvm::Regex> OptimizationRemarkMissedPattern;
+
+ /// Regular expression to select optimizations for which we should enable
+ /// optimization analyses. Transformation passes whose name matches this
+ /// expression (and support this feature), will emit a diagnostic
+ /// whenever they want to explain why they decided to apply or not apply
+ /// a given transformation. This is enabled by the -Rpass-analysis=regexp
+ /// flag.
+ std::shared_ptr<llvm::Regex> OptimizationRemarkAnalysisPattern;
+
public:
// Define accessors/mutators for code generation options of enumeration type.
#define CODEGENOPT(Name, Bits, Default)