[llvm] [BOLT][RISCV] Set minimum function alignment to 2 for RVC (PR #69837)
Job Noorman via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 21 06:35:25 PDT 2023
================
@@ -490,6 +491,10 @@ class RISCVMCPlusBuilder : public MCPlusBuilder {
assert(Second.getOpcode() == RISCV::JALR);
return true;
}
+
+ uint16_t getMinFunctionAlignment() const override {
+ return STI->getFeatureBits()[RISCV::FeatureStdExtC] ? 2 : 4;
----------------
mtvec wrote:
Thanks for that @asb, `hasFeature` indeed makes the code clearer. Updated and added Zca.
https://github.com/llvm/llvm-project/pull/69837
More information about the llvm-commits
mailing list