Before this patch, we use two different ways to pass options to align branch depending on whether LTO is enabled. For example, -mbranches-within-32B-boundaries w/o LTO and -Wl,-plugin-opt=-x86-branches-within-32B-boundaries w/ LTO. It's inconvenient, so this patch unifies the way: we only need to pass options like -mbranches-within-32B-boundaries to align branches, no matter LTO is enabled or not.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/test/Driver/lto.c | ||
---|---|---|
81 ↗ | (On Diff #265204) | This piece of logic is closer to x86. The test can be added to x86-malign-branch.c instead |
clang/lib/Driver/ToolChains/CommonArgs.cpp | ||
---|---|---|
501 | The large chunk of code duplicates Clang.cpp:addX86AlignBranchArgs. Can you refactor addX86AlignBranchArgs to be reused here? |
Comment Actions
https://reviews.llvm.org/D80168#2046093
"Unless something is urgent, the usual practice is to ping after a week rather than 24 hours, as many people have big piles on their review plate, so can't always get to it the next day."
clang/test/Driver/x86-malign-branch.c | ||
---|---|---|
6 | Drop -unknown-linux ditto below |
clang/test/Driver/x86-malign-branch.c | ||
---|---|---|
6 | Sorry it seems I didn't submit my comment... Dropping -unknown-linux here would get an error error: 'x86_64': unable to pass LLVM bit-code files to linker |
clang/test/Driver/x86-malign-branch.c | ||
---|---|---|
6 | Ah, you are right. |
The large chunk of code duplicates Clang.cpp:addX86AlignBranchArgs.
Can you refactor addX86AlignBranchArgs to be reused here?