Skip to content

Commit 02c5ba8

Browse files
committed
Revert "[VP,Integer,#2] ExpandVectorPredication pass"
This reverts commit 43bc584. The commit broke the -DLLVM_ENABLE_MODULES=1 builds. http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/31603/consoleFull#2136199809a1ca8a51-895e-46c6-af87-ce24fa4cd561
1 parent b11e4c9 commit 02c5ba8

21 files changed

+1
-823
lines changed

llvm/include/llvm/Analysis/TargetTransformInfo.h

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ class TargetLibraryInfo;
6161
class Type;
6262
class User;
6363
class Value;
64-
class VPIntrinsic;
6564
struct KnownBits;
6665
template <typename T> class Optional;
6766

@@ -1380,38 +1379,6 @@ class TargetTransformInfo {
13801379
/// Intrinsics") Use of %evl is discouraged when that is not the case.
13811380
bool hasActiveVectorLength() const;
13821381

1383-
struct VPLegalization {
1384-
enum VPTransform {
1385-
// keep the predicating parameter
1386-
Legal = 0,
1387-
// where legal, discard the predicate parameter
1388-
Discard = 1,
1389-
// transform into something else that is also predicating
1390-
Convert = 2
1391-
};
1392-
1393-
// How to transform the EVL parameter.
1394-
// Legal: keep the EVL parameter as it is.
1395-
// Discard: Ignore the EVL parameter where it is safe to do so.
1396-
// Convert: Fold the EVL into the mask parameter.
1397-
VPTransform EVLParamStrategy;
1398-
1399-
// How to transform the operator.
1400-
// Legal: The target supports this operator.
1401-
// Convert: Convert this to a non-VP operation.
1402-
// The 'Discard' strategy is invalid.
1403-
VPTransform OpStrategy;
1404-
1405-
bool shouldDoNothing() const {
1406-
return (EVLParamStrategy == Legal) && (OpStrategy == Legal);
1407-
}
1408-
VPLegalization(VPTransform EVLParamStrategy, VPTransform OpStrategy)
1409-
: EVLParamStrategy(EVLParamStrategy), OpStrategy(OpStrategy) {}
1410-
};
1411-
1412-
/// \returns How the target needs this vector-predicated operation to be
1413-
/// transformed.
1414-
VPLegalization getVPLegalizationStrategy(const VPIntrinsic &PI) const;
14151382
/// @}
14161383

14171384
/// @}
@@ -1721,8 +1688,6 @@ class TargetTransformInfo::Concept {
17211688
virtual bool supportsScalableVectors() const = 0;
17221689
virtual bool hasActiveVectorLength() const = 0;
17231690
virtual InstructionCost getInstructionLatency(const Instruction *I) = 0;
1724-
virtual VPLegalization
1725-
getVPLegalizationStrategy(const VPIntrinsic &PI) const = 0;
17261691
};
17271692

17281693
template <typename T>
@@ -2294,11 +2259,6 @@ class TargetTransformInfo::Model final : public TargetTransformInfo::Concept {
22942259
InstructionCost getInstructionLatency(const Instruction *I) override {
22952260
return Impl.getInstructionLatency(I);
22962261
}
2297-
2298-
VPLegalization
2299-
getVPLegalizationStrategy(const VPIntrinsic &PI) const override {
2300-
return Impl.getVPLegalizationStrategy(PI);
2301-
}
23022262
};
23032263

23042264
template <typename T>

llvm/include/llvm/Analysis/TargetTransformInfoImpl.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -750,13 +750,6 @@ class TargetTransformInfoImplBase {
750750

751751
bool hasActiveVectorLength() const { return false; }
752752

753-
TargetTransformInfo::VPLegalization
754-
getVPLegalizationStrategy(const VPIntrinsic &PI) const {
755-
return TargetTransformInfo::VPLegalization(
756-
/* EVLParamStrategy */ TargetTransformInfo::VPLegalization::Discard,
757-
/* OperatorStrategy */ TargetTransformInfo::VPLegalization::Convert);
758-
}
759-
760753
protected:
761754
// Obtain the minimum required size to hold the value (without the sign)
762755
// In case of a vector it returns the min required size for one element.

llvm/include/llvm/CodeGen/ExpandVectorPredication.h

Lines changed: 0 additions & 23 deletions
This file was deleted.

llvm/include/llvm/CodeGen/MachinePassRegistry.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ MACHINE_FUNCTION_ANALYSIS("pass-instrumentation", PassInstrumentationAnalysis, (
103103
#define DUMMY_FUNCTION_PASS(NAME, PASS_NAME, CONSTRUCTOR)
104104
#endif
105105
DUMMY_FUNCTION_PASS("expandmemcmp", ExpandMemCmpPass, ())
106-
DUMMY_FUNCTION_PASS("expandvp", ExpandVectorPredicationPass, ())
107106
DUMMY_FUNCTION_PASS("gc-lowering", GCLoweringPass, ())
108107
DUMMY_FUNCTION_PASS("shadow-stack-gc-lowering", ShadowStackGCLoweringPass, ())
109108
DUMMY_FUNCTION_PASS("sjljehprepare", SjLjEHPreparePass, ())

llvm/include/llvm/CodeGen/Passes.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,11 +453,6 @@ namespace llvm {
453453
// the corresponding function in a vector library (e.g., SVML, libmvec).
454454
FunctionPass *createReplaceWithVeclibLegacyPass();
455455

456-
/// This pass expands the vector predication intrinsics into unpredicated
457-
/// instructions with selects or just the explicit vector length into the
458-
/// predicate mask.
459-
FunctionPass *createExpandVectorPredicationPass();
460-
461456
// This pass expands memcmp() to load/stores.
462457
FunctionPass *createExpandMemCmpPass();
463458

llvm/include/llvm/IR/IntrinsicInst.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -400,11 +400,9 @@ class VPIntrinsic : public IntrinsicInst {
400400

401401
/// \return the mask parameter or nullptr.
402402
Value *getMaskParam() const;
403-
void setMaskParam(Value *);
404403

405404
/// \return the vector length parameter or nullptr.
406405
Value *getVectorLengthParam() const;
407-
void setVectorLengthParam(Value *);
408406

409407
/// \return whether the vector length param can be ignored.
410408
bool canIgnoreVectorLengthParam() const;

llvm/include/llvm/InitializePasses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ void initializeEntryExitInstrumenterPass(PassRegistry&);
154154
void initializeExpandMemCmpPassPass(PassRegistry&);
155155
void initializeExpandPostRAPass(PassRegistry&);
156156
void initializeExpandReductionsPass(PassRegistry&);
157-
void initializeExpandVectorPredicationPass(PassRegistry &);
158157
void initializeMakeGuardsExplicitLegacyPassPass(PassRegistry&);
159158
void initializeExternalAAWrapperPassPass(PassRegistry&);
160159
void initializeFEntryInserterPass(PassRegistry&);

llvm/include/llvm/LinkAllPasses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ namespace {
197197
(void) llvm::createMergeFunctionsPass();
198198
(void) llvm::createMergeICmpsLegacyPass();
199199
(void) llvm::createExpandMemCmpPass();
200-
(void) llvm::createExpandVectorPredicationPass();
201200
std::string buf;
202201
llvm::raw_string_ostream os(buf);
203202
(void) llvm::createPrintModulePass(os);

llvm/lib/Analysis/TargetTransformInfo.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,11 +1026,6 @@ bool TargetTransformInfo::preferPredicatedReductionSelect(
10261026
return TTIImpl->preferPredicatedReductionSelect(Opcode, Ty, Flags);
10271027
}
10281028

1029-
TargetTransformInfo::VPLegalization
1030-
TargetTransformInfo::getVPLegalizationStrategy(const VPIntrinsic &VPI) const {
1031-
return TTIImpl->getVPLegalizationStrategy(VPI);
1032-
}
1033-
10341029
bool TargetTransformInfo::shouldExpandReduction(const IntrinsicInst *II) const {
10351030
return TTIImpl->shouldExpandReduction(II);
10361031
}

llvm/lib/CodeGen/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ add_llvm_component_library(LLVMCodeGen
2929
ExpandMemCmp.cpp
3030
ExpandPostRAPseudos.cpp
3131
ExpandReductions.cpp
32-
ExpandVectorPredication.cpp
3332
FaultMaps.cpp
3433
FEntryInserter.cpp
3534
FinalizeISel.cpp

0 commit comments

Comments
 (0)