[llvm] [SandboxVec] Add BottomUpVec test flag to build regions from metadata. (PR #111904)
Sriraman Tallam via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 11 13:24:03 PDT 2024
================
@@ -52,5 +99,16 @@ bool SandboxVectorizerPass::runImpl(Function &LLVMF) {
// Create SandboxIR for LLVMF and run BottomUpVec on it.
sandboxir::Context Ctx(LLVMF.getContext());
sandboxir::Function &F = *Ctx.createFunction(&LLVMF);
- return BottomUpVecPass.runOnFunction(F);
+ if (UseRegionsFromMetadata) {
+ SmallVector<std::unique_ptr<sandboxir::Region>> Regions =
+ sandboxir::Region::createRegionsFromMD(F);
+ for (auto &R : Regions) {
+ RPM.runOnRegion(*R);
+ }
+ return false;
----------------
tmsri wrote:
I am not following the various discussions. Why can't this be another function pass called "TestsFuncPass" which then runs the various regions?
https://github.com/llvm/llvm-project/pull/111904
More information about the llvm-commits
mailing list