[llvm] r213034 - [FastISel] Insert patchpoint instruction before the target generated call instruction.

Juergen Ributzka juergen at apple.com
Mon Jul 14 19:22:46 PDT 2014


Author: ributzka
Date: Mon Jul 14 21:22:46 2014
New Revision: 213034

URL: http://llvm.org/viewvc/llvm-project?rev=213034&view=rev
Log:
[FastISel] Insert patchpoint instruction before the target generated call instruction.

The patchpoint instruction should have been inserted before the target
generated call instruction to be inside the ADJSTACKDOWN/ADJSTACKUP call
sequence window.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp?rev=213034&r1=213033&r2=213034&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/FastISel.cpp Mon Jul 14 21:22:46 2014
@@ -826,7 +826,8 @@ bool FastISel::SelectPatchpoint(const Ca
     Ops.push_back(MachineOperand::CreateReg(Reg, /*IsDef=*/true,
                                             /*IsImpl=*/true));
 
-  MachineInstrBuilder MIB = BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DbgLoc,
+  // Insert the patchpoint instruction before the call generated by the target.
+  MachineInstrBuilder MIB = BuildMI(*FuncInfo.MBB, CLI.Call, DbgLoc,
                                     TII.get(TargetOpcode::PATCHPOINT));
 
   for (auto &MO : Ops)





More information about the llvm-commits mailing list