Skip to content

Conversation

@badumbatish
Copy link
Contributor

Fixes #1809

ahmedshakill and others added 30 commits August 10, 2025 20:45
Initial implementation  of lowering cir.delete.array llvm#1285 

lowered to a call to **_ZdaPv** keeping similarity with how Clang AST is
lowered.

before 
```LLVM
module @"/opt/tmp/input.cpp" attributes {cir.lang = #cir.lang<cxx>, cir.sob = #cir.signed_overflow_behavior<undefined>, cir.triple = "x86_64-unknown-linux-gnu", cir.type_size_info = #cir.type_size_info<char = 8, int = 32, size_t = 64>, dlti.dl_spec = #dlti.dl_spec<!llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i128 = dense<128> : vector<2xi64>, !llvm.ptr<270> = dense<32> : vector<4xi64>, f80 = dense<128> : vector<2xi64>, i1 = dense<8> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, i64 = dense<64> : vector<2xi64>, "dlti.stack_alignment" = 128 : i64, "dlti.endianness" = "little", "dlti.mangling_mode" = "e">} {
  cir.func @_Z17test_delete_arrayPi(%arg0: !cir.ptr<!s32i> loc(fused[#loc3, #loc4])) extra(#fn_attr) {
    %0 = cir.alloca !cir.ptr<!s32i>, !cir.ptr<!cir.ptr<!s32i>>, ["ptr", init] {alignment = 8 : i64} loc(#loc8)
    cir.store %arg0, %0 : !cir.ptr<!s32i>, !cir.ptr<!cir.ptr<!s32i>> loc(#loc5)
    %1 = cir.load %0 : !cir.ptr<!cir.ptr<!s32i>>, !cir.ptr<!s32i> loc(#loc6)
    cir.delete.array %1 : <!s32i> loc(#loc6)
    cir.return loc(#loc2)
  } loc(#loc7)
} loc(#loc)
```

after
```LLVM
define dso_local void @_Z17test_delete_arrayPi(ptr %0) #0 {
  %2 = alloca ptr, i64 1, align 8
  store ptr %0, ptr %2, align 8
  %3 = load ptr, ptr %2, align 8
  call void @_ZdaPv(ptr %3)
  ret void
}
```
…llvm#1605)

- Rename `PrimitiveIntOrFPPtr` to `CIR_PtrToIntOrFloatType` and broaden
it to accept any floating-point type.
- Fix incorrect constraint name from `PrimitiveInt` to any `Int`; prior
constraint already allowed arbitrary bitwidths, so the name was
misleading.
- Rename `ComplexPtr` to `CIR_PtrToComplexType` for clarity.
Remove all the code the manages ABI info for arguments and return values
in the initial CIR codegen. We prefer for the CIR to represent the types
as they appear in the source code, with ABI handling being deferred
until the lowering phase or calling convention transform.

The ABI handling being removed here was brought over from the classic
codegen, but none of the effects being computed made it into the CIR so
this change is effectively NFC.

This change leaves the `CIRGenFunctionInfoArgInfo` with just one member.
That can be cleaned up in a later patch.
There are some cases where we're currently using the zero attribute to
initialize global variables for records that aren't properly
zero-initializable. We weren't checking for that, and we also weren't
properly calculating zero-initializability for records. This patch
addresses both of these issues.

