Add the amendOperation override to handle CIR dialect attributes during
MLIR-to-LLVM IR translation. This dispatches to amendModule for ModuleOp,
enabling module metadata.
This PR also adds support to emit AMDGPU-specific module flags
amdhsa_code_object_version and amdgpu_printf_kind to match OGCG
behavior.
In CIRGenModule, the flags are stored as CIR module attributes:
cir.amdhsa_code_object_version (integer)
cir.amdgpu_printf_kind (string: "hostcall" or "buffered")
During lowering to LLVM IR (in LowerToLLVMIR.cpp), these attributes are
converted to LLVM module flags.
Upstreaming basic changes from clangIR PRs:
61e9ebd9f8https://github.com/llvm/clangir/pull/768https://github.com/llvm/clangir/pull/773https://github.com/llvm/clangir/pull/2100