1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00
llvm-mirror/lib/Transforms/Utils
Chandler Carruth 0e44a1b235 [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative
Load Hardening.

Wires up the existing pass to work with a proper IR attribute rather
than just a hidden/internal flag. The internal flag continues to work
for now, but I'll likely remove it soon.

Most of the churn here is adding the IR attribute. I talked about this
Kristof Beyls and he seemed at least initially OK with this direction.
The idea of using a full attribute here is that we *do* expect at least
some forms of this for other architectures. There isn't anything
*inherently* x86-specific about this technique, just that we only have
an implementation for x86 at the moment.

While we could potentially expose this as a Clang-level attribute as
well, that seems like a good question to defer for the moment as it
isn't 100% clear whether that or some other programmer interface (or
both?) would be best. We'll defer the programmer interface side of this
for now, but at least get to the point where the feature can be enabled
without relying on implementation details.

This also allows us to do something that was really hard before: we can
enable *just* the indirect call retpolines when using SLH. For x86, we
don't have any other way to mitigate indirect calls. Other architectures
may take a different approach of course, and none of this is surfaced to
user-level flags.

Differential Revision: https://reviews.llvm.org/D51157

llvm-svn: 341363
2018-09-04 12:38:00 +00:00
..
AddDiscriminators.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
ASanStackFrameLayout.cpp [asan] Add a full redzone after every stack variable 2017-11-18 01:13:18 +00:00
BasicBlockUtils.cpp [IR] Sink isExceptional predicate to Instruction, rename it to 2018-08-26 08:56:42 +00:00
BreakCriticalEdges.cpp Update MemorySSA in BasicBlockUtils. 2018-08-21 23:32:03 +00:00
BuildLibCalls.cpp [LibCalls] Added returned attribute to libcalls 2018-08-23 05:18:23 +00:00
BypassSlowDivision.cpp [BypassSlowDivision] Teach bypass slow division not to interfere with div by constant where constants have been constant hoisted, but not moved from their basic block 2018-08-21 17:15:33 +00:00
CallPromotionUtils.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
CloneFunction.cpp [CloneFunction] Constant fold terminators before checking single predecessor 2018-08-28 12:40:11 +00:00
CloneModule.cpp Allow creating llvm::Function in non-zero address spaces 2018-08-23 09:25:17 +00:00
CMakeLists.txt [NFC] Move OrderedInstructions and InstructionPrecedenceTracking to Analysis 2018-08-30 04:49:03 +00:00
CodeExtractor.cpp [x86/SLH] Add a real Clang flag and LLVM IR attribute for Speculative 2018-09-04 12:38:00 +00:00
CtorUtils.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
DemoteRegToStack.cpp [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
EntryExitInstrumenter.cpp EntryExitInstrumenter: Handle musttail calls 2018-04-06 10:14:09 +00:00
EscapeEnumerator.cpp Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
Evaluator.cpp [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
FlattenCFG.cpp Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
FunctionComparator.cpp Use SmallPtrSet explicitly for SmallSets with pointer types (NFC). 2018-06-12 11:16:56 +00:00
FunctionImportUtils.cpp [ThinLTO] Clear dllimport when setting dso_local. 2018-03-13 15:24:51 +00:00
GlobalStatus.cpp [GlobalOpt] Fix exponential compile-time with selects. 2018-01-31 20:42:25 +00:00
GuardUtils.cpp Revert r340921 "[NFC] Unify guards detection" 2018-08-29 12:21:32 +00:00
ImportedFunctionsInliningStatistics.cpp [Transforms] Change std::sort to llvm::sort in response to r327219 2018-04-13 19:47:57 +00:00
InlineFunction.cpp Enrich inline messages 2018-08-05 14:53:08 +00:00
InstructionNamer.cpp Transforms: Introduce Transforms/Utils.h rather than spreading the declarations amongst Scalar.h and IPO.h 2018-03-28 17:44:36 +00:00
IntegerDivision.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
LCSSA.cpp [DebugInfo][LCSSA] Preserve debug location in lcssa phis 2018-07-31 14:54:52 +00:00
LibCallsShrinkWrap.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
LLVMBuild.txt
Local.cpp [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
LoopRotationUtils.cpp [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
LoopSimplify.cpp Update MemorySSA in BasicBlockUtils. 2018-08-21 23:32:03 +00:00
LoopUnroll.cpp [UnrollAndJam] New Unroll and Jam pass 2018-07-01 12:47:30 +00:00
LoopUnrollAndJam.cpp [UnJ] Rename hasInvariantIterationCount to hasIterationCountInvariantInParent NFC 2018-08-15 10:59:41 +00:00
LoopUnrollPeel.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
LoopUnrollRuntime.cpp Update MemorySSA in BasicBlockUtils. 2018-08-21 23:32:03 +00:00
LoopUtils.cpp Update MemorySSA in BasicBlockUtils. 2018-08-21 23:32:03 +00:00
LoopVersioning.cpp [LoopVersioning] Don't modify the list that we iterate over in addPHINodes 2018-05-22 08:33:02 +00:00
LowerInvoke.cpp Support a funclet operand bundle in LowerInvoke 2018-05-09 00:53:50 +00:00
LowerMemIntrinsics.cpp [LowerMemIntrinsics] Update uses of deprecated MemIntrinsic::getAlignment API (NFC) 2018-02-05 22:23:58 +00:00
LowerSwitch.cpp [LowerSwitch] Fixed faulty PHI nodes 2018-07-10 12:06:16 +00:00
Mem2Reg.cpp Transforms: Introduce Transforms/Utils.h rather than spreading the declarations amongst Scalar.h and IPO.h 2018-03-28 17:44:36 +00:00
MetaRenamer.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
ModuleUtils.cpp ModuleUtils: Stop using comdat members to generate unique module ids. 2017-10-05 21:54:53 +00:00
NameAnonGlobals.cpp
PredicateInfo.cpp [NFC] Move OrderedInstructions and InstructionPrecedenceTracking to Analysis 2018-08-30 04:49:03 +00:00
PromoteMemoryToRegister.cpp [IR] Replace isa<TerminatorInst> with isTerminator(). 2018-08-26 09:51:22 +00:00
SanitizerStats.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SimplifyCFG.cpp Revert "[SimplifyCFG] Common debug handling [NFC]" 2018-08-30 08:06:50 +00:00
SimplifyIndVar.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
SimplifyLibCalls.cpp [SLC] Support expanding pow(x, n+0.5) to x * x * ... * sqrt(x) 2018-09-03 17:37:39 +00:00
SplitModule.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
SSAUpdater.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
SSAUpdaterBulk.cpp Rename DEBUG macro to LLVM_DEBUG. 2018-05-14 12:53:11 +00:00
StripGCRelocates.cpp Fix a couple of layering violations in Transforms 2018-03-21 22:34:23 +00:00
StripNonLineTableDebugInfo.cpp Fix some layering in StripNonLineTableDebugInfo, moving its declaration from IPO.h to Utils.h to match its implementation 2018-03-29 22:42:08 +00:00
SymbolRewriter.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
UnifyFunctionExitNodes.cpp Remove trailing space 2018-07-30 19:41:25 +00:00
Utils.cpp [instsimplify] Move the instsimplify pass to use more obvious file names 2018-06-29 23:36:03 +00:00
ValueMapper.cpp Teach ValueMapper to use ODR uniqued types when available 2018-01-30 20:16:32 +00:00
VNCoercion.cpp [GVN] Avoid casting a vector of size less than 8 bits to i8 2018-06-21 21:43:20 +00:00