mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Convert several more passes to use getAnalysisIfAvailable<TargetData>()
instead of getAnalysis<TargetData>(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76982 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -39,7 +39,6 @@ namespace {
|
||||
bool runOnFunction(Function &F);
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.addRequired<TargetData>();
|
||||
}
|
||||
|
||||
Instruction *
|
||||
@@ -123,7 +122,7 @@ SimplifyHalfPowrLibCalls::InlineHalfPowrs(const std::vector<Instruction *> &Half
|
||||
/// runOnFunction - Top level algorithm.
|
||||
///
|
||||
bool SimplifyHalfPowrLibCalls::runOnFunction(Function &F) {
|
||||
TD = &getAnalysis<TargetData>();
|
||||
TD = getAnalysisIfAvailable<TargetData>();
|
||||
|
||||
bool Changed = false;
|
||||
std::vector<Instruction *> HalfPowrs;
|
||||
|
Reference in New Issue
Block a user