LLVM  16.0.0git
MCDXContainerStreamer.cpp
Go to the documentation of this file.
1 //===- lib/MC/MCDXContainerStreamer.cpp - DXContainer Impl ----*- C++ -*---===//
2 //
3 // 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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file contains the object streamer for DXContainer files.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 #include "llvm/MC/MCAssembler.h"
15 #include "llvm/MC/TargetRegistry.h"
16 
17 using namespace llvm;
18 
19 void MCDXContainerStreamer::emitInstToData(const MCInst &,
20  const MCSubtargetInfo &) {}
21 
23  MCContext &Context, std::unique_ptr<MCAsmBackend> &&MAB,
24  std::unique_ptr<MCObjectWriter> &&OW, std::unique_ptr<MCCodeEmitter> &&CE,
25  bool RelaxAll) {
26  auto *S = new MCDXContainerStreamer(Context, std::move(MAB), std::move(OW),
27  std::move(CE));
28  if (RelaxAll)
29  S->getAssembler().setRelaxAll(true);
30  return S;
31 }
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::MCContext
Context object for machine code objects.
Definition: MCContext.h:77
llvm::createDXContainerStreamer
MCStreamer * createDXContainerStreamer(MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool RelaxAll)
Definition: MCDXContainerStreamer.cpp:22
MCAssembler.h
llvm::MCInst
Instances of this class represent a single low-level machine instruction.
Definition: MCInst.h:184
Context
LLVMContext & Context
Definition: NVVMIntrRange.cpp:66
llvm::MCStreamer
Streaming machine code generation interface.
Definition: MCStreamer.h:213
MCDXContainerStreamer.h
move
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
Definition: README.txt:546
S
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Definition: README.txt:210
llvm::MCDXContainerStreamer
Definition: MCDXContainerStreamer.h:28
TargetRegistry.h
llvm::MCSubtargetInfo
Generic base class for all target subtargets.
Definition: MCSubtargetInfo.h:77