Skip to content

Commit faff2bc

Browse files
committed
fixup! fixup! [SandboxVec] Boilerplate
1 parent cb875fa commit faff2bc

File tree

1 file changed

+1
-22
lines changed

1 file changed

+1
-22
lines changed

llvm/lib/Transforms/Vectorize/SandboxVectorizer/SandboxVectorizer.cpp

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ using namespace llvm;
1414
#define SV_NAME "sandbox-vectorizer"
1515
#define DEBUG_TYPE "SBVec"
1616

17-
cl::opt<bool>
18-
SBVecDisable("sbvec-disable", cl::init(false), cl::Hidden,
19-
cl::desc("Disable the Sandbox Vectorization passes"));
20-
2117
PreservedAnalyses SandboxVectorizerPass::run(Function &F,
2218
FunctionAnalysisManager &AM) {
2319
TTI = &AM.getResult<TargetIRAnalysis>(F);
@@ -32,27 +28,10 @@ PreservedAnalyses SandboxVectorizerPass::run(Function &F,
3228
}
3329

3430
bool SandboxVectorizerPass::runImpl(Function &F) {
35-
if (SBVecDisable)
36-
return false;
37-
38-
// If the target claims to have no vector registers don't attempt
39-
// vectorization.
40-
if (!TTI->getNumberOfRegisters(TTI->getRegisterClassForType(true))) {
41-
LLVM_DEBUG(dbgs() << "SBVec: Target has no vector registers, abort.\n");
42-
return false;
43-
}
44-
45-
// Don't vectorize when the attribute NoImplicitFloat is used.
46-
if (F.hasFnAttribute(Attribute::NoImplicitFloat))
47-
return false;
48-
31+
LLVM_DEBUG(dbgs() << "SBVec: Analyzing " << F.getName() << ".\n");
4932
sandboxir::Context Ctx(F.getContext());
50-
51-
LLVM_DEBUG(dbgs() << "SBVec: Analyzing blocks in " << F.getName() << ".\n");
52-
5333
// Create SandboxIR for `F`.
5434
sandboxir::Function &SBF = *Ctx.createFunction(&F);
55-
5635
// TODO: Initialize SBVec Pass Manager
5736
(void)SBF;
5837

0 commit comments

Comments
 (0)