Skip to content

[BOLT][NFC] Apply absorption rule to boolean expression #91540

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 9, 2024

Conversation

SimplyDanny
Copy link
Member

Fixes #91197.

@llvmbot
Copy link
Member

llvmbot commented May 8, 2024

@llvm/pr-subscribers-bolt

Author: Danny Mösch (SimplyDanny)

Changes

Fixes #91197.


Full diff: https://github.com/llvm/llvm-project/pull/91540.diff

1 Files Affected:

  • (modified) bolt/include/bolt/Passes/IndirectCallPromotion.h (+1-1)
diff --git a/bolt/include/bolt/Passes/IndirectCallPromotion.h b/bolt/include/bolt/Passes/IndirectCallPromotion.h
index adc58d70ec0f..8ec160b867cf 100644
--- a/bolt/include/bolt/Passes/IndirectCallPromotion.h
+++ b/bolt/include/bolt/Passes/IndirectCallPromotion.h
@@ -104,7 +104,7 @@ class IndirectCallPromotion : public BinaryFunctionPass {
   struct Location {
     MCSymbol *Sym{nullptr};
     uint64_t Addr{0};
-    bool isValid() const { return Sym || (!Sym && Addr != 0); }
+    bool isValid() const { return Sym || Addr != 0; }
     Location() {}
     explicit Location(MCSymbol *Sym) : Sym(Sym) {}
     explicit Location(uint64_t Addr) : Addr(Addr) {}

Copy link
Contributor

@maksfb maksfb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Please add "[BOLT]" to the title.

@SimplyDanny SimplyDanny changed the title [NFC] Apply absorption rule to boolean expression [BOLT][NFC] Apply absorption rule to boolean expression May 9, 2024
@SimplyDanny SimplyDanny merged commit d98e3d4 into llvm:main May 9, 2024
@SimplyDanny SimplyDanny deleted the absorption-rule branch May 9, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bolt/include/bolt/Passes/IndirectCallPromotion.h:107: redundant condition ?
4 participants