[PATCH] D67229: [Alignment][NFC] Use Align with TargetLowering::setMinFunctionAlignment

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 6 05:14:32 PDT 2019


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


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:201
   // Function alignments (log2).
-  unsigned FunctionAlignment = Subtarget.hasStdExtC() ? 1 : 2;
-  setMinFunctionLogAlignment(FunctionAlignment);
-  setPrefFunctionLogAlignment(FunctionAlignment);
+  llvm::Align FunctionAlignment(Subtarget.hasStdExtC() ? 2 : 4);
+  setMinFunctionAlignment(FunctionAlignment);
----------------
const ?


================
Comment at: llvm/lib/Target/SystemZ/SystemZISelLowering.cpp:123
   // Instructions are strings of 2-byte aligned 2-byte values.
-  setMinFunctionLogAlignment(2);
+  setMinFunctionAlignment(llvm::Align(4));
   // For performance reasons we prefer 16-byte alignment.
----------------
gchatelet wrote:
> This one seems suspicious, it looks like it should be 2 byte aligned.
Let's submit the NFC change and create a separate patch for the semantic change.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67229





More information about the llvm-commits mailing list