-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[SandboxVectorizer] Use sbvec-passes flag to create a pipeline of Region passes after BottomUpVec. #111223
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
[SandboxVectorizer] Use sbvec-passes flag to create a pipeline of Region passes after BottomUpVec. #111223
Changes from all commits
1c1145a
674c91e
ee3e3d3
4b4c063
1772712
fe5f7d8
196b167
314bf8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_NULLPASS_H | ||
#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_NULLPASS_H | ||
|
||
#include "llvm/SandboxIR/Pass.h" | ||
|
||
namespace llvm::sandboxir { | ||
|
||
class Region; | ||
|
||
/// A Region pass that does nothing, for use as a placeholder in tests. | ||
class NullPass final : public RegionPass { | ||
public: | ||
NullPass() : RegionPass("null") {} | ||
bool runOnRegion(Region &R) final { return false; } | ||
}; | ||
|
||
} // namespace llvm::sandboxir | ||
|
||
#endif // LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_NULLPASS_H |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
//===- PassRegistry.def - Registry of passes --------------------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This file is used as the registry of sub-passes that are part of the | ||
// SandboxVectorizer pass. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
// NOTE: NO INCLUDE GUARD DESIRED! | ||
|
||
#ifndef REGION_PASS | ||
#define REGION_PASS(NAME, CREATE_PASS) | ||
#endif | ||
|
||
REGION_PASS("null", NullPass()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also why use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just followed the pattern for the existing |
||
|
||
#undef REGION_PASS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need some cleanup code at the end like:
to avoid getting a warning of redefining REGION_PASS if we ever decide to include the .def file more than once
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
#undef REGION_PASS
. By the time we get to the end the macro is always defined, either to something useful by the user or to an empty macro above.