[all-commits] [llvm/llvm-project] ab5de9: [NFC][X86][ISel] Remove the unused assert (#133029)
Ningning Shi(史宁宁) via All-commits
all-commits at lists.llvm.org
Tue Mar 25 23:42:49 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: ab5de9af4c00cecf166be51f3e93df2762692788
https://github.com/llvm/llvm-project/commit/ab5de9af4c00cecf166be51f3e93df2762692788
Author: Ningning Shi(史宁宁) <shiningning at iscas.ac.cn>
Date: 2025-03-26 (Wed, 26 Mar 2025)
Changed paths:
M llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Log Message:
-----------
[NFC][X86][ISel] Remove the unused assert (#133029)
The condition of assert is always true, so just remove it.
OptForMinSize means hasMinSize(), which is
hasFnAttribute(Attribute::MinSize).
hasOptSize() is hasFnAttribute(Attribute::OptimizeForSize) ||
hasMinSize().
So, '!hasMinSize() || hasFnAttribute(Attribute::OptimizeForSize) ||
hasMinSize()' is awalys true.
---------------------------------
llvm/include/llvm/IR/Function.h
```
/// Optimize this function for minimum size (-Oz).
bool hasMinSize() const { return hasFnAttribute(Attribute::MinSize); }
/// Optimize this function for size (-Os) or minimum size (-Oz).
bool hasOptSize() const {
return hasFnAttribute(Attribute::OptimizeForSize) || hasMinSize();
}
```
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list