Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIR] Call code gen; create empty cir.func op #113483

Merged
merged 6 commits into from
Nov 5, 2024

Commits on Oct 23, 2024

  1. [CIR] Call code gen; create empty cir.func op

    Finish hooking up ClangIR code gen into the Clang control flow,
    initializing enough that basic code gen is possible.
    
    Add an almost empty cir.func op to the ClangIR dialect.  Currently the
    only property of the function is its name.  Add the code necessary to
    code gen a cir.func op.
    
    Create essentially empty files
    clang/lib/CIR/Dialect/IR/{CIRAttrs.cpp,CIRTypes.cpp}.  These will be
    filled in later as attributes and types are defined in the ClangIR
    dialect.
    
    (Part of upstreaming the ClangIR incubator project into LLVM.)
    dkolsen-pgi committed Oct 23, 2024
    Configuration menu
    Copy the full SHA
    fd38921 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. [CIR] Call code gen; create empty cir.func op

    Followup commit:
    
    Improve comments, variable names, and formatting.  Some other code
    cleanup.
    
    Fix bugs in the creation of the `cir.func` op: add it to the module, and
    correctly store its name.
    
    Update the hello.c test to check that a `cir.func` op is generated.
    dkolsen-pgi committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    88873f1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6930d7c View commit details
    Browse the repository at this point in the history
  3. [CIR] Call code gen; create empty cir.func op

    Followup change responding to code review comments.  There are no
    behavior changes, just small cleanup.
    dkolsen-pgi committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    d8d9cce View commit details
    Browse the repository at this point in the history

Commits on Nov 1, 2024

  1. [CIR] Call code gen; create empty cir.func op

    More followup responding to review comments.  Make
    `CIRGenerator::getModule()` a `const` member function. Call
    `loadDialect` instead of `getOrLoadDialect` to load MLIR dialects.  Fix
    a typo and remove unnecessary curly braces.
    dkolsen-pgi committed Nov 1, 2024
    Configuration menu
    Copy the full SHA
    6104178 View commit details
    Browse the repository at this point in the history

Commits on Nov 5, 2024

  1. Better comment about location conversions

    Improve the comment about converting `SourceLocation` to
    `mlir::Location`, being explicit that the presumed location is
    converted.
    
    Part of llvm#113483 [CIR] Call code gen; create empty cir.func op
    dkolsen-pgi committed Nov 5, 2024
    Configuration menu
    Copy the full SHA
    a8f5444 View commit details
    Browse the repository at this point in the history