[PATCH] D78517: [PC Relative][Expolitation] Remove "unskipableSimplifyCode()" in PPCMIPeephole.cpp

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 24 15:12:13 PDT 2020


nemanjai accepted this revision.
nemanjai added a comment.

LGTM. Thanks for cleaning this up.



================
Comment at: llvm/lib/Target/PowerPC/PPCMIPeephole.cpp:128
     initialize(MF);
-    // FIXME: This introduces another complete traversal of the instructions
-    // in the function in the common case (function is not skipped). Although
-    // this is less than ideal for compile time, this code will go away once
-    // our PC-Rel implementation is complete.
-    unskipableSimplifyCode();
+    // At this point, R2 can be only used as the TOC pointer, which should not
+    // be found when using PC Relative.
----------------
stefanp wrote:
> anil9 wrote:
> > nit : For both the comment and the message in the assert. Ending the sentences with just "PC Relative" seems incorrect, may be use PC Relative instructions/functionality/operations. I see many asserts ending with or without full stops and some with exclamation sign. Not sure which one is correct.
> You could use `PC Relative addressing` because that's what it really is. It is a way to generate the address of something without using the TOC pointer in R2.
I don't think we should be mentioning `R2` as that doesn't really indicate what the problem is:
`TOC pointer use in function that uses PC-Relative addressing`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D78517/new/

https://reviews.llvm.org/D78517





More information about the llvm-commits mailing list