[llvm] 52a6d47 - [X86] Add initialize function for X86FixupSetCC so that it will show up in print-after-all.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 28 23:31:49 PDT 2020
Author: Craig Topper
Date: 2020-04-28T23:31:34-07:00
New Revision: 52a6d47ada7269a6cc9c9031cdc412f0fc369954
URL: https://github.com/llvm/llvm-project/commit/52a6d47ada7269a6cc9c9031cdc412f0fc369954
DIFF: https://github.com/llvm/llvm-project/commit/52a6d47ada7269a6cc9c9031cdc412f0fc369954.diff
LOG: [X86] Add initialize function for X86FixupSetCC so that it will show up in print-after-all.
Added:
Modified:
llvm/lib/Target/X86/X86.h
llvm/lib/Target/X86/X86FixupSetCC.cpp
llvm/lib/Target/X86/X86TargetMachine.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86.h b/llvm/lib/Target/X86/X86.h
index 52dec3959c14..cf2f674aad1a 100644
--- a/llvm/lib/Target/X86/X86.h
+++ b/llvm/lib/Target/X86/X86.h
@@ -156,6 +156,7 @@ void initializeX86CondBrFoldingPassPass(PassRegistry &);
void initializeX86DomainReassignmentPass(PassRegistry &);
void initializeX86ExecutionDomainFixPass(PassRegistry &);
void initializeX86ExpandPseudoPass(PassRegistry &);
+void initializeX86FixupSetCCPassPass(PassRegistry &);
void initializeX86FlagsCopyLoweringPassPass(PassRegistry &);
void initializeX86LoadValueInjectionRetHardeningPassPass(PassRegistry &);
void initializeX86OptimizeLEAPassPass(PassRegistry &);
diff --git a/llvm/lib/Target/X86/X86FixupSetCC.cpp b/llvm/lib/Target/X86/X86FixupSetCC.cpp
index 924f429fc138..09668d7c5468 100644
--- a/llvm/lib/Target/X86/X86FixupSetCC.cpp
+++ b/llvm/lib/Target/X86/X86FixupSetCC.cpp
@@ -36,6 +36,8 @@ STATISTIC(NumSubstZexts, "Number of setcc + zext pairs substituted");
namespace {
class X86FixupSetCCPass : public MachineFunctionPass {
public:
+ static char ID;
+
X86FixupSetCCPass() : MachineFunctionPass(ID) {}
StringRef getPassName() const override { return "X86 Fixup SetCC"; }
@@ -47,12 +49,12 @@ class X86FixupSetCCPass : public MachineFunctionPass {
const X86InstrInfo *TII = nullptr;
enum { SearchBound = 16 };
-
- static char ID;
};
+} // end anonymous namespace
char X86FixupSetCCPass::ID = 0;
-}
+
+INITIALIZE_PASS(X86FixupSetCCPass, DEBUG_TYPE, DEBUG_TYPE, false, false)
FunctionPass *llvm::createX86FixupSetCC() { return new X86FixupSetCCPass(); }
diff --git a/llvm/lib/Target/X86/X86TargetMachine.cpp b/llvm/lib/Target/X86/X86TargetMachine.cpp
index b2551b64eb0d..93d727bc3f82 100644
--- a/llvm/lib/Target/X86/X86TargetMachine.cpp
+++ b/llvm/lib/Target/X86/X86TargetMachine.cpp
@@ -73,6 +73,7 @@ extern "C" LLVM_EXTERNAL_VISIBILITY void LLVMInitializeX86Target() {
initializeEvexToVexInstPassPass(PR);
initializeFixupLEAPassPass(PR);
initializeFPSPass(PR);
+ initializeX86FixupSetCCPassPass(PR);
initializeX86CallFrameOptimizationPass(PR);
initializeX86CmovConverterPassPass(PR);
initializeX86ExpandPseudoPass(PR);
More information about the llvm-commits
mailing list