mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 16:24:23 +00:00
DataLayout is mandatory, update the API to reflect it with references.
Summary: Now that the DataLayout is a mandatory part of the module, let's start cleaning the codebase. This patch is a first attempt at doing that. This patch is not exactly NFC as for instance some places were passing a nullptr instead of the DataLayout, possibly just because there was a default value on the DataLayout argument to many functions in the API. Even though it is not purely NFC, there is no change in the validation. I turned as many pointer to DataLayout to references, this helped figuring out all the places where a nullptr could come up. I had initially a local version of this patch broken into over 30 independant, commits but some later commit were cleaning the API and touching part of the code modified in the previous commits, so it seemed cleaner without the intermediate state. Test Plan: Reviewers: echristo Subscribers: llvm-commits From: Mehdi Amini <mehdi.amini@apple.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231740 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -52,7 +52,6 @@ BasicBlock *InsertPreheaderForLoop(Loop *L, Pass *P);
|
||||
/// passed into it.
|
||||
bool simplifyLoop(Loop *L, DominatorTree *DT, LoopInfo *LI, Pass *PP,
|
||||
AliasAnalysis *AA = nullptr, ScalarEvolution *SE = nullptr,
|
||||
const DataLayout *DL = nullptr,
|
||||
AssumptionCache *AC = nullptr);
|
||||
|
||||
/// \brief Put loop into LCSSA form.
|
||||
@ -85,13 +84,13 @@ bool formLCSSARecursively(Loop &L, DominatorTree &DT, LoopInfo *LI,
|
||||
/// dominated by the specified block, and that are in the current loop) in
|
||||
/// reverse depth first order w.r.t the DominatorTree. This allows us to visit
|
||||
/// uses before definitions, allowing us to sink a loop body in one pass without
|
||||
/// iteration. Takes DomTreeNode, AliasAnalysis, LoopInfo, DominatorTree,
|
||||
/// DataLayout, TargetLibraryInfo, Loop, AliasSet information for all
|
||||
/// instructions of the loop and loop safety information as arguments.
|
||||
/// It returns changed status.
|
||||
/// iteration. Takes DomTreeNode, AliasAnalysis, LoopInfo, DominatorTree,
|
||||
/// DataLayout, TargetLibraryInfo, Loop, AliasSet information for all
|
||||
/// instructions of the loop and loop safety information as arguments.
|
||||
/// It returns changed status.
|
||||
bool sinkRegion(DomTreeNode *, AliasAnalysis *, LoopInfo *, DominatorTree *,
|
||||
const DataLayout *, TargetLibraryInfo *, Loop *,
|
||||
AliasSetTracker *, LICMSafetyInfo *);
|
||||
TargetLibraryInfo *, Loop *, AliasSetTracker *,
|
||||
LICMSafetyInfo *);
|
||||
|
||||
/// \brief Walk the specified region of the CFG (defined by all blocks
|
||||
/// dominated by the specified block, and that are in the current loop) in depth
|
||||
@ -101,8 +100,8 @@ bool sinkRegion(DomTreeNode *, AliasAnalysis *, LoopInfo *, DominatorTree *,
|
||||
/// TargetLibraryInfo, Loop, AliasSet information for all instructions of the
|
||||
/// loop and loop safety information as arguments. It returns changed status.
|
||||
bool hoistRegion(DomTreeNode *, AliasAnalysis *, LoopInfo *, DominatorTree *,
|
||||
const DataLayout *, TargetLibraryInfo *, Loop *,
|
||||
AliasSetTracker *, LICMSafetyInfo *);
|
||||
TargetLibraryInfo *, Loop *, AliasSetTracker *,
|
||||
LICMSafetyInfo *);
|
||||
|
||||
/// \brief Try to promote memory values to scalars by sinking stores out of
|
||||
/// the loop and moving loads to before the loop. We do this by looping over
|
||||
|
Reference in New Issue
Block a user