[llvm] 20a0c48 - [LICM] Use Align instead of int
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 8 18:26:57 PDT 2021
Author: Arthur Eubanks
Date: 2021-10-08T18:26:15-07:00
New Revision: 20a0c482e030df701fb2c94683c57c73d2e2e94c
URL: https://github.com/llvm/llvm-project/commit/20a0c482e030df701fb2c94683c57c73d2e2e94c
DIFF: https://github.com/llvm/llvm-project/commit/20a0c482e030df701fb2c94683c57c73d2e2e94c.diff
LOG: [LICM] Use Align instead of int
Added:
Modified:
llvm/lib/Transforms/Scalar/LICM.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index b8a0f86d7c26b..a1fa0e3360483 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -1857,7 +1857,7 @@ class LoopPromoter : public LoadAndStorePromoter {
MemorySSAUpdater *MSSAU;
LoopInfo &LI;
DebugLoc DL;
- int Alignment;
+ Align Alignment;
bool UnorderedAtomic;
AAMDNodes AATags;
ICFLoopSafetyInfo &SafetyInfo;
@@ -1886,12 +1886,12 @@ class LoopPromoter : public LoadAndStorePromoter {
SmallVectorImpl<Instruction *> &LIP,
SmallVectorImpl<MemoryAccess *> &MSSAIP, PredIteratorCache &PIC,
MemorySSAUpdater *MSSAU, LoopInfo &li, DebugLoc dl,
- int alignment, bool UnorderedAtomic, const AAMDNodes &AATags,
+ Align Alignment, bool UnorderedAtomic, const AAMDNodes &AATags,
ICFLoopSafetyInfo &SafetyInfo)
: LoadAndStorePromoter(Insts, S), SomePtr(SP), PointerMustAliases(PMA),
LoopExitBlocks(LEB), LoopInsertPts(LIP), MSSAInsertPts(MSSAIP),
PredCache(PIC), MSSAU(MSSAU), LI(li), DL(std::move(dl)),
- Alignment(alignment), UnorderedAtomic(UnorderedAtomic), AATags(AATags),
+ Alignment(Alignment), UnorderedAtomic(UnorderedAtomic), AATags(AATags),
SafetyInfo(SafetyInfo) {}
bool isInstInList(Instruction *I,
@@ -1918,7 +1918,7 @@ class LoopPromoter : public LoadAndStorePromoter {
StoreInst *NewSI = new StoreInst(LiveInValue, Ptr, InsertPos);
if (UnorderedAtomic)
NewSI->setOrdering(AtomicOrdering::Unordered);
- NewSI->setAlignment(Align(Alignment));
+ NewSI->setAlignment(Alignment);
NewSI->setDebugLoc(DL);
if (AATags)
NewSI->setAAMetadata(AATags);
@@ -2225,8 +2225,7 @@ bool llvm::promoteLoopAccessesToScalars(
SSAUpdater SSA(&NewPHIs);
LoopPromoter Promoter(SomePtr, LoopUses, SSA, PointerMustAliases, ExitBlocks,
InsertPts, MSSAInsertPts, PIC, MSSAU, *LI, DL,
- Alignment.value(), SawUnorderedAtomic, AATags,
- *SafetyInfo);
+ Alignment, SawUnorderedAtomic, AATags, *SafetyInfo);
// Set up the preheader to have a definition of the value. It is the live-out
// value from the preheader that uses in the loop will use.
More information about the llvm-commits
mailing list