This doesn't actually handle the case where the record isn't
zero-initializable. It just reports it as NYI. It does add a comment
about what needs to be done.
Currently, the following code snippet fails with a crash: 
```
#include <stdio.h>

struct X {
  int a;
  X(int a) : a(a) {}
  ~X() {}
};

bool foo(const X &) { return false; }
bool bar() { return foo(1) || foo(2); }
```
it fails with 
```
error: 'cir.yield' op must be the last operation in the parent block
```
The crash can be traced to the [construction of the
TernaryOp](https://github.com/llvm/clangir/blob/5df50096be1a783c26b48ea437523347df8a3110/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp#L2728).
A
[yield](https://github.com/llvm/clangir/blob/5df50096be1a783c26b48ea437523347df8a3110/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp#L2776)
is created and when the LexicalScope is destroyed the destructors for
the object follow.

So, the CIR looks something like:
```
%11 = "cir.ternary"(%10) ({
    %13 = "cir.const"() <{value = #cir.bool<true> : !cir.bool}> : () -> !cir.bool
    "cir.yield"(%13) : (!cir.bool) -> ()
}, {
    %12 = "cir.const"() <{value = #cir.bool<false> : !cir.bool}> : () -> !cir.bool
    "cir.yield"(%12) : (!cir.bool) -> ()
}) : (!cir.bool) -> !cir.bool
"cir.yield"(%11) : (!cir.bool) -> ()
"cir.call"(%7) <{callee = @_ZN1XD2Ev, calling_conv = 1 : i32, extra_attrs = #cir<extra({nothrow = #cir.nothrow})>, side_effect = 1 : i32}> ({
}) 
```
which is wrong, since the yield should come last. 

The fix here is forcing a cleanup and then the yield follows. A similar
rule also applies
[here](https://github.com/llvm/clangir/blob/5df50096be1a783c26b48ea437523347df8a3110/clang/lib/CIR/CodeGen/CIRGenExprScalar.cpp#L2657)
for the "&&" case, e.g., foo(1) && foo(2) instead in the code snippet.

One more modification I made is adding a check for when the current
lexScope is ternary, when creating dispatch blocks for cleanups. I
believe in this case, we do not want to create a dispatch block, please
correct me if I am wrong.

Finally, I add two tests to verify that everything works as intended.
A previous refactoring had reduced the ArgInfo structure to contain a
single member, the argument type. This change eliminates the ArgInfo
structure entirely, instead just storing the argument type directly in
places where ArgInfo had previously been used.
Add mlir Vec support to elementTypeIfVector
This commit un-xfails some tests that were affected by upstream GEP
changes. llvm#1497

The changes are likely introduced by inference of `inbounds` and `nuw`
flags
llvm/llvm-project@10f315d.
It seems to allow LLVM to enable some constant foldings, whose effects
include re-calculating the address using i8 and a single offset. (This
change seems to arise from
https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699/39)
Reapplying
llvm@e66b670
which was reverted during rebase (after fixing some conflicts).
Un-xfails the test `cc1.cir` (llvm#1497).

---------

Co-authored-by: Nathan Lanza <[email protected]>
This commit attempts to un-xfail `globals-ref-globals` test (llvm#1497),
which was causing a crash in addition to GEP changes.

The crash was caused by incorrect offsets being calculated for global
view indices. The original calculation did not take paddings into
consideration, hence triggering a crash. This commit adds type alignment
when calculating the offset, which will take care of paddings.

Further modification to `globals-ref-globals` test includes fixing some
struct names that got changed, as well as replacing the expects with
constant folded GEP.
This commit essentially is a revert of
656151f. It appears that the underlying
issues are resolved.

Closes llvm#425 and llvm#927
Previously, when emitting a global for a string literal, we were
creating a GlobalOp, building a GlobalView attr for it, and looking up
the global from the symbol associated with the attr. This change splits
out the function that creates the global so that the global is returned
directly and the GlobalView attribute is only created in the case where
it is needed.

This also updates the mechanism used for uniquing the global name used
for the strings so that if different base names are used the uniquing
numbers each base name separately. The mangling of the global used for
strings is not implemented, but the uniquing was happening prior to the
mangling. This change drops the uniquing below the placeholder for
mangling.
This change corrects the alignment of store operations and fixes a
related problem with calculation of member offsets (we weren't
accounting for the alignment of the field whose offset we were
calculating.

Many tests are affected by this, but most just needed a wildcard match
to ignore the explicit alignment which wasn't present before. In cases
where I updated a check for a specific alignment value, I compared
against classic codegen to verify that we are now producing the same
alignment.

Two new tests are added align-store.c and alignment.cpp. The second of
these partially copies a test of the same name from clang/test/CodeGen.
It's testing globals and isn't directly related to the code changes
here, but we didn't seem to have a test for this. I put the store
alignment tests in a different file because inconsistency between CIR
and LLVM IR in placement of globals would have made a combined test
difficult to follow.

This addresses llvm#1204
Currently the ForOp handling ignores everything except load, store and
arithmetic in the step region. It does not detect whether the step and
induction variable has already been assigned, either.

That might result to wrong behaviour:

```cpp
// Ignores printf
for (int i = 0; i < n; i++, printf("\n"));

// Only increments once
for (int i = 0; i < n; i++, i++);
```

I choose to rewrite the detection and do an exact match of the
instruction sequence for `i++` and `i += n`. It doesn't seem easy to
detect a more general pattern without phi nodes.

The new test case is xfailed, because ForOp hits an unreachable when it
meets a non-canonicalized loop. We can implement that functionality
later.

Co-authored-by: Yue Huang <[email protected]>
AmrDeveloper and others added 25 commits September 3, 2025 12:09
Implement Atomic init for ComplexType
Implement VisitOpaqueValueExpr for ComplexType
`cir::BreakOp::getBreakTarget` gets the innermost `cir::LoopOpInterface`
or `cir::SwitchOp` containing this `break`.

For example:
```
A: for (...) {
B:   for(...) {
       break; // target = B
C:     switch (...) {
         default: break; // target = C
       }
     break; // target = A
   }     
```

NOTE: This is a part of a broader effort I am working on to make
querying CIR control flow facts more easily. If folks have any design
notes or ideas, please share them.

---------

Co-authored-by: Tommy McMichen <[email protected]>
This implements getting the VTT argument for a delegating constructor
and enables the corresponding test in delegating-ctor.cpp.
First noted at: llvm#1829
Also:
Adjusted test cases affected by this change.

---------

Co-authored-by: Tommy MᶜMichen <[email protected]>
This reverts commit a896c41.

Test is failing on Linux (reproduced locally)
Three things:

- Corrected comments to `getZeroInitAttr` as [we return more than only
integrals in that
function](https://github.com/llvm/clangir/blob/2ea4005fa0aa291295b19c200860b5edf9b864b3/clang/include/clang/CIR/Dialect/Builder/CIRBaseBuilder.h#L133).
- Given that `emitX86MaskedCompare` and `emitX86MaskedCompareResult`
helpers are pretty large, Added NYI statements on paths not related to
the current set of intrinsics so review is specific to the ones encoded.
- Added test comments related to the behavior observed coming from the
canonicalizer on: llvm#1770
llvm#1887)

Adds `cir::CtorKind::Move` to `CXXCtorAttr` for move constructors
Add `cir::CXXAssignAttr` with `cir::AssignKind::{Move,Copy}` for
move/copy assignment operators
Per discussion in llvm#1879 
Updated lifetime checker to use the `CXXAssignAttr` instead of AST
interface.
I will be making a PR that depends on `cir::CXXCtorKind::Move` soon.

---------

Co-authored-by: Tommy McMichen <[email protected]>
Co-authored-by: Tommy McMichen <[email protected]>
Fixes llvm#1849.

llvm#1889 was merged without updating existing test cases that still use the
original ptr stride op formatting.

This PR fixes those test cases
From the
[comment](llvm#1844 (comment))
on PR review llvm#1844, it seems like we're missing the flags for GEP.

I'm opening the PR to add the flags.

The first commit is just a prototype to gather opinions and reviews to
see if I'm heading to the right direction with this.
@github-actions
Copy link

⚠️ C/C++ code formatter, clang-format found issues in your code. ⚠️

You can test this locally with the following command:
git-clang-format --diff HEAD~1 HEAD --extensions cpp -- clang/lib/CIR/CodeGen/CIRGenModule.cpp mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
View the diff from clang-format here.
diff --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
index bc81f93b7b..ebfa6a6b0b 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
@@ -1184,7 +1184,7 @@ LogicalResult CallOp::verifySymbolUses(SymbolTableCollection &symbolTable) {
       fnType = fn.getFunctionType();
     } else if (auto ifunc = dyn_cast<IFuncOp>(callee)) {
       fnType = ifunc.getIFuncType();
-    } else if (auto aliasFn = dyn_cast<AliasOp>(callee)){
+    } else if (auto aliasFn = dyn_cast<AliasOp>(callee)) {
       fnType = aliasFn.getType();
     } else {
       return emitOpError()

@badumbatish
Copy link
Contributor Author

i'm putting up a temp commit to gather reviews if i'm heading in the right direction. Right now the implementation is hitting a verification error on the following test case but i'm not really sure why

class A {
public:
  A();
} A;
A::A() {}

the LLVM IR module before lowering to LLVM and the LLVM module before verification is this.

ninja -C build && ./build/bin/clang --target=x86_64-unknown-linux  -S scratch/global_alias.cpp  -o - --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -emit-llvm -fclangir

ninja: Entering directory `build'
[17/17] Linking CXX shared library lib/libclang-cpp.dylib
module @"/Users/jjasmine/Developer/igalia/clangir/scratch/global_alias.cpp" attributes {cir.global_ctors = [#cir.global_ctor<"__cxx_global_var_init", 65535>], cir.type_size_info = #cir.type_size_info<char = 8, int = 32, size_t = 64>, cir.uwtable = #cir.uwtable<async>, dlti.dl_spec = #dlti.dl_spec<!llvm.ptr<270> = dense<32> : vector<4xi64>, !llvm.ptr<271> = dense<32> : vector<4xi64>, !llvm.ptr<272> = dense<64> : vector<4xi64>, i64 = dense<64> : vector<2xi64>, i128 = dense<128> : vector<2xi64>, f80 = dense<128> : vector<2xi64>, !llvm.ptr = dense<64> : vector<4xi64>, i1 = dense<8> : vector<2xi64>, i8 = dense<8> : vector<2xi64>, i16 = dense<16> : vector<2xi64>, i32 = dense<32> : vector<2xi64>, f16 = dense<16> : vector<2xi64>, f64 = dense<64> : vector<2xi64>, f128 = dense<128> : vector<2xi64>, "dlti.endianness" = "little", "dlti.mangling_mode" = "e", "dlti.legal_int_widths" = array<i32: 8, 16, 32, 64>, "dlti.stack_alignment" = 128 : i64>, llvm.target_triple = "x86_64-unknown-linux"} {
  llvm.mlir.global external @A() {addr_space = 0 : i32, alignment = 1 : i64, dso_local} : !llvm.struct<"class.A", (i8)> {
    %0 = llvm.mlir.zero : !llvm.struct<"class.A", (i8)>
    llvm.return %0 : !llvm.struct<"class.A", (i8)>
  }
  llvm.func internal @__cxx_global_var_init() attributes {cir.extra_attrs = #cir<extra({})>, global_visibility = #cir<visibility default>, sym_visibility = "private"} {
    %0 = llvm.mlir.addressof @A : !llvm.ptr
    llvm.call @_ZN1AC1Ev(%0) : (!llvm.ptr) -> ()
    llvm.return
  }
  llvm.func @_ZN1AC2Ev(%arg0: !llvm.ptr) attributes {cir.extra_attrs = #cir<extra({inline = #cir.inline<no>, nothrow = #cir.nothrow, optnone = #cir.optnone, uwtable = #cir.uwtable<async>})>, cxx_special_member = #cir.cxx_ctor<!cir.record<class "A" padded {!cir.int<u, 8>} #cir.record.decl.ast>, default>, dso_local, global_visibility = #cir<visibility default>} {
    %0 = llvm.mlir.constant(1 : index) : i64
    %1 = llvm.alloca %0 x !llvm.ptr {alignment = 8 : i64} : (i64) -> !llvm.ptr
    llvm.store %arg0, %1 {alignment = 8 : i64} : !llvm.ptr, !llvm.ptr
    %2 = llvm.load %1 {alignment = 8 : i64} : !llvm.ptr -> !llvm.ptr
    llvm.return
  }
  llvm.mlir.alias external @_ZN1AC1Ev {aliasee = @_ZN1AC2Ev, cir.extra_attrs = #cir<extra({})>, cxx_special_member = #cir.cxx_ctor<!cir.record<class "A" padded {!cir.int<u, 8>} #cir.record.decl.ast>, default>, dso_local, global_visibility = #cir<visibility default>, sym_visibility = "private"} : !llvm.func<void (ptr)> {
    %0 = llvm.mlir.addressof @_ZN1AC2Ev : !llvm.ptr
    llvm.return %0 : !llvm.ptr
  }
  llvm.func @_GLOBAL__sub_I_global_alias.cpp() attributes {cir.extra_attrs = #cir<extra({})>, global_visibility = #cir<visibility default>, sym_visibility = "private"} {
    llvm.call @__cxx_global_var_init() : () -> ()
    llvm.return
  }
  llvm.mlir.global appending constant @llvm.global_ctors() {addr_space = 0 : i32} : !llvm.array<1 x struct<(i32, ptr, ptr)>> {
    %0 = llvm.mlir.undef : !llvm.array<1 x struct<(i32, ptr, ptr)>>
    %1 = llvm.mlir.undef : !llvm.struct<(i32, ptr, ptr)>
    %2 = llvm.mlir.constant(65535 : i32) : i32
    %3 = llvm.mlir.addressof @__cxx_global_var_init : !llvm.ptr
    %4 = llvm.mlir.zero : !llvm.ptr
    %5 = llvm.insertvalue %2, %1[0] : !llvm.struct<(i32, ptr, ptr)>
    %6 = llvm.insertvalue %3, %5[1] : !llvm.struct<(i32, ptr, ptr)>
    %7 = llvm.insertvalue %4, %6[2] : !llvm.struct<(i32, ptr, ptr)>
    %8 = llvm.insertvalue %7, %0[0] : !llvm.array<1 x struct<(i32, ptr, ptr)>>
    llvm.return %8 : !llvm.array<1 x struct<(i32, ptr, ptr)>>
  }
}
; ModuleID = '/Users/jjasmine/Developer/igalia/clangir/scratch/global_alias.cpp'
source_filename = "/Users/jjasmine/Developer/igalia/clangir/scratch/global_alias.cpp"
target datalayout = "e-m:e-n8:16:32:64-S128-p270:32:32:32:32-p271:32:32:32:32-p272:64:64:64:64-i64:64-i128:128-f80:128-p0:64:64:64:64-i1:8-i8:8-i16:16-i32:32-f16:16-f64:64-f128:128"
target triple = "x86_64-unknown-linux"

%class.A = type { i8 }

@A = dso_local global %class.A zeroinitializer, align 1
@llvm.global_ctors = appending constant [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @__cxx_global_var_init, ptr null }]

@_ZN1AC1Ev = alias void (ptr), ptr @_ZN1AC2Ev

define internal void @__cxx_global_var_init() {
  call <cannot get addrspace!> void <null operand!>(ptr @A)
  ret void
}

; Function Attrs: noinline nounwind optnone uwtable
define dso_local void @_ZN1AC2Ev(ptr %0) #0 {
  %2 = alloca ptr, i64 1, align 8
  store ptr %0, ptr %2, align 8
  %3 = load ptr, ptr %2, align 8
  ret void
}

define void @_GLOBAL__sub_I_global_alias.cpp() {
  call void @__cxx_global_var_init()
  ret void
}

attributes #0 = { noinline nounwind optnone uwtable }

!llvm.module.flags = !{!0, !1}

!0 = !{i32 7, !"uwtable", i32 2}
!1 = !{i32 2, !"Debug Info Version", i32 3}
Operand is null
  call <cannot get addrspace!> void <null operand!>(ptr @A)
fatal error: error in backend: Lowering from LLVMIR dialect to llvm IR failed!
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: ./build/bin/clang --target=x86_64-unknown-linux -S scratch/global_alias.cpp -o - --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.4.sdk -emit-llvm -fclangir
1.      <eof> parser at end of file
 #0 0x000000010421a278 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x101846278)
 #1 0x0000000104217d60 llvm::sys::RunSignalHandlers() (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x101843d60)
 #2 0x0000000104219824 llvm::sys::CleanupOnSignal(unsigned long) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x101845824)
 #3 0x0000000104184924 (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1017b0924)
 #4 0x0000000104184894 llvm::CrashRecoveryContext::HandleExit(int) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1017b0894)
 #5 0x0000000104214b84 llvm::sys::Process::Exit(int, bool) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x101840b84)
 #6 0x00000001029db1b8 llvm::iplist_impl<llvm::simple_ilist<llvm::AliasSet>, llvm::ilist_traits<llvm::AliasSet>>::erase(llvm::ilist_iterator<llvm::ilist_detail::node_options<llvm::AliasSet, true, false, void, false, void>, false, false>) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1000071b8)
 #7 0x000000010418bad4 llvm::report_fatal_error(llvm::Twine const&, bool) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1017b7ad4)
 #8 0x000000010418b9a0 llvm::report_fatal_error(llvm::Twine const&, bool) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1017b79a0)
 #9 0x0000000105244d34 cir::direct::CIRToLLVMPtrStrideOpLowering::~CIRToLLVMPtrStrideOpLowering() (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x102870d34)
#10 0x00000001052142d4 cir::CIRGenConsumer::HandleTranslationUnit(clang::ASTContext&) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1028402d4)
#11 0x00000001079ccf98 clang::ParseAST(clang::Sema&, bool, bool) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x104ff8f98)
#12 0x0000000104e245c4 clang::FrontendAction::Execute() (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1024505c4)
#13 0x0000000104da1f44 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1023cdf44)
#14 0x0000000104f160fc clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1025420fc)
#15 0x00000001029d9ffc cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x100005ffc)
#16 0x00000001029d7dac ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x100003dac)
#17 0x0000000104c451d8 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const::$_0>(long) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1022711d8)
#18 0x0000000104184848 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1017b0848)
#19 0x0000000104c447c0 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__1::optional<llvm::StringRef>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>*, bool*) const (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x1022707c0)
#20 0x0000000104c0687c clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x10223287c)
#21 0x0000000104c06a98 clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&, bool) const (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x102232a98)
#22 0x0000000104c25fc0 clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__1::pair<int, clang::driver::Command const*>>&) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x102251fc0)
#23 0x00000001029d7048 clang_main(int, char**, llvm::ToolContext const&) (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x100003048)
#24 0x00000001029e4c60 main (/Users/jjasmine/Developer/igalia/clangir/build/bin/clang-22+0x100010c60)
#25 0x00000001892f6b98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CIR][CodeGen] Replace uses of global with alias