[Mlir-commits] [mlir] [MLIR][LLVMIR][DLTI] Pass to update #llvm.target's features per relevant backend (PR #154938)

Rolf Morel llvmlistbot at llvm.org
Sat Aug 23 08:57:50 PDT 2025


================
@@ -403,6 +403,20 @@ ModuleFlagAttr::verify(function_ref<InFlightDiagnostic()> emitError,
                      << key << "'";
 }
 
+FailureOr<Attribute> TargetFeaturesAttr::query(DataLayoutEntryKey key) {
+  if (auto stringKey = dyn_cast<StringAttr>(key)) {
----------------
rolfmorel wrote:

As the `return failure()` is already right after the (single) block of the if statement, I don't think it returns earlier this way. 

Should we be returning early even in these simple cases? I applied the patch, be feel in this case it doesn't really make things better.

https://github.com/llvm/llvm-project/pull/154938


More information about the Mlir-commits mailing list