diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2018-08-16 01:22:19 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2018-08-16 01:22:19 +0000 |
commit | 00c35c77943f9dca3d77ccb0c447f896727ac8ca (patch) | |
tree | 6ce9917e2d3c52fabd51c15b5cfa7bcd42b480a4 /llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp | |
parent | aca738b7424189e4937295de9f297124cc07b10f (diff) | |
download | bcm5719-llvm-00c35c77943f9dca3d77ccb0c447f896727ac8ca.tar.gz bcm5719-llvm-00c35c77943f9dca3d77ccb0c447f896727ac8ca.zip |
[x86] Actually initialize the SLH pass with the x86 backend and use
a shorter name ('x86-slh') for the internal flags and pass name.
Without this, you can't use the -stop-after or -stop-before
infrastructure. I seem to have just missed this when originally adding
the pass.
The shorter name solves two problems. First, the flag names were ...
really long and hard to type/manage. Second, the pass name can't be the
exact same as the flag name used to enable this, and there are already
some users of that flag name so I'm avoiding changing it unnecessarily.
llvm-svn: 339836
Diffstat (limited to 'llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp b/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp index 078fe1598f1..81bd9014a88 100644 --- a/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp +++ b/llvm/lib/Target/X86/X86SpeculativeLoadHardening.cpp @@ -61,7 +61,7 @@ using namespace llvm; -#define PASS_KEY "x86-speculative-load-hardening" +#define PASS_KEY "x86-slh" #define DEBUG_TYPE PASS_KEY STATISTIC(NumCondBranchesTraced, "Number of conditional branches traced"); @@ -2237,9 +2237,9 @@ void X86SpeculativeLoadHardeningPass::hardenIndirectCallOrJumpInstr( ++NumCallsOrJumpsHardened; } -INITIALIZE_PASS_BEGIN(X86SpeculativeLoadHardeningPass, DEBUG_TYPE, +INITIALIZE_PASS_BEGIN(X86SpeculativeLoadHardeningPass, PASS_KEY, "X86 speculative load hardener", false, false) -INITIALIZE_PASS_END(X86SpeculativeLoadHardeningPass, DEBUG_TYPE, +INITIALIZE_PASS_END(X86SpeculativeLoadHardeningPass, PASS_KEY, "X86 speculative load hardener", false, false) FunctionPass *llvm::createX86SpeculativeLoadHardeningPass() { |