It maybe emit the .option directive without any follow up. Only emit the .option push/pop when there are supported extension difference between function and module.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | ||
---|---|---|
282–283 | Can we call RTS.emitDirectiveOptionPush(); from emitDirectiveOptionArch() and have it return a bool to indicate that RTS.emitDirectiveOptionPop() needs to be called at the end of the function? |
Refactor the emitDirectiveOptionPush, emitDirectiveOptionArch and emitDirectiveOptionPop in RISCVAsmPrinter::runOnMachineFunction
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | ||
---|---|---|
257 | Don't we only need this when we call emitDirectiveOptionArch later? Can we use the same if? |
llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp | ||
---|---|---|
284 | NeedEmitOptionArch -> EmittedOptionArch since we already emitted it in the function. |
Don't we only need this when we call emitDirectiveOptionArch later? Can we use the same if?