[llvm] [MachineBlockPlacement][X86] Use max of MDAlign and TLIAlign to align Loops. (PR #71026)

Freddy Ye via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 20 18:49:24 PST 2023


================
@@ -66,6 +67,14 @@ class MachineLoop : public LoopBase<MachineBasicBlock, MachineLoop> {
   /// it returns an unknown location.
   DebugLoc getStartLoc() const;
 
+  /// \brief Find the llvm.loop metadata for this loop.
+  /// If each branch to the header of this loop contains the same llvm.loop
+  /// metadata, then this metadata node is returned. Otherwise, if any
+  /// latch instruction does not contain the llvm.loop metadata or
+  /// multiple latch instructions contain different llvm.loop metadata nodes,
+  /// then null is returned.
----------------
FreddyLeaf wrote:

it is allowed to not set this loop metadata node from front end and patch wants to set a default alignment for such situation.

https://github.com/llvm/llvm-project/pull/71026


More information about the llvm-commits mailing list