[PATCH] D50634: [RISCV] Add support for local PIC addressing

Roger Ferrer Ibanez via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 29 09:06:52 PDT 2018


rogfer01 added inline comments.


================
Comment at: lib/Target/RISCV/RISCVISelLowering.cpp:583
+
+  MachineBasicBlock *NewMBB = F->CreateMachineBasicBlock(LLVM_BB);
+  // Tell AsmPrinter that we unconditionally want the symbol of this label be
----------------
kito-cheng wrote:
> I am worry about that will become kind of barrier for local optimizations, such as instruction scheduling and Machine InstCombiner.
> 
> Those optimizations are only process one basic block at once, so it might block some optimization opportunity.
Good point.

Alternatively we can expand the `PseudoLLA` in AsmPrinter. I'm afraid it defeats a bit the original vision of being able to intersperse instructions between the `AUIPC` and the `ADDI` (perhaps I'm incorrectly presuming that not much can happen after AsmPrinter).

What do you think?


https://reviews.llvm.org/D50634





More information about the llvm-commits mailing list