Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:44:45

0001 //===-------- VectorCombine.h - Optimize partial vector operations --------===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 //
0009 // This pass optimizes scalar/vector interactions using target cost models. The
0010 // transforms implemented here may not fit in traditional loop-based or SLP
0011 // vectorization passes.
0012 //
0013 //===----------------------------------------------------------------------===//
0014 
0015 #ifndef LLVM_TRANSFORMS_VECTORIZE_VECTORCOMBINE_H
0016 #define LLVM_TRANSFORMS_VECTORIZE_VECTORCOMBINE_H
0017 
0018 #include "llvm/IR/PassManager.h"
0019 
0020 namespace llvm {
0021 
0022 /// Optimize scalar/vector interactions in IR using target cost models.
0023 class VectorCombinePass : public PassInfoMixin<VectorCombinePass> {
0024   /// If true, only perform beneficial early IR transforms. Do not introduce new
0025   /// vector operations.
0026   bool TryEarlyFoldsOnly;
0027 
0028 public:
0029   VectorCombinePass(bool TryEarlyFoldsOnly = false)
0030       : TryEarlyFoldsOnly(TryEarlyFoldsOnly) {}
0031 
0032   PreservedAnalyses run(Function &F, FunctionAnalysisManager &);
0033 };
0034 }
0035 #endif // LLVM_TRANSFORMS_VECTORIZE_VECTORCOMBINE_H