Skip to content

Commit dd33534

Browse files
committed
cc: Remove obsolete abi pipeline interface.
1 parent eb7bcea commit dd33534

File tree

3 files changed

+1
-77
lines changed

3 files changed

+1
-77
lines changed

include/vast/Target/LLVMIR/Convert.hpp

-13
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,6 @@ namespace mlir
2525

2626
namespace vast::target::llvmir
2727
{
28-
// TODO(target): Do we want to fully replace this with composite passes,
29-
// or instead should live at the same time?
30-
enum class pipeline : uint32_t
31-
{
32-
baseline = 0,
33-
with_abi = 1
34-
};
35-
36-
static inline pipeline default_pipeline()
37-
{
38-
return pipeline::baseline;
39-
}
40-
4128
// Lower module into `llvm::Module` - it is expected that `mlir_module` is already
4229
// lowered as much as possible by vast (for example by calling the `prepare_module`
4330
// function).

lib/vast/Frontend/Consumer.cpp

+1-37
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ VAST_UNRELAX_WARNINGS
2626

2727
namespace vast::cc {
2828

29-
namespace llvmir = target::llvmir;
30-
31-
using pipeline = llvmir::pipeline;
32-
33-
[[nodiscard]] pipeline parse_pipeline(const std::optional< vast_args::option_list > &list);
34-
35-
[[nodiscard]] pipeline parse_pipeline(string_ref from);
36-
3729
[[nodiscard]] target_dialect parse_target_dialect(string_ref from);
3830

3931
[[nodiscard]] std::string to_string(target_dialect target);
@@ -177,11 +169,8 @@ namespace vast::cc {
177169
backend backend_action, owning_module_ref mlir_module, mcontext_t *mctx
178170
) {
179171
llvm::LLVMContext llvm_context;
180-
llvmir::register_vast_to_llvm_ir(*mctx);
181-
// auto pipeline = parse_pipeline(vargs.get_options_list(opt::opt_pipeline));
182-
// llvmir::lower_hl_module(mlir_module.get(), pipeline);
183172

184-
auto mod = llvmir::translate(mlir_module.get(), llvm_context);
173+
auto mod = target::llvmir::translate(mlir_module.get(), llvm_context);
185174
auto dl = cgctx->actx.getTargetInfo().getDataLayoutString();
186175
clang::EmitBackendOutput(
187176
opts.diags, opts.headers, opts.codegen, opts.target, opts.lang, dl, mod.get(),
@@ -259,29 +248,4 @@ namespace vast::cc {
259248
VAST_UNIMPLEMENTED_MSG("VAST does not yet support the given source language");
260249
}
261250

262-
pipeline parse_pipeline(const std::optional< vast_args::option_list > &list) {
263-
if (!list) {
264-
return llvmir::default_pipeline();
265-
}
266-
267-
if (list->size() != 1) {
268-
VAST_UNREACHABLE("Cannot use more than one pipeline!");
269-
}
270-
271-
return parse_pipeline(list->front());
272-
}
273-
274-
pipeline parse_pipeline(string_ref from) {
275-
auto trg = from.lower();
276-
if (trg == "with-abi") {
277-
return pipeline::with_abi;
278-
}
279-
if (trg == "baseline") {
280-
return pipeline::baseline;
281-
}
282-
283-
VAST_UNREACHABLE("Unknown option of pipeline to use: {0}", trg);
284-
}
285-
286-
287251
} // namespace vast::cc

lib/vast/Target/LLVMIR/Convert.cpp

-27
Original file line numberDiff line numberDiff line change
@@ -30,33 +30,6 @@ VAST_UNRELAX_WARNINGS
3030

3131
namespace vast::target::llvmir
3232
{
33-
namespace
34-
{
35-
// TODO(target): Unify with tower and opt.
36-
void populate_pm(mlir::PassManager &pm, pipeline p)
37-
{
38-
switch (p)
39-
{
40-
case pipeline::baseline:
41-
{
42-
hl::build_simplify_hl_pipeline(pm);
43-
build_to_ll_pipeline(pm);
44-
build_to_llvm_pipeline(pm);
45-
return;
46-
}
47-
case pipeline::with_abi:
48-
{
49-
hl::build_simplify_hl_pipeline(pm);
50-
build_abi_pipeline(pm);
51-
build_to_ll_pipeline(pm);
52-
build_to_llvm_pipeline(pm);
53-
return;
54-
}
55-
}
56-
57-
}
58-
} // namespace
59-
6033
class ToLLVMIR : public mlir::LLVMTranslationDialectInterface
6134
{
6235
public:

0 commit comments

Comments
 (0)