[all-commits] [llvm/llvm-project] 364cd4: [OMPIRBuilder] Simplify error handling while emitt...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Tue Jan 14 06:11:46 PST 2025
Branch: refs/heads/users/skatrak/target-codegen-01-errors
Home: https://github.com/llvm/llvm-project
Commit: 364cd46360d7a5d2a79ae9bf516f23c4840ff09b
https://github.com/llvm/llvm-project/commit/364cd46360d7a5d2a79ae9bf516f23c4840ff09b
Author: Sergio Afonso <safonsof at amd.com>
Date: 2025-01-14 (Tue, 14 Jan 2025)
Changed paths:
M llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Log Message:
-----------
[OMPIRBuilder] Simplify error handling while emitting target calls, NFC
The OMPIRBuilder uses `llvm::Error`s to allow callbacks passed to it to signal
errors and prevent OMPIRBuilder functions to continue after one has been
triggered. This means that OMPIRBuilder functions taking callbacks needs to be
able to forward these errors, which must always be checked.
However, in cases where these functions are called from within the OMPIRBuilder
with callbacks also defined inside of it, it can be known in advance that no
errors will be produced. This is the case of those defined in `emitTargetCall`.
This patch introduces calls to the `cantFail` function instead of the previous
superfluous checks that still assumed calls wouldn't fail, making these
assumptions more obvious and simplifying their implementation.
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