blob: 6cda7ad1c3b83848af0137db4f7cacb8ce596bb7 [file] [log] [blame]
Eric Christopher213a5da2015-12-21 23:04:27 +00001//===------- X86ExpandPseudo.cpp - Expand pseudo instructions -------------===//
2//
Chandler Carruth2946cd72019-01-19 08:50:56 +00003// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
Eric Christopher213a5da2015-12-21 23:04:27 +00006//
7//===----------------------------------------------------------------------===//
8//
9// This file contains a pass that expands pseudo instructions into target
10// instructions to allow proper scheduling, if-conversion, other late
11// optimizations, or simply the encoding of the instructions.
12//
13//===----------------------------------------------------------------------===//
14
15#include "X86.h"
16#include "X86FrameLowering.h"
17#include "X86InstrBuilder.h"
18#include "X86InstrInfo.h"
19#include "X86MachineFunctionInfo.h"
20#include "X86Subtarget.h"
21#include "llvm/Analysis/EHPersonalities.h"
22#include "llvm/CodeGen/MachineFunctionPass.h"
23#include "llvm/CodeGen/MachineInstrBuilder.h"
24#include "llvm/CodeGen/Passes.h" // For IDs of passes that are preserved.
25#include "llvm/IR/GlobalValue.h"
26using namespace llvm;
27
28#define DEBUG_TYPE "x86-pseudo"
Francis Visoiu Mistrihab051a32019-04-05 20:18:21 +000029#define X86_EXPAND_PSEUDO_NAME "X86 pseudo instruction expansion pass"
Eric Christopher213a5da2015-12-21 23:04:27 +000030
31namespace {
32class X86ExpandPseudo : public MachineFunctionPass {
33public:
34 static char ID;
35 X86ExpandPseudo() : MachineFunctionPass(ID) {}
36
37 void getAnalysisUsage(AnalysisUsage &AU) const override {
38 AU.setPreservesCFG();
39 AU.addPreservedID(MachineLoopInfoID);
40 AU.addPreservedID(MachineDominatorsID);
41 MachineFunctionPass::getAnalysisUsage(AU);
42 }
43
44 const X86Subtarget *STI;
45 const X86InstrInfo *TII;
46 const X86RegisterInfo *TRI;
Quentin Colombetfb82c7b2016-07-11 21:03:03 +000047 const X86MachineFunctionInfo *X86FI;
Eric Christopher213a5da2015-12-21 23:04:27 +000048 const X86FrameLowering *X86FL;
49
50 bool runOnMachineFunction(MachineFunction &Fn) override;
51
Derek Schuff1dbf7a52016-04-04 17:09:25 +000052 MachineFunctionProperties getRequiredProperties() const override {
53 return MachineFunctionProperties().set(
Matthias Braun1eb47362016-08-25 01:27:13 +000054 MachineFunctionProperties::Property::NoVRegs);
Derek Schuff1dbf7a52016-04-04 17:09:25 +000055 }
56
Mehdi Amini117296c2016-10-01 02:56:57 +000057 StringRef getPassName() const override {
Eric Christopher213a5da2015-12-21 23:04:27 +000058 return "X86 pseudo instruction expansion pass";
59 }
60
61private:
Peter Collingbourne29748562018-03-09 19:11:44 +000062 void ExpandICallBranchFunnel(MachineBasicBlock *MBB,
63 MachineBasicBlock::iterator MBBI);
64
Eric Christopher213a5da2015-12-21 23:04:27 +000065 bool ExpandMI(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI);
66 bool ExpandMBB(MachineBasicBlock &MBB);
67};
68char X86ExpandPseudo::ID = 0;
Francis Visoiu Mistrihab051a32019-04-05 20:18:21 +000069
Eric Christopher213a5da2015-12-21 23:04:27 +000070} // End anonymous namespace.
71
Francis Visoiu Mistrihab051a32019-04-05 20:18:21 +000072INITIALIZE_PASS(X86ExpandPseudo, DEBUG_TYPE, X86_EXPAND_PSEUDO_NAME, false,
73 false)
74
Peter Collingbourne29748562018-03-09 19:11:44 +000075void X86ExpandPseudo::ExpandICallBranchFunnel(
76 MachineBasicBlock *MBB, MachineBasicBlock::iterator MBBI) {
77 MachineBasicBlock *JTMBB = MBB;
78 MachineInstr *JTInst = &*MBBI;
79 MachineFunction *MF = MBB->getParent();
80 const BasicBlock *BB = MBB->getBasicBlock();
81 auto InsPt = MachineFunction::iterator(MBB);
82 ++InsPt;
83
84 std::vector<std::pair<MachineBasicBlock *, unsigned>> TargetMBBs;
85 DebugLoc DL = JTInst->getDebugLoc();
86 MachineOperand Selector = JTInst->getOperand(0);
87 const GlobalValue *CombinedGlobal = JTInst->getOperand(1).getGlobal();
88
89 auto CmpTarget = [&](unsigned Target) {
90 BuildMI(*MBB, MBBI, DL, TII->get(X86::LEA64r), X86::R11)
91 .addReg(X86::RIP)
92 .addImm(1)
93 .addReg(0)
94 .addGlobalAddress(CombinedGlobal,
95 JTInst->getOperand(2 + 2 * Target).getImm())
96 .addReg(0);
97 BuildMI(*MBB, MBBI, DL, TII->get(X86::CMP64rr))
98 .add(Selector)
99 .addReg(X86::R11);
100 };
101
102 auto CreateMBB = [&]() {
103 auto *NewMBB = MF->CreateMachineBasicBlock(BB);
104 MBB->addSuccessor(NewMBB);
105 return NewMBB;
106 };
107
Craig Topper80aa2292019-04-05 19:28:09 +0000108 auto EmitCondJump = [&](unsigned CC, MachineBasicBlock *ThenMBB) {
109 BuildMI(*MBB, MBBI, DL, TII->get(X86::JCC_1)).addMBB(ThenMBB).addImm(CC);
Peter Collingbourne29748562018-03-09 19:11:44 +0000110
111 auto *ElseMBB = CreateMBB();
112 MF->insert(InsPt, ElseMBB);
113 MBB = ElseMBB;
114 MBBI = MBB->end();
115 };
116
Craig Topper80aa2292019-04-05 19:28:09 +0000117 auto EmitCondJumpTarget = [&](unsigned CC, unsigned Target) {
Peter Collingbourne29748562018-03-09 19:11:44 +0000118 auto *ThenMBB = CreateMBB();
119 TargetMBBs.push_back({ThenMBB, Target});
Craig Topper80aa2292019-04-05 19:28:09 +0000120 EmitCondJump(CC, ThenMBB);
Peter Collingbourne29748562018-03-09 19:11:44 +0000121 };
122
123 auto EmitTailCall = [&](unsigned Target) {
124 BuildMI(*MBB, MBBI, DL, TII->get(X86::TAILJMPd64))
125 .add(JTInst->getOperand(3 + 2 * Target));
126 };
127
128 std::function<void(unsigned, unsigned)> EmitBranchFunnel =
129 [&](unsigned FirstTarget, unsigned NumTargets) {
130 if (NumTargets == 1) {
131 EmitTailCall(FirstTarget);
132 return;
133 }
134
135 if (NumTargets == 2) {
136 CmpTarget(FirstTarget + 1);
Craig Topper80aa2292019-04-05 19:28:09 +0000137 EmitCondJumpTarget(X86::COND_B, FirstTarget);
Peter Collingbourne29748562018-03-09 19:11:44 +0000138 EmitTailCall(FirstTarget + 1);
139 return;
140 }
141
142 if (NumTargets < 6) {
143 CmpTarget(FirstTarget + 1);
Craig Topper80aa2292019-04-05 19:28:09 +0000144 EmitCondJumpTarget(X86::COND_B, FirstTarget);
145 EmitCondJumpTarget(X86::COND_E, FirstTarget + 1);
Peter Collingbourne29748562018-03-09 19:11:44 +0000146 EmitBranchFunnel(FirstTarget + 2, NumTargets - 2);
147 return;
148 }
149
150 auto *ThenMBB = CreateMBB();
151 CmpTarget(FirstTarget + (NumTargets / 2));
Craig Topper80aa2292019-04-05 19:28:09 +0000152 EmitCondJump(X86::COND_B, ThenMBB);
153 EmitCondJumpTarget(X86::COND_E, FirstTarget + (NumTargets / 2));
Peter Collingbourne29748562018-03-09 19:11:44 +0000154 EmitBranchFunnel(FirstTarget + (NumTargets / 2) + 1,
155 NumTargets - (NumTargets / 2) - 1);
156
157 MF->insert(InsPt, ThenMBB);
158 MBB = ThenMBB;
159 MBBI = MBB->end();
160 EmitBranchFunnel(FirstTarget, NumTargets / 2);
161 };
162
163 EmitBranchFunnel(0, (JTInst->getNumOperands() - 2) / 2);
164 for (auto P : TargetMBBs) {
165 MF->insert(InsPt, P.first);
166 BuildMI(P.first, DL, TII->get(X86::TAILJMPd64))
167 .add(JTInst->getOperand(3 + 2 * P.second));
168 }
169 JTMBB->erase(JTInst);
170}
171
Eric Christopher213a5da2015-12-21 23:04:27 +0000172/// If \p MBBI is a pseudo instruction, this method expands
173/// it to the corresponding (sequence of) actual instruction(s).
174/// \returns true if \p MBBI has been expanded.
175bool X86ExpandPseudo::ExpandMI(MachineBasicBlock &MBB,
176 MachineBasicBlock::iterator MBBI) {
177 MachineInstr &MI = *MBBI;
178 unsigned Opcode = MI.getOpcode();
179 DebugLoc DL = MBBI->getDebugLoc();
180 switch (Opcode) {
181 default:
182 return false;
183 case X86::TCRETURNdi:
Hans Wennborga4686012017-02-16 00:04:05 +0000184 case X86::TCRETURNdicc:
Eric Christopher213a5da2015-12-21 23:04:27 +0000185 case X86::TCRETURNri:
186 case X86::TCRETURNmi:
187 case X86::TCRETURNdi64:
Hans Wennborga4686012017-02-16 00:04:05 +0000188 case X86::TCRETURNdi64cc:
Eric Christopher213a5da2015-12-21 23:04:27 +0000189 case X86::TCRETURNri64:
190 case X86::TCRETURNmi64: {
191 bool isMem = Opcode == X86::TCRETURNmi || Opcode == X86::TCRETURNmi64;
192 MachineOperand &JumpTarget = MBBI->getOperand(0);
193 MachineOperand &StackAdjust = MBBI->getOperand(isMem ? 5 : 1);
194 assert(StackAdjust.isImm() && "Expecting immediate value.");
195
196 // Adjust stack pointer.
197 int StackAdj = StackAdjust.getImm();
Quentin Colombetfb82c7b2016-07-11 21:03:03 +0000198 int MaxTCDelta = X86FI->getTCReturnAddrDelta();
199 int Offset = 0;
200 assert(MaxTCDelta <= 0 && "MaxTCDelta should never be positive");
Eric Christopher213a5da2015-12-21 23:04:27 +0000201
Quentin Colombetfb82c7b2016-07-11 21:03:03 +0000202 // Incoporate the retaddr area.
Hans Wennborg75e25f62016-09-07 17:52:14 +0000203 Offset = StackAdj - MaxTCDelta;
Quentin Colombetfb82c7b2016-07-11 21:03:03 +0000204 assert(Offset >= 0 && "Offset should never be negative");
205
Hans Wennborga4686012017-02-16 00:04:05 +0000206 if (Opcode == X86::TCRETURNdicc || Opcode == X86::TCRETURNdi64cc) {
207 assert(Offset == 0 && "Conditional tail call cannot adjust the stack.");
208 }
209
Quentin Colombetfb82c7b2016-07-11 21:03:03 +0000210 if (Offset) {
Eric Christopher213a5da2015-12-21 23:04:27 +0000211 // Check for possible merge with preceding ADD instruction.
Quentin Colombetfb82c7b2016-07-11 21:03:03 +0000212 Offset += X86FL->mergeSPUpdates(MBB, MBBI, true);
Paul Robinsonee88ed62018-02-14 17:35:52 +0000213 X86FL->emitSPUpdate(MBB, MBBI, DL, Offset, /*InEpilogue=*/true);
Eric Christopher213a5da2015-12-21 23:04:27 +0000214 }
215
216 // Jump to label or value in register.
217 bool IsWin64 = STI->isTargetWin64();
Hans Wennborga4686012017-02-16 00:04:05 +0000218 if (Opcode == X86::TCRETURNdi || Opcode == X86::TCRETURNdicc ||
219 Opcode == X86::TCRETURNdi64 || Opcode == X86::TCRETURNdi64cc) {
Hans Wennborg75e25f62016-09-07 17:52:14 +0000220 unsigned Op;
221 switch (Opcode) {
222 case X86::TCRETURNdi:
223 Op = X86::TAILJMPd;
224 break;
Hans Wennborga4686012017-02-16 00:04:05 +0000225 case X86::TCRETURNdicc:
226 Op = X86::TAILJMPd_CC;
227 break;
228 case X86::TCRETURNdi64cc:
Hans Wennborg35905d62017-02-16 19:04:42 +0000229 assert(!MBB.getParent()->hasWinCFI() &&
230 "Conditional tail calls confuse "
231 "the Win64 unwinder.");
Hans Wennborga4686012017-02-16 00:04:05 +0000232 Op = X86::TAILJMPd64_CC;
233 break;
Hans Wennborg75e25f62016-09-07 17:52:14 +0000234 default:
Hans Wennborgc39ef772016-09-08 23:35:10 +0000235 // Note: Win64 uses REX prefixes indirect jumps out of functions, but
236 // not direct ones.
237 Op = X86::TAILJMPd64;
Hans Wennborg75e25f62016-09-07 17:52:14 +0000238 break;
239 }
Eric Christopher213a5da2015-12-21 23:04:27 +0000240 MachineInstrBuilder MIB = BuildMI(MBB, MBBI, DL, TII->get(Op));
Hans Wennborg75e25f62016-09-07 17:52:14 +0000241 if (JumpTarget.isGlobal()) {
Eric Christopher213a5da2015-12-21 23:04:27 +0000242 MIB.addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset(),
243 JumpTarget.getTargetFlags());
Hans Wennborg75e25f62016-09-07 17:52:14 +0000244 } else {
Eric Christopher213a5da2015-12-21 23:04:27 +0000245 assert(JumpTarget.isSymbol());
246 MIB.addExternalSymbol(JumpTarget.getSymbolName(),
247 JumpTarget.getTargetFlags());
248 }
Hans Wennborga4686012017-02-16 00:04:05 +0000249 if (Op == X86::TAILJMPd_CC || Op == X86::TAILJMPd64_CC) {
250 MIB.addImm(MBBI->getOperand(2).getImm());
251 }
252
Eric Christopher213a5da2015-12-21 23:04:27 +0000253 } else if (Opcode == X86::TCRETURNmi || Opcode == X86::TCRETURNmi64) {
254 unsigned Op = (Opcode == X86::TCRETURNmi)
255 ? X86::TAILJMPm
256 : (IsWin64 ? X86::TAILJMPm64_REX : X86::TAILJMPm64);
257 MachineInstrBuilder MIB = BuildMI(MBB, MBBI, DL, TII->get(Op));
258 for (unsigned i = 0; i != 5; ++i)
Diana Picus116bbab2017-01-13 09:58:52 +0000259 MIB.add(MBBI->getOperand(i));
Eric Christopher213a5da2015-12-21 23:04:27 +0000260 } else if (Opcode == X86::TCRETURNri64) {
Francis Visoiu Mistrihab051a32019-04-05 20:18:21 +0000261 JumpTarget.setIsKill();
Eric Christopher213a5da2015-12-21 23:04:27 +0000262 BuildMI(MBB, MBBI, DL,
263 TII->get(IsWin64 ? X86::TAILJMPr64_REX : X86::TAILJMPr64))
Francis Visoiu Mistrihab051a32019-04-05 20:18:21 +0000264 .add(JumpTarget);
Eric Christopher213a5da2015-12-21 23:04:27 +0000265 } else {
Francis Visoiu Mistrihab051a32019-04-05 20:18:21 +0000266 JumpTarget.setIsKill();
Eric Christopher213a5da2015-12-21 23:04:27 +0000267 BuildMI(MBB, MBBI, DL, TII->get(X86::TAILJMPr))
Francis Visoiu Mistrihab051a32019-04-05 20:18:21 +0000268 .add(JumpTarget);
Eric Christopher213a5da2015-12-21 23:04:27 +0000269 }
270
Duncan P. N. Exon Smith7b4c18e2016-07-12 03:18:50 +0000271 MachineInstr &NewMI = *std::prev(MBBI);
272 NewMI.copyImplicitOps(*MBBI->getParent()->getParent(), *MBBI);
Djordje Todorovic71d38692019-06-27 13:10:29 +0000273 MBB.getParent()->updateCallSiteInfo(&*MBBI, &NewMI);
Eric Christopher213a5da2015-12-21 23:04:27 +0000274
275 // Delete the pseudo instruction TCRETURN.
276 MBB.erase(MBBI);
277
278 return true;
279 }
280 case X86::EH_RETURN:
281 case X86::EH_RETURN64: {
282 MachineOperand &DestAddr = MBBI->getOperand(0);
283 assert(DestAddr.isReg() && "Offset should be in register!");
284 const bool Uses64BitFramePtr =
285 STI->isTarget64BitLP64() || STI->isTargetNaCl64();
286 unsigned StackPtr = TRI->getStackRegister();
287 BuildMI(MBB, MBBI, DL,
288 TII->get(Uses64BitFramePtr ? X86::MOV64rr : X86::MOV32rr), StackPtr)
289 .addReg(DestAddr.getReg());
290 // The EH_RETURN pseudo is really removed during the MC Lowering.
291 return true;
292 }
293 case X86::IRET: {
294 // Adjust stack to erase error code
295 int64_t StackAdj = MBBI->getOperand(0).getImm();
Paul Robinsonee88ed62018-02-14 17:35:52 +0000296 X86FL->emitSPUpdate(MBB, MBBI, DL, StackAdj, true);
Eric Christopher213a5da2015-12-21 23:04:27 +0000297 // Replace pseudo with machine iret
298 BuildMI(MBB, MBBI, DL,
299 TII->get(STI->is64Bit() ? X86::IRET64 : X86::IRET32));
300 MBB.erase(MBBI);
301 return true;
302 }
David Majnemerd2f767d2016-03-04 22:56:17 +0000303 case X86::RET: {
304 // Adjust stack to erase error code
305 int64_t StackAdj = MBBI->getOperand(0).getImm();
306 MachineInstrBuilder MIB;
307 if (StackAdj == 0) {
308 MIB = BuildMI(MBB, MBBI, DL,
309 TII->get(STI->is64Bit() ? X86::RETQ : X86::RETL));
310 } else if (isUInt<16>(StackAdj)) {
311 MIB = BuildMI(MBB, MBBI, DL,
312 TII->get(STI->is64Bit() ? X86::RETIQ : X86::RETIL))
313 .addImm(StackAdj);
314 } else {
David Majnemer71a1c2c2016-03-04 23:02:15 +0000315 assert(!STI->is64Bit() &&
316 "shouldn't need to do this for x86_64 targets!");
David Majnemerd2f767d2016-03-04 22:56:17 +0000317 // A ret can only handle immediates as big as 2**16-1. If we need to pop
318 // off bytes before the return address, we must do it manually.
David Majnemer71a1c2c2016-03-04 23:02:15 +0000319 BuildMI(MBB, MBBI, DL, TII->get(X86::POP32r)).addReg(X86::ECX, RegState::Define);
Paul Robinsonee88ed62018-02-14 17:35:52 +0000320 X86FL->emitSPUpdate(MBB, MBBI, DL, StackAdj, /*InEpilogue=*/true);
David Majnemer71a1c2c2016-03-04 23:02:15 +0000321 BuildMI(MBB, MBBI, DL, TII->get(X86::PUSH32r)).addReg(X86::ECX);
322 MIB = BuildMI(MBB, MBBI, DL, TII->get(X86::RETL));
David Majnemerd2f767d2016-03-04 22:56:17 +0000323 }
324 for (unsigned I = 1, E = MBBI->getNumOperands(); I != E; ++I)
Diana Picus116bbab2017-01-13 09:58:52 +0000325 MIB.add(MBBI->getOperand(I));
David Majnemerd2f767d2016-03-04 22:56:17 +0000326 MBB.erase(MBBI);
327 return true;
328 }
Eric Christopher213a5da2015-12-21 23:04:27 +0000329 case X86::EH_RESTORE: {
330 // Restore ESP and EBP, and optionally ESI if required.
331 bool IsSEH = isAsynchronousEHPersonality(classifyEHPersonality(
Matthias Braunf1caa282017-12-15 22:22:58 +0000332 MBB.getParent()->getFunction().getPersonalityFn()));
Eric Christopher213a5da2015-12-21 23:04:27 +0000333 X86FL->restoreWin32EHStackPointers(MBB, MBBI, DL, /*RestoreSP=*/IsSEH);
334 MBBI->eraseFromParent();
335 return true;
336 }
Quentin Colombetcf9732b2016-03-12 02:25:27 +0000337 case X86::LCMPXCHG8B_SAVE_EBX:
338 case X86::LCMPXCHG16B_SAVE_RBX: {
339 // Perform the following transformation.
340 // SaveRbx = pseudocmpxchg Addr, <4 opds for the address>, InArg, SaveRbx
341 // =>
342 // [E|R]BX = InArg
343 // actualcmpxchg Addr
344 // [E|R]BX = SaveRbx
345 const MachineOperand &InArg = MBBI->getOperand(6);
346 unsigned SaveRbx = MBBI->getOperand(7).getReg();
347
348 unsigned ActualInArg =
349 Opcode == X86::LCMPXCHG8B_SAVE_EBX ? X86::EBX : X86::RBX;
350 // Copy the input argument of the pseudo into the argument of the
351 // actual instruction.
352 TII->copyPhysReg(MBB, MBBI, DL, ActualInArg, InArg.getReg(),
353 InArg.isKill());
354 // Create the actual instruction.
355 unsigned ActualOpc =
356 Opcode == X86::LCMPXCHG8B_SAVE_EBX ? X86::LCMPXCHG8B : X86::LCMPXCHG16B;
357 MachineInstr *NewInstr = BuildMI(MBB, MBBI, DL, TII->get(ActualOpc));
358 // Copy the operands related to the address.
359 for (unsigned Idx = 1; Idx < 6; ++Idx)
360 NewInstr->addOperand(MBBI->getOperand(Idx));
361 // Finally, restore the value of RBX.
362 TII->copyPhysReg(MBB, MBBI, DL, ActualInArg, SaveRbx,
363 /*SrcIsKill*/ true);
364
365 // Delete the pseudo.
366 MBBI->eraseFromParent();
367 return true;
368 }
Peter Collingbourne29748562018-03-09 19:11:44 +0000369 case TargetOpcode::ICALL_BRANCH_FUNNEL:
370 ExpandICallBranchFunnel(&MBB, MBBI);
371 return true;
Eric Christopher213a5da2015-12-21 23:04:27 +0000372 }
373 llvm_unreachable("Previous switch has a fallthrough?");
374}
375
376/// Expand all pseudo instructions contained in \p MBB.
377/// \returns true if any expansion occurred for \p MBB.
378bool X86ExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) {
379 bool Modified = false;
380
381 // MBBI may be invalidated by the expansion.
382 MachineBasicBlock::iterator MBBI = MBB.begin(), E = MBB.end();
383 while (MBBI != E) {
384 MachineBasicBlock::iterator NMBBI = std::next(MBBI);
385 Modified |= ExpandMI(MBB, MBBI);
386 MBBI = NMBBI;
387 }
388
389 return Modified;
390}
391
392bool X86ExpandPseudo::runOnMachineFunction(MachineFunction &MF) {
393 STI = &static_cast<const X86Subtarget &>(MF.getSubtarget());
394 TII = STI->getInstrInfo();
395 TRI = STI->getRegisterInfo();
Quentin Colombetfb82c7b2016-07-11 21:03:03 +0000396 X86FI = MF.getInfo<X86MachineFunctionInfo>();
Eric Christopher213a5da2015-12-21 23:04:27 +0000397 X86FL = STI->getFrameLowering();
398
399 bool Modified = false;
400 for (MachineBasicBlock &MBB : MF)
401 Modified |= ExpandMBB(MBB);
402 return Modified;
403}
404
405/// Returns an instance of the pseudo instruction expansion pass.
406FunctionPass *llvm::createX86ExpandPseudoPass() {
407 return new X86ExpandPseudo();
408}