[ir] Remove list of entry points from module

This is unneeded, as we can now determine if a function is an entry
point by checking its pipeline stage.

Bug: tint:1718
Change-Id: Icb09b39b7a63cf9a9a36ccad5e144eceec1dfdeb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/131521
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
James Price 2023-05-16 14:59:30 +00:00 committed by Dawn LUCI CQ
parent f59547fb7f
commit 2f324c59ff
3 changed files with 3 additions and 7 deletions

View File

@ -261,8 +261,6 @@ class Impl {
ast_to_flow_[ast_func] = ir_func;
if (ast_func->IsEntryPoint()) {
builder_.ir.entry_points.Push(ir_func);
switch (ast_func->PipelineStage()) {
case ast::PipelineStage::kVertex:
ir_func->pipeline_stage = Function::PipelineStage::kVertex;

View File

@ -60,7 +60,6 @@ TEST_F(IR_BuilderImplTest, Func) {
auto m = Build();
ASSERT_TRUE(m) << (!m ? m.Failure() : "");
ASSERT_EQ(0u, m->entry_points.Length());
ASSERT_EQ(1u, m->functions.Length());
auto* f = m->functions[0];
@ -70,6 +69,8 @@ TEST_F(IR_BuilderImplTest, Func) {
EXPECT_EQ(1u, f->start_target->inbound_branches.Length());
EXPECT_EQ(1u, f->end_target->inbound_branches.Length());
EXPECT_EQ(m->functions[0]->pipeline_stage, Function::PipelineStage::kUndefined);
EXPECT_EQ(Disassemble(m.Get()), R"(%fn1 = func f():void
%fn2 = block
ret
@ -85,8 +86,7 @@ TEST_F(IR_BuilderImplTest, EntryPoint) {
auto m = Build();
ASSERT_TRUE(m) << (!m ? m.Failure() : "");
ASSERT_EQ(1u, m->entry_points.Length());
EXPECT_EQ(m->functions[0], m->entry_points[0]);
EXPECT_EQ(m->functions[0]->pipeline_stage, Function::PipelineStage::kFragment);
}
TEST_F(IR_BuilderImplTest, IfStatement) {

View File

@ -75,8 +75,6 @@ class Module {
/// List of functions in the program
utils::Vector<Function*, 8> functions;
/// List of indexes into the functions list for the entry points
utils::Vector<Function*, 8> entry_points;
/// The block containing module level declarations, if any exist.
Block* root_block = nullptr;