[PATCH] D18046: [X86] Providing correct unwind info in function epilogue

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 21 10:50:29 PDT 2017


rnk added inline comments.


================
Comment at: lib/CodeGen/BranchFolding.cpp:289
+  MachineFunction &MF = *MBB1->getParent();
+  bool IsX86 = MF.getTarget().getTargetTriple().getArch() == Triple::x86_64 ||
+               MF.getTarget().getTargetTriple().getArch() == Triple::x86;
----------------
Please don't do these types of triple checks in target independent CodeGen code. Use TII.

What are you trying to do here? Avoid tail merging epilogues, or do more tail merging, or...?


================
Comment at: lib/CodeGen/BranchFolding.cpp:420
 
+  bool IsX86 = MF.getTarget().getTargetTriple().getArch() == Triple::x86_64 ||
+               MF.getTarget().getTargetTriple().getArch() == Triple::x86;
----------------
ditto


Repository:
  rL LLVM

https://reviews.llvm.org/D18046





More information about the llvm-commits mailing list