diff options
author | aengelke <engelke@in.tum.de> | 2024-05-19 16:39:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-19 16:39:19 +0200 |
commit | 9e4ef0dee18c0c99325e8d56f16c149020e89d37 (patch) | |
tree | 190b2d879ec3785ecda363bc098605f7173f3d7c /llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | |
parent | 0c7d268ba72767b70c7bf0bc8ae6422c509f94d8 (diff) | |
download | llvm-9e4ef0dee18c0c99325e8d56f16c149020e89d37.zip llvm-9e4ef0dee18c0c99325e8d56f16c149020e89d37.tar.gz llvm-9e4ef0dee18c0c99325e8d56f16c149020e89d37.tar.bz2 |
[CodeGen][SDAG] Track returntwice in lowering info (#92640)
This saves an extra iteration over the all instructions of the function.
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 35f8402..de22d23 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -214,6 +214,10 @@ void FunctionLoweringInfo::set(const Function &fn, MachineFunction &mf, if (CI->isMustTailCall() && Fn->isVarArg()) MF->getFrameInfo().setHasMustTailInVarArgFunc(true); } + + // Determine if there is a call to setjmp in the machine function. + if (Call->hasFnAttr(Attribute::ReturnsTwice)) + MF->setExposesReturnsTwice(true); } // Mark values used outside their block as exported, by allocating |