comparison include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h @ 148:63bd29f05246

merged
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 14 Aug 2019 19:46:37 +0900
parents c2174574ed3a
children
comparison
equal deleted inserted replaced
146:3fc4d5c3e21e 148:63bd29f05246
1 //===---- AlignmentFromAssumptions.h ----------------------------*- C++ -*-===// 1 //===---- AlignmentFromAssumptions.h ----------------------------*- C++ -*-===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // 4 // See https://llvm.org/LICENSE.txt for license information.
5 // This file is distributed under the University of Illinois Open Source 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 // License. See LICENSE.TXT for details.
7 // 6 //
8 //===----------------------------------------------------------------------===// 7 //===----------------------------------------------------------------------===//
9 // 8 //
10 // This file implements a ScalarEvolution-based transformation to set 9 // This file implements a ScalarEvolution-based transformation to set
11 // the alignments of load, stores and memory intrinsics based on the truth 10 // the alignments of load, stores and memory intrinsics based on the truth
31 30
32 // Glue for old PM. 31 // Glue for old PM.
33 bool runImpl(Function &F, AssumptionCache &AC, ScalarEvolution *SE_, 32 bool runImpl(Function &F, AssumptionCache &AC, ScalarEvolution *SE_,
34 DominatorTree *DT_); 33 DominatorTree *DT_);
35 34
36 // For memory transfers, we need a common alignment for both the source and
37 // destination. If we have a new alignment for only one operand of a transfer
38 // instruction, save it in these maps. If we reach the other operand through
39 // another assumption later, then we may change the alignment at that point.
40 DenseMap<MemTransferInst *, unsigned> NewDestAlignments, NewSrcAlignments;
41
42 ScalarEvolution *SE = nullptr; 35 ScalarEvolution *SE = nullptr;
43 DominatorTree *DT = nullptr; 36 DominatorTree *DT = nullptr;
44 37
45 bool extractAlignmentInfo(CallInst *I, Value *&AAPtr, const SCEV *&AlignSCEV, 38 bool extractAlignmentInfo(CallInst *I, Value *&AAPtr, const SCEV *&AlignSCEV,
46 const SCEV *&OffSCEV); 39 const SCEV *&OffSCEV);