[PATCH] D72227: Add options for clang to align branches within 32B boundary

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 9 00:25:37 PST 2020


MaskRay added inline comments.


================
Comment at: clang/include/clang/Driver/Options.td:2196
+    : Joined<["-"], "malign-branch-boundary=">,
+      Group<m_Group>,
+      Flags<[DriverOption, HelpHidden]>,
----------------
`Group<m_x86_Features_Group>`


================
Comment at: clang/include/clang/Driver/Options.td:2200
+          "Control how the assembler should align branches with NOP or segment "
+          "override prefix. If the boundary's size is not 0, it should be a "
+          "power of 2 and no less than 32. Branches will be aligned to prevent "
----------------
"It should be 0 or a power of 2 no less than 16."

Do you want to preclude 16?

Long descriptions should be placed in `DocBrief` values.


================
Comment at: clang/include/clang/Driver/Options.td:2203
+          "from being across or against the boundary of specified size. "
+          "-malign-branch-boundary=0 doesn't align branches.">;
+def malign_branch_EQ
----------------
"The default value 0 does not align branches."


================
Comment at: clang/include/clang/Driver/Options.td:2234
+      Flags<[DriverOption]>,
+      HelpText<"Opposite to -mbranches-within-32B-boundaries.">;
 def mfloat_abi_EQ : Joined<["-"], "mfloat-abi=">, Group<m_Group>, Values<"soft,softfp,hard">;
----------------
> HelpText<"Opposite to -mbranches-within-32B-boundaries.">;

Delete. No need to elaborate.


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

https://reviews.llvm.org/D72227





More information about the cfe-commits mailing list