[llvm] r372234 - [Alignment][NFC] Align(1) to Align::None() conversions
Guillaume Chatelet via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 18 09:19:40 PDT 2019
Author: gchatelet
Date: Wed Sep 18 09:19:40 2019
New Revision: 372234
URL: http://llvm.org/viewvc/llvm-project?rev=372234&view=rev
Log:
[Alignment][NFC] Align(1) to Align::None() conversions
Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790
Reviewers: courbet
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D67715
Modified:
llvm/trunk/lib/CodeGen/MIRPrinter.cpp
llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
Modified: llvm/trunk/lib/CodeGen/MIRPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MIRPrinter.cpp?rev=372234&r1=372233&r2=372234&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MIRPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/MIRPrinter.cpp Wed Sep 18 09:19:40 2019
@@ -629,7 +629,7 @@ void MIPrinter::print(const MachineBasic
OS << "landing-pad";
HasAttributes = true;
}
- if (MBB.getAlignment() > 1) {
+ if (MBB.getAlignment() != llvm::Align::None()) {
OS << (HasAttributes ? ", " : " (");
OS << "align " << MBB.getAlignment().value();
HasAttributes = true;
Modified: llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp?rev=372234&r1=372233&r2=372234&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineBasicBlock.cpp Wed Sep 18 09:19:40 2019
@@ -326,7 +326,7 @@ void MachineBasicBlock::print(raw_ostrea
OS << "landing-pad";
HasAttributes = true;
}
- if (getAlignment() > 1) {
+ if (getAlignment() != llvm::Align::None()) {
OS << (HasAttributes ? ", " : " (");
OS << "align " << Log2(getAlignment());
HasAttributes = true;
More information about the llvm-commits
mailing list