mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
0e44a1b235
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
74 lines
3.3 KiB
LLVM
74 lines
3.3 KiB
LLVM
; RUN: llc -mtriple=x86_64-- -O0 -debug-pass=Structure < %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
; REQUIRES: asserts
|
|
|
|
; CHECK-LABEL: Pass Arguments:
|
|
; CHECK-NEXT: Target Library Information
|
|
; CHECK-NEXT: Target Pass Configuration
|
|
; CHECK-NEXT: Machine Module Information
|
|
; CHECK-NEXT: Target Transform Information
|
|
; CHECK-NEXT: Type-Based Alias Analysis
|
|
; CHECK-NEXT: Scoped NoAlias Alias Analysis
|
|
; CHECK-NEXT: Assumption Cache Tracker
|
|
; CHECK-NEXT: Create Garbage Collector Module Metadata
|
|
; CHECK-NEXT: Machine Branch Probability Analysis
|
|
; CHECK-NEXT: ModulePass Manager
|
|
; CHECK-NEXT: Pre-ISel Intrinsic Lowering
|
|
; CHECK-NEXT: FunctionPass Manager
|
|
; CHECK-NEXT: Expand Atomic instructions
|
|
; CHECK-NEXT: Dominator Tree Construction
|
|
; CHECK-NEXT: Basic Alias Analysis (stateless AA impl)
|
|
; CHECK-NEXT: Module Verifier
|
|
; CHECK-NEXT: Lower Garbage Collection Instructions
|
|
; CHECK-NEXT: Shadow Stack GC Lowering
|
|
; CHECK-NEXT: Remove unreachable blocks from the CFG
|
|
; CHECK-NEXT: Instrument function entry/exit with calls to e.g. mcount() (post inlining)
|
|
; CHECK-NEXT: Scalarize Masked Memory Intrinsics
|
|
; CHECK-NEXT: Expand reduction intrinsics
|
|
; CHECK-NEXT: Expand indirectbr instructions
|
|
; CHECK-NEXT: Rewrite Symbols
|
|
; CHECK-NEXT: FunctionPass Manager
|
|
; CHECK-NEXT: Dominator Tree Construction
|
|
; CHECK-NEXT: Exception handling preparation
|
|
; CHECK-NEXT: Safe Stack instrumentation pass
|
|
; CHECK-NEXT: Insert stack protectors
|
|
; CHECK-NEXT: Module Verifier
|
|
; CHECK-NEXT: X86 DAG->DAG Instruction Selection
|
|
; CHECK-NEXT: X86 PIC Global Base Reg Initialization
|
|
; CHECK-NEXT: Expand ISel Pseudo-instructions
|
|
; CHECK-NEXT: Local Stack Slot Allocation
|
|
; CHECK-NEXT: X86 speculative load hardening
|
|
; CHECK-NEXT: MachineDominator Tree Construction
|
|
; CHECK-NEXT: X86 EFLAGS copy lowering
|
|
; CHECK-NEXT: X86 WinAlloca Expander
|
|
; CHECK-NEXT: Eliminate PHI nodes for register allocation
|
|
; CHECK-NEXT: Two-Address instruction pass
|
|
; CHECK-NEXT: Fast Register Allocator
|
|
; CHECK-NEXT: Bundle Machine CFG Edges
|
|
; CHECK-NEXT: X86 FP Stackifier
|
|
; CHECK-NEXT: Lazy Machine Block Frequency Analysis
|
|
; CHECK-NEXT: Machine Optimization Remark Emitter
|
|
; CHECK-NEXT: Prologue/Epilogue Insertion & Frame Finalization
|
|
; CHECK-NEXT: Post-RA pseudo instruction expansion pass
|
|
; CHECK-NEXT: X86 pseudo instruction expansion pass
|
|
; CHECK-NEXT: Analyze Machine Code For Garbage Collection
|
|
; CHECK-NEXT: Shadow Call Stack
|
|
; CHECK-NEXT: X86 Indirect Branch Tracking
|
|
; CHECK-NEXT: X86 vzeroupper inserter
|
|
; CHECK-NEXT: Contiguously Lay Out Funclets
|
|
; CHECK-NEXT: StackMap Liveness Analysis
|
|
; CHECK-NEXT: Live DEBUG_VALUE analysis
|
|
; CHECK-NEXT: Insert fentry calls
|
|
; CHECK-NEXT: Insert XRay ops
|
|
; CHECK-NEXT: Implement the 'patchable-function' attribute
|
|
; CHECK-NEXT: X86 Retpoline Thunks
|
|
; CHECK-NEXT: Check CFA info and insert CFI instructions if needed
|
|
; CHECK-NEXT: Lazy Machine Block Frequency Analysis
|
|
; CHECK-NEXT: Machine Optimization Remark Emitter
|
|
; CHECK-NEXT: X86 Assembly Printer
|
|
; CHECK-NEXT: Free MachineFunction
|
|
|
|
define void @f() {
|
|
ret void
|
|
}
|