Skip to content

Implement new extension API to support Alloca with addresspace.#73

Merged
smaillet merged 1 commit intoUbiquityDotNET:developfrom
smaillet:AddAllocaWithAddressSpace
Dec 6, 2025
Merged

Implement new extension API to support Alloca with addresspace.#73
smaillet merged 1 commit intoUbiquityDotNET:developfrom
smaillet:AddAllocaWithAddressSpace

Conversation

@smaillet
Copy link
Member

@smaillet smaillet commented Dec 6, 2025

Implement new extension API to support Alloca with addresspace.

  • This allow generators using address spaces to directly support allocas with a different address space ID. The actual address won't change but it is usable to indicate that
    an allocation results in a value valid for an address space. This is normally used for runtimes that support some sort of GC/managed reference vs a native pointer. It is useful to distinguish the intended use and that the address space is part of the type of the pointer (even if it is OPAQUE).
  • Cleaned up some headers
    • Minor re-formatting
    • Protected wrappers for <cstdint> and <climits> as those are not formally available for ISO/C compilation.
      • While it is increasingly rare to use a pure C compilation it is plausible and should still be supported.

* This allow generators using address spaces to directly support allocas with a different address space ID. The actual address won't change but it is usable to indicate that
an allocation results in a value valid for an address space. This is normally used for runtimes that support some sort of GC/managed reference vs a native pointer. It is useful to distinguish the intended use and that the address space is part of the type of the pointer (even if it is OPAQUE).
* Cleaned up some headers
    - Minor re-formatting
    - Protected wrappers for `<cstdint>` and `<climits>` as those are not formally available for ISO/C compilation.
        - While it is increasingly rare to use a pure C compilation it is plausible and should still be supported.
@smaillet smaillet merged commit 46b3425 into UbiquityDotNET:develop Dec 6, 2025
2 checks passed
@smaillet smaillet deleted the AddAllocaWithAddressSpace branch December 6, 2025 21:16
smaillet added a commit to smaillet/Llvm.NET that referenced this pull request Dec 6, 2025
* Such is the problem of per line staging of a file while withholding some changes.
* InstructionBuilder has some local changes waiting on a release of [new extension API support](UbiquityDotNET/Llvm.Libs#73) but other chanes were supposed to be included [Sigh...]
    - Sadly, InstructionBuilder has no formal testing (relies on samples) so this new instruction has no tests.
smaillet added a commit to UbiquityDotNET/Llvm.NET that referenced this pull request Dec 6, 2025
* Such is the problem of per line staging of a file while withholding some changes.
* InstructionBuilder has some local changes waiting on a release of [new extension API support](UbiquityDotNET/Llvm.Libs#73) but other chanes were supposed to be included [Sigh...]
    - Sadly, InstructionBuilder has no formal testing (relies on samples) so this new instruction has no tests.
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.

[Feature] - Add new extended API to build an Alloca instruction with an address space

1 participant

Comments