We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16cbb2f commit 328ce32Copy full SHA for 328ce32
llvm/lib/IR/Instruction.cpp
@@ -1092,12 +1092,11 @@ bool Instruction::mayThrow(bool IncludePhaseOneUnwind) const {
1092
}
1093
1094
bool Instruction::mayHaveSideEffects() const {
1095
- // Do not optimize functions have the 'NoInline' attribute.
+ // Lambda function to check 'NoInline' attribute.
1096
auto hasNoInline = [](const Instruction &I) -> bool {
1097
if (const CallOrInvokeInst *CI = dyn_cast<CallOrInvokeInst>(&I)) {
1098
- if (CI->getCalledFunction() &&
1099
- CI->getCalledFunction()->hasFnAttribute(Attribute::NoInline)) {
1100
- return true;
+ if (CI->getCalledFunction()) {
+ return CI->getCalledFunction()->hasFnAttribute(Attribute::NoInline);
1101
1102
1103
return false;
0 commit comments