[PATCH] D46423: [WIP, RISCV] Support .option relax and .option norelax

Lewis Revill via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 05:57:34 PDT 2018


lewis-revill updated this revision to Diff 168277.
lewis-revill added a comment.

Well apologies for the noise and the late update, but it looks like we can't have an early `.option norelax` overriding the behaviour specified with `mattr=+relax`. This is because the lazy `ForceRelocs` variable was only set when parsing assembly, so with a standard IR pipeline this is never set so relocations are never emitted. This update reverses this behaviour but keeps the lazy behaviour when parsing assembly when `-mattr=-relax` is used.


Repository:
  rL LLVM

https://reviews.llvm.org/D46423

Files:
  lib/MC/MCAsmStreamer.cpp
  lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
  lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp
  lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.h
  lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp
  lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h
  lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp
  lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h
  test/MC/RISCV/option-invalid.s
  test/MC/RISCV/option-relax.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46423.168277.patch
Type: text/x-patch
Size: 18461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181004/7440039c/attachment.bin>


More information about the llvm-commits mailing list