[PATCH] D142041: [RISCV] Use TargetMachine MCSubtargetInfo in RISCVAsmPrinter::EmitHwasanMemaccessSymbols.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 10:25:45 PST 2023


craig.topper created this revision.
craig.topper added reviewers: asb, reames, luismarques.
Herald added subscribers: luke, VincentWu, vkmr, frasercrmck, evandro, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

The STI object in the class is updated each time runOnMachineFunction
is called. That means STI will be based on the last function processed.
If that function has different attributes than the rest of the module
that could theoretically result in odd behavior.

Use the copy in TargetMachine instead. That will use the global
CPU and mattrs.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D142041

Files:
  llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D142041.490222.patch
Type: text/x-patch
Size: 6794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230118/d8385c7a/attachment.bin>


More information about the llvm-commits mailing list