mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-21 21:41:43 +00:00
Move SafeStack to CodeGen.
It depends on the target machinery, that's not available for instrumentation passes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258942 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
705e6271de
commit
b714d34a7e
@ -667,6 +667,10 @@ namespace llvm {
|
||||
Pass *createGlobalMergePass(const TargetMachine *TM, unsigned MaximalOffset,
|
||||
bool OnlyOptimizeForSize = false,
|
||||
bool MergeExternalByDefault = false);
|
||||
|
||||
/// This pass splits the stack into a safe stack and an unsafe stack to
|
||||
/// protect against stack-based overflow vulnerabilities.
|
||||
FunctionPass *createSafeStackPass(const TargetMachine *TM = nullptr);
|
||||
} // End llvm namespace
|
||||
|
||||
/// Target machine pass initializer for passes with dependencies. Use with
|
||||
|
@ -150,10 +150,6 @@ inline ModulePass *createDataFlowSanitizerPassForJIT(
|
||||
// checking on loads, stores, and other memory intrinsics.
|
||||
FunctionPass *createBoundsCheckingPass();
|
||||
|
||||
/// \brief This pass splits the stack into a safe stack and an unsafe stack to
|
||||
/// protect against stack-based overflow vulnerabilities.
|
||||
FunctionPass *createSafeStackPass(const TargetMachine *TM = nullptr);
|
||||
|
||||
/// \brief Calculate what to divide by to scale counts.
|
||||
///
|
||||
/// Given the maximum count, calculate a divisor that will scale all the
|
||||
|
@ -16,15 +16,14 @@ add_llvm_library(LLVMCodeGen
|
||||
CodeGen.cpp
|
||||
CodeGenPrepare.cpp
|
||||
CriticalAntiDepBreaker.cpp
|
||||
DFAPacketizer.cpp
|
||||
DeadMachineInstructionElim.cpp
|
||||
DFAPacketizer.cpp
|
||||
DwarfEHPrepare.cpp
|
||||
EarlyIfConversion.cpp
|
||||
EdgeBundles.cpp
|
||||
ExecutionDepsFix.cpp
|
||||
ExpandISelPseudos.cpp
|
||||
ExpandPostRAPseudos.cpp
|
||||
LiveDebugValues.cpp
|
||||
FaultMaps.cpp
|
||||
FuncletLayout.cpp
|
||||
GCMetadata.cpp
|
||||
@ -38,57 +37,58 @@ add_llvm_library(LLVMCodeGen
|
||||
InterferenceCache.cpp
|
||||
InterleavedAccessPass.cpp
|
||||
IntrinsicLowering.cpp
|
||||
LLVMTargetMachine.cpp
|
||||
LatencyPriorityQueue.cpp
|
||||
LexicalScopes.cpp
|
||||
LiveDebugValues.cpp
|
||||
LiveDebugVariables.cpp
|
||||
LiveInterval.cpp
|
||||
LiveIntervalAnalysis.cpp
|
||||
LiveInterval.cpp
|
||||
LiveIntervalUnion.cpp
|
||||
LivePhysRegs.cpp
|
||||
LiveRangeCalc.cpp
|
||||
LiveRangeEdit.cpp
|
||||
LiveRegMatrix.cpp
|
||||
LivePhysRegs.cpp
|
||||
LiveStackAnalysis.cpp
|
||||
LiveVariables.cpp
|
||||
LLVMTargetMachine.cpp
|
||||
LocalStackSlotAllocation.cpp
|
||||
LowerEmuTLS.cpp
|
||||
MachineBasicBlock.cpp
|
||||
MachineBlockFrequencyInfo.cpp
|
||||
MachineBlockPlacement.cpp
|
||||
MachineBranchProbabilityInfo.cpp
|
||||
MachineCSE.cpp
|
||||
MachineCombiner.cpp
|
||||
MachineCopyPropagation.cpp
|
||||
MachineDominators.cpp
|
||||
MachineCSE.cpp
|
||||
MachineDominanceFrontier.cpp
|
||||
MachineFunction.cpp
|
||||
MachineDominators.cpp
|
||||
MachineFunctionAnalysis.cpp
|
||||
MachineFunction.cpp
|
||||
MachineFunctionPass.cpp
|
||||
MachineFunctionPrinterPass.cpp
|
||||
MachineInstr.cpp
|
||||
MachineInstrBundle.cpp
|
||||
MachineInstr.cpp
|
||||
MachineLICM.cpp
|
||||
MachineLoopInfo.cpp
|
||||
MachineModuleInfo.cpp
|
||||
MachineModuleInfoImpls.cpp
|
||||
MachinePassRegistry.cpp
|
||||
MachinePostDominators.cpp
|
||||
MachineRegisterInfo.cpp
|
||||
MachineRegionInfo.cpp
|
||||
MachineSSAUpdater.cpp
|
||||
MachineRegisterInfo.cpp
|
||||
MachineScheduler.cpp
|
||||
MachineSink.cpp
|
||||
MachineSSAUpdater.cpp
|
||||
MachineTraceMetrics.cpp
|
||||
MachineVerifier.cpp
|
||||
MIRPrinter.cpp
|
||||
MIRPrintingPass.cpp
|
||||
OptimizePHIs.cpp
|
||||
PHIElimination.cpp
|
||||
PHIEliminationUtils.cpp
|
||||
ParallelCG.cpp
|
||||
Passes.cpp
|
||||
PeepholeOptimizer.cpp
|
||||
PHIElimination.cpp
|
||||
PHIEliminationUtils.cpp
|
||||
PostRASchedulerList.cpp
|
||||
ProcessImplicitDefs.cpp
|
||||
PrologEpilogInserter.cpp
|
||||
@ -102,21 +102,22 @@ add_llvm_library(LLVMCodeGen
|
||||
RegisterCoalescer.cpp
|
||||
RegisterPressure.cpp
|
||||
RegisterScavenging.cpp
|
||||
SafeStack.cpp
|
||||
ScheduleDAG.cpp
|
||||
ScheduleDAGInstrs.cpp
|
||||
ScheduleDAGPrinter.cpp
|
||||
ScoreboardHazardRecognizer.cpp
|
||||
ShrinkWrap.cpp
|
||||
ShadowStackGCLowering.cpp
|
||||
ShrinkWrap.cpp
|
||||
SjLjEHPrepare.cpp
|
||||
SlotIndexes.cpp
|
||||
SpillPlacement.cpp
|
||||
SplitKit.cpp
|
||||
StackColoring.cpp
|
||||
StackProtector.cpp
|
||||
StackSlotColoring.cpp
|
||||
StackMapLivenessAnalysis.cpp
|
||||
StackMaps.cpp
|
||||
StackProtector.cpp
|
||||
StackSlotColoring.cpp
|
||||
TailDuplication.cpp
|
||||
TargetFrameLoweringImpl.cpp
|
||||
TargetInstrInfo.cpp
|
||||
|
@ -68,6 +68,7 @@ void llvm::initializeCodeGen(PassRegistry &Registry) {
|
||||
initializeStackColoringPass(Registry);
|
||||
initializeStackMapLivenessPass(Registry);
|
||||
initializeLiveDebugValuesPass(Registry);
|
||||
initializeSafeStackPass(Registry);
|
||||
initializeStackProtectorPass(Registry);
|
||||
initializeStackSlotColoringPass(Registry);
|
||||
initializeTailDuplicatePassPass(Registry);
|
||||
|
@ -15,22 +15,22 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Transforms/Instrumentation.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
#include "llvm/ADT/Triple.h"
|
||||
#include "llvm/Analysis/ScalarEvolution.h"
|
||||
#include "llvm/Analysis/ScalarEvolutionExpressions.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/CodeGen/Passes.h"
|
||||
#include "llvm/IR/Constants.h"
|
||||
#include "llvm/IR/DIBuilder.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/IR/DerivedTypes.h"
|
||||
#include "llvm/IR/DIBuilder.h"
|
||||
#include "llvm/IR/Function.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/InstIterator.h"
|
||||
#include "llvm/IR/Instructions.h"
|
||||
#include "llvm/IR/IntrinsicInst.h"
|
||||
#include "llvm/IR/Intrinsics.h"
|
||||
#include "llvm/IR/IRBuilder.h"
|
||||
#include "llvm/IR/Module.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
@ -7,7 +7,6 @@ add_llvm_library(LLVMInstrumentation
|
||||
Instrumentation.cpp
|
||||
InstrProfiling.cpp
|
||||
PGOInstrumentation.cpp
|
||||
SafeStack.cpp
|
||||
SanitizerCoverage.cpp
|
||||
ThreadSanitizer.cpp
|
||||
|
||||
|
@ -67,7 +67,6 @@ void llvm::initializeInstrumentation(PassRegistry &Registry) {
|
||||
initializeThreadSanitizerPass(Registry);
|
||||
initializeSanitizerCoverageModulePass(Registry);
|
||||
initializeDataFlowSanitizerPass(Registry);
|
||||
initializeSafeStackPass(Registry);
|
||||
}
|
||||
|
||||
/// LLVMInitializeInstrumentation - C binding for
|
||||
|
@ -329,6 +329,7 @@ int main(int argc, char **argv) {
|
||||
initializeRewriteSymbolsPass(Registry);
|
||||
initializeWinEHPreparePass(Registry);
|
||||
initializeDwarfEHPreparePass(Registry);
|
||||
initializeSafeStackPass(Registry);
|
||||
initializeSjLjEHPreparePass(Registry);
|
||||
|
||||
#ifdef LINK_POLLY_INTO_TOOLS
|
||||
|
Loading…
x
Reference in New Issue
Block a user