@@ -14,10 +14,6 @@ using namespace llvm;
14
14
#define SV_NAME " sandbox-vectorizer"
15
15
#define DEBUG_TYPE " SBVec"
16
16
17
- cl::opt<bool >
18
- SBVecDisable (" sbvec-disable" , cl::init(false ), cl::Hidden,
19
- cl::desc(" Disable the Sandbox Vectorization passes" ));
20
-
21
17
PreservedAnalyses SandboxVectorizerPass::run (Function &F,
22
18
FunctionAnalysisManager &AM) {
23
19
TTI = &AM.getResult <TargetIRAnalysis>(F);
@@ -32,27 +28,10 @@ PreservedAnalyses SandboxVectorizerPass::run(Function &F,
32
28
}
33
29
34
30
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 " );
49
32
sandboxir::Context Ctx (F.getContext ());
50
-
51
- LLVM_DEBUG (dbgs () << " SBVec: Analyzing blocks in " << F.getName () << " .\n " );
52
-
53
33
// Create SandboxIR for `F`.
54
34
sandboxir::Function &SBF = *Ctx.createFunction (&F);
55
-
56
35
// TODO: Initialize SBVec Pass Manager
57
36
(void )SBF;
58
37
0 commit comments