LLVM  14.0.0git
MCAsmMacro.cpp
Go to the documentation of this file.
1 //===- MCAsmMacro.h - Assembly Macros ---------------------------*- 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 #include "llvm/MC/MCAsmMacro.h"
11 
12 using namespace llvm;
13 
14 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
16  OS << "\"" << Name << "\"";
17  if (Required)
18  OS << ":req";
19  if (Vararg)
20  OS << ":vararg";
21  if (!Value.empty()) {
22  OS << " = ";
23  bool first = true;
24  for (const AsmToken &T : Value) {
25  if (!first)
26  OS << ", ";
27  first = false;
28  OS << T.getString();
29  }
30  }
31  OS << "\n";
32 }
33 
34 void MCAsmMacro::dump(raw_ostream &OS) const {
35  OS << "Macro " << Name << ":\n";
36  OS << " Parameters:\n";
37  for (const MCAsmMacroParameter &P : Parameters) {
38  OS << " ";
39  P.dump();
40  }
41  if (!Locals.empty()) {
42  OS << " Locals:\n";
43  for (StringRef L : Locals)
44  OS << " " << L << '\n';
45  }
46  OS << " (BEGIN BODY)" << Body << "(END BODY)\n";
47 }
48 #endif
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::MCAsmMacro::Parameters
MCAsmMacroParameters Parameters
Definition: MCAsmMacro.h:145
T
P
This currently compiles esp xmm0 movsd esp eax eax esp ret We should use not the dag combiner This is because dagcombine2 needs to be able to see through the X86ISD::Wrapper which DAGCombine can t really do The code for turning x load into a single vector load is target independent and should be moved to the dag combiner The code for turning x load into a vector load can only handle a direct load from a global or a direct load from the stack It should be generalized to handle any load from P
Definition: README-SSE.txt:411
llvm::MCAsmMacro::Name
StringRef Name
Definition: MCAsmMacro.h:143
llvm::MCAsmMacro::dump
void dump() const
Definition: MCAsmMacro.h:158
llvm::MCAsmMacroParameter::Name
StringRef Name
Definition: MCAsmMacro.h:130
llvm::AsmToken
Target independent representation for an assembler token.
Definition: MCAsmMacro.h:21
llvm::MCAsmMacroParameter::Required
bool Required
Definition: MCAsmMacro.h:132
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::MCAsmMacroParameter
Definition: MCAsmMacro.h:129
llvm::StringRef
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:58
MCAsmMacro.h
llvm::MCAsmMacroParameter::dump
void dump() const
Definition: MCAsmMacro.h:136
llvm::MCAsmMacro::Locals
std::vector< std::string > Locals
Definition: MCAsmMacro.h:146
llvm::MCAsmMacroParameter::Vararg
bool Vararg
Definition: MCAsmMacro.h:133
llvm::MCAsmMacro::Body
StringRef Body
Definition: MCAsmMacro.h:144
raw_ostream.h
llvm::Value
LLVM Value Representation.
Definition: Value.h:74