Skip to content

Commit 6d49e8b

Browse files
sitio-coutolanza
authored andcommittedOct 19, 2024
Reapply and patch "[CIR][ABI] Apply CC lowering pass by default (#842)" (#944)
This reverts commit 8f699fd and fixes some issues, namely: - CC lowering pass will no longer fail if the function has no AST information that won't be used. - Fixed CC lowering not disabling when running certain `cc1` compilation commands. - CC lowering can now be disabled when calling `cir-opt` and `cir-translate`. - Compilation commands that generate Object files should now invoke CC lowering by default.
1 parent d1b1222 commit 6d49e8b

File tree

108 files changed

+498
-385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+498
-385
lines changed
 

‎clang/include/clang/CIR/Dialect/Passes.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ std::unique_ptr<Pass> createGotoSolverPass();
4343
/// Create a pass to lower ABI-independent function definitions/calls.
4444
std::unique_ptr<Pass> createCallConvLoweringPass();
4545

46-
void populateCIRPreLoweringPasses(mlir::OpPassManager &pm);
46+
void populateCIRPreLoweringPasses(mlir::OpPassManager &pm, bool useCCLowering);
4747

4848
//===----------------------------------------------------------------------===//
4949
// Registration

‎clang/include/clang/CIR/LowerToLLVM.h

+3-4
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ class ModuleOp;
2929
namespace cir {
3030

3131
namespace direct {
32-
std::unique_ptr<llvm::Module>
33-
lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp theModule,
34-
llvm::LLVMContext &llvmCtx,
35-
bool disableVerifier = false);
32+
std::unique_ptr<llvm::Module> lowerDirectlyFromCIRToLLVMIR(
33+
mlir::ModuleOp theModule, llvm::LLVMContext &llvmCtx,
34+
bool disableVerifier = false, bool disableCCLowering = false);
3635
}
3736

3837
// Lower directly from pristine CIR to LLVMIR.

0 commit comments

Comments
 (0)