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/Reader/BitcodeReader.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/Reader/BitcodeReader.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 1d1ec98..16eafa6 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -1980,6 +1980,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) { return Attribute::NoSanitizeCoverage; case bitc::ATTR_KIND_NULL_POINTER_IS_VALID: return Attribute::NullPointerIsValid; + case bitc::ATTR_KIND_OPTIMIZE_FOR_DEBUGGING: + return Attribute::OptimizeForDebugging; case bitc::ATTR_KIND_OPT_FOR_FUZZING: return Attribute::OptForFuzzing; case bitc::ATTR_KIND_OPTIMIZE_FOR_SIZE: |