aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils')
-rw-r--r--llvm/utils/TableGen/AsmMatcherEmitter.cpp2
-rw-r--r--llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp2
-rw-r--r--llvm/utils/TableGen/Basic/TargetFeaturesEmitter.h2
-rw-r--r--llvm/utils/TableGen/Common/CodeGenTarget.cpp2
-rw-r--r--llvm/utils/TableGen/Common/DAGISelMatcher.h2
-rw-r--r--llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp8
-rw-r--r--llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h4
-rw-r--r--llvm/utils/TableGen/FastISelEmitter.cpp2
-rw-r--r--llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp2
-rw-r--r--llvm/utils/TableGen/X86DisassemblerTables.cpp2
-rw-r--r--llvm/utils/TableGen/X86ModRMFilters.h2
-rw-r--r--llvm/utils/UpdateTestChecks/common.py23
-rw-r--r--llvm/utils/profcheck-xfail.txt7
13 files changed, 40 insertions, 20 deletions
diff --git a/llvm/utils/TableGen/AsmMatcherEmitter.cpp b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
index e1f2f06..9f18a11 100644
--- a/llvm/utils/TableGen/AsmMatcherEmitter.cpp
+++ b/llvm/utils/TableGen/AsmMatcherEmitter.cpp
@@ -4164,7 +4164,7 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
OS << " MII.getDeprecatedInfo(Inst, getSTI(), Info)) {\n";
OS << " SMLoc Loc = ((" << Target.getName()
<< "Operand &)*Operands[0]).getStartLoc();\n";
- OS << " getParser().Warning(Loc, Info, std::nullopt);\n";
+ OS << " getParser().Warning(Loc, Info, {});\n";
OS << " }\n";
}
diff --git a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
index ed802e2..6a36f47 100644
--- a/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
+++ b/llvm/utils/TableGen/Basic/RuntimeLibcallsEmitter.cpp
@@ -154,7 +154,7 @@ public:
Provides = ProvideMap.lookup(ProvidesDef);
}
- ~RuntimeLibcallImpl() {}
+ ~RuntimeLibcallImpl() = default;
const Record *getDef() const { return TheDef; }
diff --git a/llvm/utils/TableGen/Basic/TargetFeaturesEmitter.h b/llvm/utils/TableGen/Basic/TargetFeaturesEmitter.h
index 99e4820..412f323 100644
--- a/llvm/utils/TableGen/Basic/TargetFeaturesEmitter.h
+++ b/llvm/utils/TableGen/Basic/TargetFeaturesEmitter.h
@@ -43,7 +43,7 @@ public:
void printFeatureKeyValues(raw_ostream &OS, const FeatureMapTy &FeatureMap);
void printCPUKeyValues(raw_ostream &OS, const FeatureMapTy &FeatureMap);
virtual void run(raw_ostream &O);
- virtual ~TargetFeaturesEmitter() {};
+ virtual ~TargetFeaturesEmitter() = default;
};
} // namespace llvm
#endif
diff --git a/llvm/utils/TableGen/Common/CodeGenTarget.cpp b/llvm/utils/TableGen/Common/CodeGenTarget.cpp
index 3db0d07..1e93788 100644
--- a/llvm/utils/TableGen/Common/CodeGenTarget.cpp
+++ b/llvm/utils/TableGen/Common/CodeGenTarget.cpp
@@ -80,7 +80,7 @@ CodeGenTarget::CodeGenTarget(const RecordKeeper &records)
MacroFusions = Records.getAllDerivedDefinitions("Fusion");
}
-CodeGenTarget::~CodeGenTarget() {}
+CodeGenTarget::~CodeGenTarget() = default;
StringRef CodeGenTarget::getName() const { return TargetRec->getName(); }
diff --git a/llvm/utils/TableGen/Common/DAGISelMatcher.h b/llvm/utils/TableGen/Common/DAGISelMatcher.h
index f87de75..a19f444 100644
--- a/llvm/utils/TableGen/Common/DAGISelMatcher.h
+++ b/llvm/utils/TableGen/Common/DAGISelMatcher.h
@@ -105,7 +105,7 @@ protected:
Matcher(KindTy K) : Kind(K) {}
public:
- virtual ~Matcher() {}
+ virtual ~Matcher() = default;
unsigned getSize() const { return Size; }
void setSize(unsigned sz) { Size = sz; }
diff --git a/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp b/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
index 5d49715..7af757c 100644
--- a/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
+++ b/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.cpp
@@ -457,7 +457,7 @@ std::optional<LLTCodeGen> llvm::gi::MVTToLLT(MVT::SimpleValueType SVT) {
void Matcher::optimize() {}
-Matcher::~Matcher() {}
+Matcher::~Matcher() = default;
//===- GroupMatcher -------------------------------------------------------===//
@@ -1150,11 +1150,11 @@ void RuleMatcher::insnmatchers_pop_front() { Matchers.erase(Matchers.begin()); }
//===- PredicateMatcher ---------------------------------------------------===//
-PredicateMatcher::~PredicateMatcher() {}
+PredicateMatcher::~PredicateMatcher() = default;
//===- OperandPredicateMatcher --------------------------------------------===//
-OperandPredicateMatcher::~OperandPredicateMatcher() {}
+OperandPredicateMatcher::~OperandPredicateMatcher() = default;
bool OperandPredicateMatcher::isHigherPriorityThan(
const OperandPredicateMatcher &B) const {
@@ -1941,7 +1941,7 @@ bool InstructionOperandMatcher::isHigherPriorityThan(
//===- OperandRenderer ----------------------------------------------------===//
-OperandRenderer::~OperandRenderer() {}
+OperandRenderer::~OperandRenderer() = default;
//===- CopyRenderer -------------------------------------------------------===//
diff --git a/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h b/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h
index 0f1241e..fdcca1d 100644
--- a/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h
+++ b/llvm/utils/TableGen/Common/GlobalISel/GlobalISelMatchTable.h
@@ -1375,7 +1375,7 @@ class InstructionPredicateMatcher : public PredicateMatcher {
public:
InstructionPredicateMatcher(PredicateKind Kind, unsigned InsnVarID)
: PredicateMatcher(Kind, InsnVarID) {}
- ~InstructionPredicateMatcher() override {}
+ ~InstructionPredicateMatcher() override = default;
/// Compare the priority of this object and B.
///
@@ -2319,7 +2319,7 @@ public:
ActionKind getKind() const { return Kind; }
- virtual ~MatchAction() {}
+ virtual ~MatchAction() = default;
// Some actions may need to add extra predicates to ensure they can run.
virtual void emitAdditionalPredicates(MatchTable &Table,
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp
index e0be104..c4dbb14 100644
--- a/llvm/utils/TableGen/FastISelEmitter.cpp
+++ b/llvm/utils/TableGen/FastISelEmitter.cpp
@@ -85,7 +85,7 @@ struct OperandsSignature {
char Repr = OK_Invalid;
public:
- OpKind() {}
+ OpKind() = default;
bool operator<(OpKind RHS) const { return Repr < RHS.Repr; }
bool operator==(OpKind RHS) const { return Repr == RHS.Repr; }
diff --git a/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp b/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
index 043bc628..50e63a4 100644
--- a/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
+++ b/llvm/utils/TableGen/GlobalISelCombinerEmitter.cpp
@@ -2441,7 +2441,7 @@ public:
explicit GICombinerEmitter(const RecordKeeper &RK,
const CodeGenTarget &Target, StringRef Name,
const Record *Combiner);
- ~GICombinerEmitter() override {}
+ ~GICombinerEmitter() override = default;
void run(raw_ostream &OS);
};
diff --git a/llvm/utils/TableGen/X86DisassemblerTables.cpp b/llvm/utils/TableGen/X86DisassemblerTables.cpp
index 3414190..b8c3c02 100644
--- a/llvm/utils/TableGen/X86DisassemblerTables.cpp
+++ b/llvm/utils/TableGen/X86DisassemblerTables.cpp
@@ -708,7 +708,7 @@ DisassemblerTables::DisassemblerTables() {
HasConflicts = false;
}
-DisassemblerTables::~DisassemblerTables() {}
+DisassemblerTables::~DisassemblerTables() = default;
void DisassemblerTables::emitModRMDecision(raw_ostream &o1, raw_ostream &o2,
unsigned &i1, unsigned &i2,
diff --git a/llvm/utils/TableGen/X86ModRMFilters.h b/llvm/utils/TableGen/X86ModRMFilters.h
index 7bf111f..4eb57b0 100644
--- a/llvm/utils/TableGen/X86ModRMFilters.h
+++ b/llvm/utils/TableGen/X86ModRMFilters.h
@@ -28,7 +28,7 @@ class ModRMFilter {
public:
/// Destructor - Override as necessary.
- virtual ~ModRMFilter() {}
+ virtual ~ModRMFilter() = default;
/// isDumb - Indicates whether this filter returns the same value for
/// any value of the ModR/M byte.
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 119303c..2dad16a 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -29,7 +29,7 @@ Version changelog:
'none' and 'all'. 'smart' is the default.
5: Basic block labels are matched by FileCheck expressions
6: The semantics of TBAA checks has been incorporated in the check lines.
-7: Indent switch-cases correctly.
+7: Indent switch-cases correctly; CHECK-EMPTY instead of skipping blank lines.
"""
DEFAULT_VERSION = 6
@@ -2280,6 +2280,14 @@ def add_checks(
# For IR output, change all defs to FileCheck variables, so we're immune
# to variable naming fashions.
else:
+ if ginfo.get_version() >= 7:
+ # Record the indices of blank lines in the function body preemptively.
+ blank_line_indices = {
+ i for i, line in enumerate(func_body) if line.strip() == ""
+ }
+ else:
+ blank_line_indices = set()
+
func_body = generalize_check_lines(
func_body,
ginfo,
@@ -2305,9 +2313,18 @@ def add_checks(
is_blank_line = False
- for func_line in func_body:
+ for idx, func_line in enumerate(func_body):
if func_line.strip() == "":
- is_blank_line = True
+ # We should distinguish if the line is a 'fake' blank line generated by
+ # generalize_check_lines removing comments.
+ # Fortunately, generalize_check_lines does not change the index of each line,
+ # we can record the indices of blank lines preemptively.
+ if idx in blank_line_indices:
+ output_lines.append(
+ "{} {}-EMPTY:".format(comment_marker, checkprefix)
+ )
+ else:
+ is_blank_line = True
continue
if not check_inst_comments:
# Do not waste time checking IR comments unless necessary.
diff --git a/llvm/utils/profcheck-xfail.txt b/llvm/utils/profcheck-xfail.txt
index aef7c09..380b162 100644
--- a/llvm/utils/profcheck-xfail.txt
+++ b/llvm/utils/profcheck-xfail.txt
@@ -517,8 +517,11 @@ Instrumentation/TypeSanitizer/alloca-only.ll
Instrumentation/TypeSanitizer/anon.ll
Instrumentation/TypeSanitizer/basic.ll
Instrumentation/TypeSanitizer/basic-nosan.ll
+Instrumentation/TypeSanitizer/basic_outlined.ll
+Instrumentation/TypeSanitizer/basic_verify_outlined.ll
Instrumentation/TypeSanitizer/byval.ll
Instrumentation/TypeSanitizer/globals.ll
+Instrumentation/TypeSanitizer/globals_outlined.ll
Instrumentation/TypeSanitizer/invalid-metadata.ll
Instrumentation/TypeSanitizer/memintrinsics.ll
Instrumentation/TypeSanitizer/nosanitize.ll
@@ -729,6 +732,7 @@ Transforms/ExpandVariadics/expand-va-intrinsic-split-simple.ll
Transforms/ExpandVariadics/intrinsics.ll
Transforms/FixIrreducible/basic.ll
Transforms/FixIrreducible/bug45623.ll
+Transforms/FixIrreducible/callbr.ll
Transforms/FixIrreducible/nested.ll
Transforms/FixIrreducible/switch.ll
Transforms/GCOVProfiling/atomic-counter.ll
@@ -1106,6 +1110,7 @@ Transforms/LoopSimplifyCFG/update_parents.ll
Transforms/LoopUnroll/peel-last-iteration-expansion-cost.ll
Transforms/LoopUnroll/peel-last-iteration-with-guards.ll
Transforms/LoopUnroll/peel-last-iteration-with-variable-trip-count.ll
+Transforms/LoopUnroll/runtime-loop-multiple-exits.ll
Transforms/LoopVersioning/add-phi-update-users.ll
Transforms/LoopVersioning/basic.ll
Transforms/LoopVersioning/bound-check-partially-known.ll
@@ -1317,8 +1322,6 @@ Transforms/SimpleLoopUnswitch/pr60736.ll
Transforms/SimpleLoopUnswitch/trivial-unswitch-freeze-individual-conditions.ll
Transforms/SimpleLoopUnswitch/trivial-unswitch.ll
Transforms/SimpleLoopUnswitch/trivial-unswitch-logical-and-or.ll
-Transforms/SimplifyCFG/RISCV/switch-of-powers-of-two.ll
-Transforms/SimplifyCFG/X86/switch-of-powers-of-two.ll
Transforms/StackProtector/cross-dso-cfi-stack-chk-fail.ll
Transforms/StructurizeCFG/AMDGPU/uniform-regions.ll
Transforms/StructurizeCFG/hoist-zerocost.ll