mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 23:17:10 +00:00
Patch to make some xforms preserve each other. Patch contributed by
Domagoj Babic! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28181 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/Instructions.h"
|
||||
#include "llvm/Pass.h"
|
||||
@@ -37,7 +38,11 @@ namespace {
|
||||
LowerSelect(bool onlyfp = false) : OnlyFP(onlyfp) {}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
// Doesn't really preserve anything. It can certainly destroy the CFG.
|
||||
// This certainly destroys the CFG.
|
||||
// This is a cluster of orthogonal Transforms:
|
||||
AU.addPreserved<UnifyFunctionExitNodes>();
|
||||
AU.addPreservedID(PromoteMemoryToRegisterID);
|
||||
AU.addPreservedID(LowerSwitchID);
|
||||
}
|
||||
|
||||
bool runOnFunction(Function &F);
|
||||
|
Reference in New Issue
Block a user