[PATCH] D73260: [Alignement][NFC] Deprecate untyped CreateAlignedLoad

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 02:48:55 PST 2020


courbet accepted this revision.
courbet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:1723
+    Builder.CreateAlignedStore(CASExpected, AllocaCASExpected,
+                               AllocaAlignment.value());
     Args.push_back(AllocaCASExpected_i8);
----------------
You don't need the  `.value()` here, there is a `MaybeAlign` overload.


================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:1740
+      Builder.CreateAlignedStore(ValueOperand, AllocaValue,
+                                 AllocaAlignment.value());
       Args.push_back(AllocaValue_i8);
----------------
ditto


================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp:468
     // Else we may inadvertently incorrectly over-promise alignment.
-    Align = getDataLayout().getABITypeAlignment(LI.getType());
+  const llvm::Align Align =
+      getDataLayout().getValueOrABITypeAlignment(LI.getAlign(), LI.getType());
----------------
remove `llvm` , use auto ?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73260/new/

https://reviews.llvm.org/D73260





More information about the llvm-commits mailing list