From 6c3a95dab561ef9747876d14014e965f8688f55b Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Sun, 28 Jul 2013 06:43:11 +0000 Subject: Thread DataLayout through the callers and into mem2reg. This will be useful in a subsequent patch, but causes an unfortunate amount of noise, so I pulled it out into a separate patch. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187322 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Transforms/Utils/PromoteMemToReg.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/llvm/Transforms/Utils/PromoteMemToReg.h b/include/llvm/Transforms/Utils/PromoteMemToReg.h index 22f46e5..2f28f33 100644 --- a/include/llvm/Transforms/Utils/PromoteMemToReg.h +++ b/include/llvm/Transforms/Utils/PromoteMemToReg.h @@ -20,6 +20,7 @@ namespace llvm { class AllocaInst; +class DataLayout; class DominatorTree; class AliasSetTracker; @@ -29,7 +30,7 @@ class AliasSetTracker; /// (transitively) using this alloca. This also enforces that there is only /// ever one layer of bitcasts or GEPs between the alloca and the lifetime /// markers. -bool isAllocaPromotable(const AllocaInst *AI); +bool isAllocaPromotable(const AllocaInst *AI, const DataLayout *DL); /// \brief Promote the specified list of alloca instructions into scalar /// registers, inserting PHI nodes as appropriate. @@ -41,7 +42,7 @@ bool isAllocaPromotable(const AllocaInst *AI); /// If AST is specified, the specified tracker is updated to reflect changes /// made to the IR. void PromoteMemToReg(ArrayRef Allocas, DominatorTree &DT, - AliasSetTracker *AST = 0); + const DataLayout *DL, AliasSetTracker *AST = 0); } // End llvm namespace -- cgit v1.1