Skip to content

Commit c2d0336

Browse files
committed
Revert "[WIP] Build assume from call"
caused build bot failure This reverts commit 780d2c5.
1 parent 780d2c5 commit c2d0336

File tree

9 files changed

+10
-302
lines changed

9 files changed

+10
-302
lines changed

llvm/include/llvm/IR/Attributes.h

-4
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ class Attribute {
107107
const Optional<unsigned> &NumElemsArg);
108108
static Attribute getWithByValType(LLVMContext &Context, Type *Ty);
109109

110-
static Attribute::AttrKind getAttrKindFromName(StringRef AttrName);
111-
112-
static StringRef getNameFromAttrKind(Attribute::AttrKind AttrKind);
113-
114110
//===--------------------------------------------------------------------===//
115111
// Attribute Accessors
116112
//===--------------------------------------------------------------------===//

llvm/include/llvm/Transforms/Utils/KnowledgeRetention.h

-41
This file was deleted.

llvm/lib/IR/Attributes.cpp

-23
Original file line numberDiff line numberDiff line change
@@ -176,29 +176,6 @@ Attribute::getWithAllocSizeArgs(LLVMContext &Context, unsigned ElemSizeArg,
176176
return get(Context, AllocSize, packAllocSizeArgs(ElemSizeArg, NumElemsArg));
177177
}
178178

179-
Attribute::AttrKind Attribute::getAttrKindFromName(StringRef AttrName) {
180-
return StringSwitch<Attribute::AttrKind>(AttrName)
181-
#define GET_ATTR_NAMES
182-
#define ATTRIBUTE_ENUM(ENUM_NAME, DISPLAY_NAME) \
183-
.Case(#DISPLAY_NAME, Attribute::ENUM_NAME)
184-
#include "llvm/IR/Attributes.inc"
185-
.Default(Attribute::None);
186-
}
187-
188-
StringRef Attribute::getNameFromAttrKind(Attribute::AttrKind AttrKind) {
189-
switch (AttrKind) {
190-
#define GET_ATTR_NAMES
191-
#define ATTRIBUTE_ENUM(ENUM_NAME, DISPLAY_NAME) \
192-
case AttrKind::ENUM_NAME: \
193-
return #DISPLAY_NAME;
194-
#include "llvm/IR/Attributes.inc"
195-
case AttrKind::None:
196-
return "none";
197-
default:
198-
llvm_unreachable("invalid Kind");
199-
}
200-
}
201-
202179
//===----------------------------------------------------------------------===//
203180
// Attribute Accessor Methods
204181
//===----------------------------------------------------------------------===//

llvm/lib/IR/Core.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,17 @@ unsigned LLVMGetMDKindID(const char *Name, unsigned SLen) {
127127
return LLVMGetMDKindIDInContext(LLVMGetGlobalContext(), Name, SLen);
128128
}
129129

130+
static Attribute::AttrKind getAttrKindFromName(StringRef AttrName) {
131+
return StringSwitch<Attribute::AttrKind>(AttrName)
132+
#define GET_ATTR_NAMES
133+
#define ATTRIBUTE_ENUM(ENUM_NAME, DISPLAY_NAME) \
134+
.Case(#DISPLAY_NAME, Attribute::ENUM_NAME)
135+
#include "llvm/IR/Attributes.inc"
136+
.Default(Attribute::None);
137+
}
138+
130139
unsigned LLVMGetEnumAttributeKindForName(const char *Name, size_t SLen) {
131-
return Attribute::getAttrKindFromName(StringRef(Name, SLen));
140+
return getAttrKindFromName(StringRef(Name, SLen));
132141
}
133142

134143
unsigned LLVMGetLastEnumAttributeKind(void) {

llvm/lib/Passes/PassBuilder.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@
173173
#include "llvm/Transforms/Utils/CanonicalizeAliases.h"
174174
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
175175
#include "llvm/Transforms/Utils/InjectTLIMappings.h"
176-
#include "llvm/Transforms/Utils/KnowledgeRetention.h"
177176
#include "llvm/Transforms/Utils/LCSSA.h"
178177
#include "llvm/Transforms/Utils/LibCallsShrinkWrap.h"
179178
#include "llvm/Transforms/Utils/LoopSimplify.h"

llvm/lib/Passes/PassRegistry.def

-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ FUNCTION_PASS("aa-eval", AAEvaluator())
160160
FUNCTION_PASS("adce", ADCEPass())
161161
FUNCTION_PASS("add-discriminators", AddDiscriminatorsPass())
162162
FUNCTION_PASS("aggressive-instcombine", AggressiveInstCombinePass())
163-
FUNCTION_PASS("assume-builder", AssumeBuilderPass())
164163
FUNCTION_PASS("alignment-from-assumptions", AlignmentFromAssumptionsPass())
165164
FUNCTION_PASS("bdce", BDCEPass())
166165
FUNCTION_PASS("bounds-checking", BoundsCheckingPass())

llvm/lib/Transforms/Utils/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ add_llvm_component_library(LLVMTransformUtils
2828
InjectTLIMappings.cpp
2929
InstructionNamer.cpp
3030
IntegerDivision.cpp
31-
KnowledgeRetention.cpp
3231
LCSSA.cpp
3332
LibCallsShrinkWrap.cpp
3433
Local.cpp

llvm/lib/Transforms/Utils/KnowledgeRetention.cpp

-164
This file was deleted.

llvm/test/Transforms/Util/assume-builder.ll

-66
This file was deleted.

0 commit comments

Comments
 (0)