[all-commits] [llvm/llvm-project] cef126: [OMPIRBuilder] Simplify error handling while emitt...
Sergio Afonso via All-commits
all-commits at lists.llvm.org
Fri Jan 10 07:44:26 PST 2025
Branch: refs/heads/users/skatrak/target-codegen-01-errors
Home: https://github.com/llvm/llvm-project
Commit: cef12697c79bf26e86aaa6388ec1a26b65345f10
https://github.com/llvm/llvm-project/commit/cef12697c79bf26e86aaa6388ec1a26b65345f10
Author: Sergio Afonso <safonsof at amd.com>
Date: 2025-01-10 (Fri, 10 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