[PATCH] D72227: Add options for clang to align branches within 32B boundary
annita.zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 6 23:02:41 PST 2020
annita.zhang added inline comments.
================
Comment at: clang/include/clang/Driver/Options.td:2198
+ "should be a power of 2 and no less than 32. Branches will be "
+ "aligned within the boundary of specified size. "
+ "-x86-align-branch-boundary=0 doesn't align branches.">;
----------------
"aligned to prevent from being across or against the boundary of specified size."
================
Comment at: clang/include/clang/Driver/Options.td:2206
+ "Specify types of branches to align (plus separated list of "
+ "types). The branches's types is combination of jcc, fused, "
+ "jmp, call, ret, indirect."
----------------
"types). The branches' types are combination of jcc, fused, "
================
Comment at: clang/include/clang/Driver/Options.td:2208-2211
+ " jcc, which aligns conditional jumps; fused, which aligns fused "
+ "conditional jumps; jmp, which aligns unconditional jumps; call, "
+ "which aligns calls; ret, which aligns rets; indirect, which "
+ "aligns indirect jumps.">;
----------------
"jcc indicates conditional jumps, fused indicates fused conditional jumps,"
"jmp indicates unconditional jumps, call indicates direct and indirect calls,"
"ret indicates rets, indirect indicates indirect jumps."
================
Comment at: clang/include/clang/Driver/Options.td:2217
+ HelpText<"Specify the maximum number of prefixes on an instruction to "
+ "align branches. The number should be between 0 and 4.">;
+def mbranches_within_32B_boundaries
----------------
Is there an upbound for this parameter?
================
Comment at: clang/include/clang/Driver/Options.td:2227
+ "instruction. It is equivalent to -malign-branch-boundary=32, "
+ "-malign-branch=fused+jcc+jmp, -malign-branch-prefix-size=4.">;
+def mno_branches_within_32B_boundaries
----------------
-malign-branch-prefix-size=5.">;
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72227/new/
https://reviews.llvm.org/D72227
More information about the cfe-commits
mailing list