Upstreaming Progress

The current upstreaming process involves migrating ClangIR from its incubator repository into the main LLVM project, ensuring it meets LLVM's coding standards and quality expectations. For extra context, see motivation and history behind ClangIR.

Checkout the list of existing issues and PRs related to upstream work. The benchmark page tracks progress in terms of passing tests compared to incubator.

More detailed tracking in terms of operations, types, attributes and passes below:

Operations

TODO: This section is under development.

Overall Progress: 48%

View Operations
  • ❌ cir.acos (::cir::ACosOp)
  • ❌ cir.asin (::cir::ASinOp)
  • ❌ cir.atan (::cir::ATanOp)
  • ❌ cir.abs (::cir::AbsOp)
  • ❌ cir.alloc.exception (::cir::AllocExceptionOp)
  • ✅ cir.alloca (::cir::AllocaOp)
  • ✅ cir.array.ctor (::cir::ArrayCtor)
  • ✅ cir.array.dtor (::cir::ArrayDtor)
  • ✅ cir.assume.aligned (::cir::AssumeAlignedOp)
  • ✅ cir.assume (::cir::AssumeOp)
  • ✅ cir.assume.separate_storage (::cir::AssumeSepStorageOp)
  • ❌ cir.atomic.cmp_xchg (::cir::AtomicCmpXchg)
  • ❌ cir.atomic.fence (::cir::AtomicFence)
  • ❌ cir.atomic.fetch (::cir::AtomicFetch)
  • ❌ cir.atomic.xchg (::cir::AtomicXchg)
  • ❌ cir.await (::cir::AwaitOp)
  • ✅ cir.base_class_addr (::cir::BaseClassAddrOp)
  • ❌ cir.base_data_member (::cir::BaseDataMemberOp)
  • ❌ cir.base_method (::cir::BaseMethodOp)
  • ✅ cir.binop (::cir::BinOp)
  • ❌ cir.binop.overflow (::cir::BinOpOverflowOp)
  • ✅ cir.bit.clrsb (::cir::BitClrsbOp)
  • ✅ cir.bit.clz (::cir::BitClzOp)
  • ✅ cir.bit.ctz (::cir::BitCtzOp)
  • ✅ cir.bit.ffs (::cir::BitFfsOp)
  • ✅ cir.bit.parity (::cir::BitParityOp)
  • ✅ cir.bit.popcount (::cir::BitPopcountOp)
  • ✅ cir.bit_reverse (::cir::BitReverseOp)
  • ✅ cir.brcond (::cir::BrCondOp)
  • ✅ cir.br (::cir::BrOp)
  • ✅ cir.break (::cir::BreakOp)
  • ✅ cir.bswap (::cir::ByteswapOp)
  • ✅ cir.asm (::cir::InlineAsmOp)
  • ✅ cir.call (::cir::CallOp)
  • ✅ cir.case (::cir::CaseOp)
  • ✅ cir.cast (::cir::CastOp)
  • ❌ cir.catch_param (::cir::CatchParamOp)
  • ❌ cir.ceil (::cir::CeilOp)
  • ❌ cir.clear_cache (::cir::ClearCacheOp)
  • ✅ cir.cmp (::cir::CmpOp)
  • ❌ cir.cmp3way (::cir::CmpThreeWayOp)
  • ❌ cir.complex.binop (::cir::ComplexBinOp)
  • ✅ cir.complex.create (::cir::ComplexCreateOp)
  • ✅ cir.complex.imag (::cir::ComplexImagOp)
  • ✅ cir.complex.imag_ptr (::cir::ComplexImagPtrOp)
  • ✅ cir.complex.real (::cir::ComplexRealOp)
  • ✅ cir.complex.real_ptr (::cir::ComplexRealPtrOp)
  • ✅ cir.condition (::cir::ConditionOp)
  • ✅ cir.const (::cir::ConstantOp)
  • ✅ cir.continue (::cir::ContinueOp)
  • ❌ cir.copy (::cir::CopyOp)
  • ❌ cir.copysign (::cir::CopysignOp)
  • ❌ cir.cos (::cir::CosOp)
  • ❌ cir.delete.array (::cir::DeleteArrayOp)
  • ❌ cir.derived_class_addr (::cir::DerivedClassAddrOp)
  • ❌ cir.derived_data_member (::cir::DerivedDataMemberOp)
  • ❌ cir.derived_method (::cir::DerivedMethodOp)
  • ✅ cir.do (::cir::DoWhileOp)
  • ❌ cir.dyn_cast (::cir::DynamicCastOp)
  • ❌ cir.eh.inflight_exception (::cir::EhInflightOp)
  • ❌ cir.eh.typeid (::cir::EhTypeIdOp)
  • ❌ cir.exp2 (::cir::Exp2Op)
  • ❌ cir.exp (::cir::ExpOp)
  • ✅ cir.expect (::cir::ExpectOp)
  • ❌ cir.extract_member (::cir::ExtractMemberOp)
  • ✅ cir.fabs (::cir::FAbsOp)
  • ❌ cir.fmaxnum (::cir::FMaxNumOp)
  • ❌ cir.fmaximum (::cir::FMaximumOp)
  • ❌ cir.fminnum (::cir::FMinNumOp)
  • ❌ cir.fminimum (::cir::FMinimumOp)
  • ❌ cir.fmod (::cir::FModOp)
  • ❌ cir.floor (::cir::FloorOp)
  • ✅ cir.for (::cir::ForOp)
  • ✅ cir.frame_address (::cir::FrameAddrOp)
  • ❌ cir.free.exception (::cir::FreeExceptionOp)
  • ✅ cir.func (::cir::FuncOp)
  • ✅ cir.get_bitfield (::cir::GetBitfieldOp)
  • ✅ cir.get_global (::cir::GetGlobalOp)
  • ✅ cir.get_member (::cir::GetMemberOp)
  • ❌ cir.get_method (::cir::GetMethodOp)
  • ❌ cir.get_runtime_member (::cir::GetRuntimeMemberOp)
  • ✅ cir.global (::cir::GlobalOp)
  • ✅ cir.goto (::cir::GotoOp)
  • ✅ cir.if (::cir::IfOp)
  • ❌ cir.insert_member (::cir::InsertMemberOp)
  • ❌ cir.invariant_group (::cir::InvariantGroupOp)
  • ❌ cir.is_constant (::cir::IsConstantOp)
  • ❌ cir.is_fp_class (::cir::IsFPClassOp)
  • ❌ cir.std.begin (::cir::IterBeginOp)
  • ❌ cir.std.end (::cir::IterEndOp)
  • ❌ cir.llvm.intrinsic (::cir::LLVMIntrinsicCallOp)
  • ❌ cir.llrint (::cir::LLrintOp)
  • ❌ cir.llround (::cir::LLroundOp)
  • ✅ cir.label (::cir::LabelOp)
  • ❌ cir.linker_options (::cir::LinkerOptionsOp)
  • ❌ cir.log10 (::cir::Log10Op)
  • ❌ cir.log2 (::cir::Log2Op)
  • ❌ cir.log (::cir::LogOp)
  • ✅ cir.load (::cir::Load)
  • ❌ cir.lrint (::cir::LrintOp)
  • ❌ cir.lround (::cir::LroundOp)
  • ❌ cir.libc.memchr (::cir::MemChrOp)
  • ❌ cir.memcpy_inline (::cir::MemCpyInlineOp)
  • ❌ cir.libc.memcpy (::cir::MemCpyOp)
  • ❌ cir.libc.memmove (::cir::MemMoveOp)
  • ❌ cir.memset_inline (::cir::MemSetInlineOp)
  • ❌ cir.libc.memset (::cir::MemSetOp)
  • ❌ cir.nearbyint (::cir::NearbyintOp)
  • ❌ cir.objsize (::cir::ObjSizeOp)
  • ❌ cir.pow (::cir::PowOp)
  • ❌ cir.prefetch (::cir::PrefetchOp)
  • ❌ cir.ptr_diff (::cir::PtrDiffOp)
  • ❌ cir.ptr_mask (::cir::PtrMaskOp)
  • ✅ cir.ptr_stride (::cir::PtrStrideOp)
  • ❌ cir.resume (::cir::ResumeOp)
  • ✅ cir.return (::cir::ReturnOp)
  • ❌ cir.rint (::cir::RintOp)
  • ✅ cir.rotate (::cir::RotateOp)
  • ❌ cir.roundeven (::cir::RoundEvenOp)
  • ❌ cir.round (::cir::RoundOp)
  • ✅ cir.scope (::cir::ScopeOp)
  • ✅ cir.select (::cir::SelectOp)
  • ✅ cir.set_bitfield (::cir::SetBitfieldOp)
  • ✅ cir.shift (::cir::ShiftOp)
  • ❌ cir.signbit (::cir::SignBitOp)
  • ❌ cir.sin (::cir::SinOp)
  • ❌ cir.sqrt (::cir::SqrtOp)
  • ✅ cir.stack_restore (::cir::StackRestoreOp)
  • ✅ cir.stack_save (::cir::StackSaveOp)
  • ❌ cir.std.find (::cir::StdFindOp)
  • ✅ cir.store (::cir::StoreOp)
  • ✅ cir.switch.flat (::cir::SwitchFlatOp)
  • ✅ cir.switch (::cir::SwitchOp)
  • ❌ cir.tan (::cir::TanOp)
  • ✅ cir.ternary (::cir::TernaryOp)
  • ❌ cir.throw (::cir::ThrowOp)
  • ✅ cir.trap (::cir::TrapOp)
  • ❌ cir.trunc (::cir::TruncOp)
  • ❌ cir.try_call (::cir::TryCallOp)
  • ❌ cir.try (::cir::TryOp)
  • ✅ cir.unary (::cir::UnaryOp)
  • ✅ cir.unreachable (::cir::UnreachableOp)
  • ✅ cir.va.arg (::cir::VAArgOp)
  • ❌ cir.va.copy (::cir::VACopyOp)
  • ✅ cir.va.end (::cir::VAEndOp)
  • ✅ cir.va.start (::cir::VAStartOp)
  • ❌ cir.vtt.address_point (::cir::VTTAddrPointOp)
  • ✅ cir.vtable.address_point (::cir::VTableAddrPointOp)
  • ✅ cir.vec.cmp (::cir::VecCmpOp)
  • ✅ cir.vec.create (::cir::VecCreateOp)
  • ✅ cir.vec.extract (::cir::VecExtractOp)
  • ✅ cir.vec.insert (::cir::VecInsertOp)
  • ✅ cir.vec.shuffle.dynamic (::cir::VecShuffleDynamicOp)
  • ✅ cir.vec.shuffle (::cir::VecShuffleOp)
  • ✅ cir.vec.splat (::cir::VecSplatOp)
  • ✅ cir.vec.ternary (::cir::VecTernaryOp)
  • ✅ cir.while (::cir::WhileOp)
  • ✅ cir.yield (::cir::YieldOp)

