diff options
| author | Stephen Tozer <stephen.tozer@sony.com> | 2023-10-18 16:32:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-18 16:32:06 +0100 |
| commit | df3478e480b3b2e9fe125697b7931dc48b09e450 (patch) | |
| tree | 070696284555e678a96d360b2235bf6825181b7c /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
| parent | d0e8f3321e0a5bdf099c1ec2bc3351b2e04865c9 (diff) | |
| download | llvm-df3478e480b3b2e9fe125697b7931dc48b09e450.zip llvm-df3478e480b3b2e9fe125697b7931dc48b09e450.tar.gz llvm-df3478e480b3b2e9fe125697b7931dc48b09e450.tar.bz2 | |
[LLVM] Add new attribute `optdebug` to optimize for debugging (#66632)
This patch adds a new fn attribute, `optdebug`, that specifies that
optimizations should make decisions that prioritize debug info quality,
potentially at the cost of runtime performance.
This patch does not add any functional changes triggered by this
attribute, only the attribute itself. A subsequent patch will use this
flag to disable the post-RA scheduler.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
| -rw-r--r-- | llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp index e991d05..c427459 100644 --- a/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -747,6 +747,8 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) { return bitc::ATTR_KIND_NO_SANITIZE_COVERAGE; case Attribute::NullPointerIsValid: return bitc::ATTR_KIND_NULL_POINTER_IS_VALID; + case Attribute::OptimizeForDebugging: + return bitc::ATTR_KIND_OPTIMIZE_FOR_DEBUGGING; case Attribute::OptForFuzzing: return bitc::ATTR_KIND_OPT_FOR_FUZZING; case Attribute::OptimizeForSize: |
