[PATCH] D63547: [AIX]Global Address Lowering

Xiangling Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 17 11:44:38 PDT 2019


Xiangling_L marked an inline comment as done.
Xiangling_L added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCTargetMachine.cpp:251
   }
-  if (!TT.isOSDarwin() && !JIT &&
+  if (!TT.isOSAIX() && !TT.isOSDarwin() && !JIT &&
       (TT.getArch() == Triple::ppc64 || TT.getArch() == Triple::ppc64le))
----------------
sfertile wrote:
> I suggest we take this chance to split this up. It gets longer, but I think much more readable. Something along the lines of:
> 
> 
> ```
> if (JIT)
>   return CodeModel::Small;
> 
> if (TT.isOSAIX())
>   return CodeModel::Small;
> 
> assert(TT.isOSBinFormatELF() && "All remaining PPC OSs are ELF based.");
> 
> if (TT.isArch32())
>   return CodeMode::Small;
> 
> assert(TT.isArch64() && "Unsupported  PPC architecture.");
> return CodeModel::Medium;
> ```
> 
> I made the assumption we don't have to support Darwin here anymore. There may be 1 or 2 tests left that use a Darwin target with llvm-mc. If you encounter problems I'll look at changing the test to no longer need darwin if possible. I think we have reached a point where we should try to actively clean up the darwin code.
Thanks, I updated it. And there is no Darwin LIT testcase failure currently. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63547





More information about the llvm-commits mailing list