[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-18 Thread Mehdi Amini via cfe-commits
@@ -1872,7 +1872,8 @@ example: passes make choices that keep the code size of this function as small as possible and perform optimizations that may sacrifice runtime performance in order to minimize the size of the generated code. -This attribute is incompatible

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer closed https://github.com/llvm/llvm-project/pull/66632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/66632 >From eccff5693ebcaac45a7ddf56cbb33a48de281041 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Mon, 18 Sep 2023 09:59:11 +0100 Subject: [PATCH 1/3] [LLVM] Add new attribute `optdebug` to optimize for debuggin

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-13 Thread Stephen Tozer via cfe-commits
SLTozer wrote: > looks good - a few bits should be committed separately from this change, so > please do those first and then commit this change Separate review opened up at: https://github.com/llvm/llvm-project/pull/68967 For simplicity's sake I'll keep this patch as-is, and rebase it when th

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-12 Thread David Blaikie via cfe-commits
@@ -2028,6 +2030,8 @@ example: This attribute suggests that optimization passes and code generator passes should make choices that try to preserve debug info without significantly degrading runtime performance. +This attribute is incompatible with the ``minsize`

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-12 Thread David Blaikie via cfe-commits
@@ -1085,6 +1085,7 @@ The integer codes are mapped to well-known attributes as follows. * code 77: ``elementtype`` * code 78: ``disable_sanitizer_instrumentation`` * code 79: ``nosanitize_bounds`` +* code 88: ``optdebug`` dwblaikie wrote: This could/should be

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-12 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie approved this pull request. looks good - a few bits should be committed separately from this change, so please do those first and then commit this change https://github.com/llvm/llvm-project/pull/66632 ___ cfe-commits mail

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-12 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie edited https://github.com/llvm/llvm-project/pull/66632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-12 Thread Stephen Tozer via cfe-commits
SLTozer wrote: Small ping - all comments have now been addressed now I think. https://github.com/llvm/llvm-project/pull/66632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-10-12 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/66632 >From 18f494a4006b4c21b364a91107d4a07ceaf88213 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Mon, 18 Sep 2023 09:59:11 +0100 Subject: [PATCH 1/3] [LLVM] Add new attribute `optdebug` to optimize for debuggin

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-21 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer updated https://github.com/llvm/llvm-project/pull/66632 >From 18f494a4006b4c21b364a91107d4a07ceaf88213 Mon Sep 17 00:00:00 2001 From: Stephen Tozer Date: Mon, 18 Sep 2023 09:59:11 +0100 Subject: [PATCH 1/2] [LLVM] Add new attribute `optdebug` to optimize for debuggin

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-20 Thread Arthur Eubanks via cfe-commits
@@ -1085,6 +1085,7 @@ The integer codes are mapped to well-known attributes as follows. * code 77: ``elementtype`` * code 78: ``disable_sanitizer_instrumentation`` * code 79: ``nosanitize_bounds`` +* code 88: ``optdebug`` aeubanks wrote: if you're going to up

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-20 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I think typically the verifier changes are done in the same change since they match the LangRef change, but it doesn't matter too much as long as it gets sdone. The LangRef change should also mention the attributes this is incompatible with (like `optnone`'s description) http

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-20 Thread Stephen Tozer via cfe-commits
SLTozer wrote: Making this attribute mutually exclusive with `optdebug` and `optsize` is fine with me - as a question for the esteemed reviewers of this patch, would it be preferred to add this exclusivity and associated verifier checks in a separate patch, or as part of this patch? https://g

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-19 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: And same with `optsize`/`minsize` since those explicitly want as many simplifications as possible which conflicts with `optdebug` https://github.com/llvm/llvm-project/pull/66632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-19 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > Are there interactions between `optdebug` and other attributes that should be > enforced by the verifier? Like, can't be mixed with `optnone`? +1, this is basically "I want `-O1`" vs "I want `-O0`" so they must conflict https://github.com/llvm/llvm-project/pull/66632

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-19 Thread Paul T Robinson via cfe-commits
pogo59 wrote: Are there interactions between `optdebug` and other attributes that should be enforced by the verifier? Like, can't be mixed with `optnone`? https://github.com/llvm/llvm-project/pull/66632 ___ cfe-commits mailing list cfe-commits@lists.l

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-19 Thread Stephen Tozer via cfe-commits
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::Naked); // OptimizeNone wins over OptimizeForSize and MinSize. +F->removeFnAttr(llvm::Attribute::OptimizeForDebugging); --

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread David Blaikie via cfe-commits
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::Naked); // OptimizeNone wins over OptimizeForSize and MinSize. +F->removeFnAttr(llvm::Attribute::OptimizeForDebugging); --

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread Paul T Robinson via cfe-commits
@@ -2325,6 +2325,7 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::Naked); // OptimizeNone wins over OptimizeForSize and MinSize. +F->removeFnAttr(llvm::Attribute::OptimizeForDebugging); --

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-debuginfo Changes 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

[clang] [LLVM] Add new attribute `optdebug` to optimize for debugging (PR #66632)

2023-09-18 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer created https://github.com/llvm/llvm-project/pull/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 ad