[PATCH] D36703: IPRA: Exit early on functions without calls
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 11:49:31 PDT 2017
arsenm created this revision.
Herald added a subscriber: wdng.
https://reviews.llvm.org/D36703
Files:
lib/CodeGen/RegUsageInfoPropagate.cpp
Index: lib/CodeGen/RegUsageInfoPropagate.cpp
===================================================================
--- lib/CodeGen/RegUsageInfoPropagate.cpp
+++ lib/CodeGen/RegUsageInfoPropagate.cpp
@@ -21,6 +21,7 @@
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunctionPass.h"
+#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/Passes.h"
@@ -109,6 +110,10 @@
<< " ++++++++++++++++++++ \n");
DEBUG(dbgs() << "MachineFunction : " << MF.getName() << "\n");
+ const MachineFrameInfo &MFI = MF.getFrameInfo();
+ if (!MFI.hasCalls() && !MFI.hasTailCall())
+ return false;
+
bool Changed = false;
for (MachineBasicBlock &MBB : MF) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36703.111040.patch
Type: text/x-patch
Size: 797 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170814/ca8078e0/attachment.bin>
More information about the llvm-commits
mailing list