11 changes: 1 addition & 10 deletions llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ void AsmPrinter::EmitInlineAsm(StringRef Str, const MCSubtargetInfo &STI,
// assembly.
if (Dialect == InlineAsm::AD_Intel)
Parser->getLexer().setLexMasmIntegers(true);
if (MF) {
const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo();
TAP->SetFrameRegister(TRI->getFrameRegister(*MF));
}

emitInlineAsmStart();
// Don't implicitly switch to the text section before the asm.
Expand Down Expand Up @@ -527,11 +523,6 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
else
EmitMSInlineAsmStr(AsmStr, MI, MMI, InlineAsmVariant, AP, LocCookie, OS);

// Reset SanitizeAddress based on the function's attribute.
MCTargetOptions MCOptions = TM.Options.MCOptions;
MCOptions.SanitizeAddress =
MF->getFunction().hasFnAttribute(Attribute::SanitizeAddress);

// Emit warnings if we use reserved registers on the clobber list, as
// that might give surprising results.
std::vector<std::string> RestrRegs;
Expand Down Expand Up @@ -570,7 +561,7 @@ void AsmPrinter::EmitInlineAsm(const MachineInstr *MI) const {
SrcMgr.PrintMessage(Loc, SourceMgr::DK_Note, Note);
}

EmitInlineAsm(OS.str(), getSubtargetInfo(), MCOptions, LocMD,
EmitInlineAsm(OS.str(), getSubtargetInfo(), TM.Options.MCOptions, LocMD,
MI->getInlineAsmDialect());

// Emit the #NOAPP end marker. This has to happen even if verbose-asm isn't
Expand Down
11 changes: 5 additions & 6 deletions llvm/lib/MC/MCTargetOptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,11 @@
using namespace llvm;

MCTargetOptions::MCTargetOptions()
: SanitizeAddress(false), MCRelaxAll(false), MCNoExecStack(false),
MCFatalWarnings(false), MCNoWarn(false), MCNoDeprecatedWarn(false),
MCSaveTempLabels(false), MCUseDwarfDirectory(false),
MCIncrementalLinkerCompatible(false), MCPIECopyRelocations(false),
ShowMCEncoding(false), ShowMCInst(false), AsmVerbose(false),
PreserveAsmComments(true) {}
: MCRelaxAll(false), MCNoExecStack(false), MCFatalWarnings(false),
MCNoWarn(false), MCNoDeprecatedWarn(false), MCSaveTempLabels(false),
MCUseDwarfDirectory(false), MCIncrementalLinkerCompatible(false),
MCPIECopyRelocations(false), ShowMCEncoding(false), ShowMCInst(false),
AsmVerbose(false), PreserveAsmComments(true) {}

StringRef MCTargetOptions::getABIName() const {
return ABIName;
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Target/X86/AsmParser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
add_llvm_library(LLVMX86AsmParser
X86AsmInstrumentation.cpp
X86AsmParser.cpp
)
1,087 changes: 0 additions & 1,087 deletions llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp

This file was deleted.

65 changes: 0 additions & 65 deletions llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.h

This file was deleted.

13 changes: 1 addition & 12 deletions llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "MCTargetDesc/X86BaseInfo.h"
#include "MCTargetDesc/X86MCExpr.h"
#include "MCTargetDesc/X86TargetStreamer.h"
#include "X86AsmInstrumentation.h"
#include "X86AsmParserCommon.h"
#include "X86Operand.h"
#include "llvm/ADT/STLExtras.h"
Expand Down Expand Up @@ -70,7 +69,6 @@ static const char OpPrecedence[] = {

class X86AsmParser : public MCTargetAsmParser {
ParseInstructionInfo *InstInfo;
std::unique_ptr<X86AsmInstrumentation> Instrumentation;
bool Code16GCC;

private:
Expand Down Expand Up @@ -951,14 +949,10 @@ class X86AsmParser : public MCTargetAsmParser {

// Initialize the set of available features.
setAvailableFeatures(ComputeAvailableFeatures(getSTI().getFeatureBits()));
Instrumentation.reset(
CreateX86AsmInstrumentation(Options, Parser.getContext(), STI));
}

bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc) override;

void SetFrameRegister(unsigned RegNo) override;

bool parsePrimaryExpr(const MCExpr *&Res, SMLoc &EndLoc) override;

bool ParseInstruction(ParseInstructionInfo &Info, StringRef Name,
Expand Down Expand Up @@ -1193,10 +1187,6 @@ bool X86AsmParser::ParseRegister(unsigned &RegNo,
return false;
}

void X86AsmParser::SetFrameRegister(unsigned RegNo) {
Instrumentation->SetInitialFrameRegister(RegNo);
}

std::unique_ptr<X86Operand> X86AsmParser::DefaultMemSIOperand(SMLoc Loc) {
bool Parse32 = is32BitMode() || Code16GCC;
unsigned Basereg = is64BitMode() ? X86::RSI : (Parse32 ? X86::ESI : X86::SI);
Expand Down Expand Up @@ -2866,8 +2856,7 @@ static const char *getSubtargetFeatureName(uint64_t Val);

void X86AsmParser::EmitInstruction(MCInst &Inst, OperandVector &Operands,
MCStreamer &Out) {
Instrumentation->InstrumentAndEmitInstruction(
Inst, Operands, getContext(), MII, Out);
Out.EmitInstruction(Inst, getSTI());
}

bool X86AsmParser::MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode,
Expand Down
20 changes: 0 additions & 20 deletions llvm/test/Instrumentation/AddressSanitizer/X86/asm_attr.ll

This file was deleted.

54 changes: 0 additions & 54 deletions llvm/test/Instrumentation/AddressSanitizer/X86/asm_cfi.ll

This file was deleted.

52 changes: 0 additions & 52 deletions llvm/test/Instrumentation/AddressSanitizer/X86/asm_cfi.s

This file was deleted.

152 changes: 0 additions & 152 deletions llvm/test/Instrumentation/AddressSanitizer/X86/asm_mov.ll

This file was deleted.

64 changes: 0 additions & 64 deletions llvm/test/Instrumentation/AddressSanitizer/X86/asm_mov.s

This file was deleted.

85 changes: 0 additions & 85 deletions llvm/test/Instrumentation/AddressSanitizer/X86/asm_rep_movs.ll

This file was deleted.

45 changes: 0 additions & 45 deletions llvm/test/Instrumentation/AddressSanitizer/X86/asm_rsp_mem_op.s

This file was deleted.

59 changes: 0 additions & 59 deletions llvm/test/Instrumentation/AddressSanitizer/X86/asm_swap_intel.s

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ static_library("AsmParser") {
]
include_dirs = [ ".." ]
sources = [
"X86AsmInstrumentation.cpp",
"X86AsmParser.cpp",
]
}