Types

TODO: This section is under development.

Overall Progress: 84%

View Types
  • ✅ ArrayType
  • ✅ BF16Type
  • ✅ BoolType
  • ✅ ComplexType
  • ❌ DataMemberType
  • ✅ DoubleType
  • ❌ ExceptionInfoType
  • ✅ FP16Type
  • ✅ FP80Type
  • ✅ FP128Type
  • ✅ FuncType
  • ✅ IntType
  • ✅ LongDoubleType
  • ❌ MethodType
  • ✅ PointerType
  • ✅ RecordType
  • ✅ SingleType
  • ✅ VectorType
  • ✅ VoidType

Attributes

TODO: This section is under development.

Overall Progress: 25%

View Attributes
  • ❌ ASTCXXConstructorDeclAttr
  • ❌ ASTCXXConversionDeclAttr
  • ❌ ASTCXXDestructorDeclAttr
  • ❌ ASTCXXMethodDeclAttr
  • ❌ ASTCallExprAttr
  • ❌ ASTDeclAttr
  • ❌ ASTExprAttr
  • ❌ ASTFunctionDeclAttr
  • ❌ ASTRecordDeclAttr
  • ❌ ASTTagDeclAttr
  • ❌ ASTTypeDeclAttr
  • ❌ ASTVarDeclAttr
  • ✅ AddressPointAttr
  • ❌ AddressSpaceAttr
  • ❌ AnnotationAttr
  • ✅ BitfieldInfoAttr
  • ✅ BoolAttr
  • ✅ OptInfoAttr
  • ❌ TBAAAttr
  • ❌ TBAAMemberAttr
  • ❌ TBAAOmnipotentCharAttr
  • ❌ TBAAScalarAttr
  • ❌ TBAAStructAttr
  • ❌ TBAATagAttr
  • ❌ TBAAVTablePointerAttr
  • ❌ TypeSizeInfoAttr
  • ❌ CUDABinaryHandleAttr
  • ❌ CUDAExternallyInitializedAttr
  • ❌ CUDAKernelNameAttr
  • ❌ CUDAShadowNameAttr
  • ❌ CmpThreeWayInfoAttr
  • ✅ ComplexAttr
  • ✅ ConstArrayAttr
  • ✅ ConstPtrAttr
  • ✅ ConstRecordAttr
  • ✅ ConstVectorAttr
  • ❌ ConvergentAttr
  • ❌ DataMemberAttr
  • ❌ DynamicCastInfoAttr
  • ❌ ExtraFuncAttributesAttr
  • ✅ FPAttr
  • ❌ GlobalAnnotationValuesAttr
  • ❌ GlobalCtorAttr
  • ❌ GlobalDtorAttr
  • ✅ GlobalViewAttr
  • ❌ InlineAttr
  • ✅ IntAttr
  • ❌ LangAttr
  • ❌ MethodAttr
  • ❌ NoThrowAttr
  • ❌ OpenCLKernelArgMetadataAttr
  • ❌ OpenCLKernelAttr
  • ❌ OpenCLKernelMetadataAttr
  • ❌ OpenCLKernelUniformWorkGroupSizeAttr
  • ❌ OpenCLVersionAttr
  • ❌ OptNoneAttr
  • ✅ PoisonAttr
  • ❌ SignedOverflowBehaviorAttr
  • ❌ TypeInfoAttr
  • ❌ UWTableAttr
  • ✅ UndefAttr
  • ❌ VTableAttr
  • ✅ VisibilityAttr
  • ✅ ZeroAttr

Passes