Skip to content

Commit

Permalink
Merge branch 'amd-staging' of ssh://gerrit-git.amd.com:29418/lightnin…
Browse files Browse the repository at this point in the history
…g/ec/llvm-project into amd-staging
  • Loading branch information
searlmc1 committed Apr 17, 2024
2 parents e2f773e + 91c18ff commit fc416b2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
6 changes: 3 additions & 3 deletions amd/comgr/src/comgr-compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ getOutputStream(AssemblerInvocation &Opts, DiagnosticsEngine &Diags,
return Out;
}

// clang/tools/driver/cc1as_main.cpp, ExecuteAssemblerImpl()
static bool executeAssemblerImpl(AssemblerInvocation &Opts,
DiagnosticsEngine &Diags, raw_ostream &LogS) {
// Get the target specific parser.
Expand Down Expand Up @@ -384,15 +385,14 @@ static bool executeAssemblerImpl(AssemblerInvocation &Opts,
assert(MRI && "Unable to create target register info!");

llvm::MCTargetOptions MCOptions;
MCOptions.X86RelaxRelocations = Opts.RelaxELFRelocations;
MCOptions.CompressDebugSections = Opts.CompressDebugSections;
std::unique_ptr<MCAsmInfo> MAI(
TheTarget->createMCAsmInfo(*MRI, Opts.Triple, MCOptions));
assert(MAI && "Unable to create target asm info!");

// Ensure MCAsmInfo initialization occurs before any use, otherwise sections
// may be created with a combination of default and explicit settings.
MAI->setCompressDebugSections(Opts.CompressDebugSections);

MAI->setRelaxELFRelocations(Opts.RelaxELFRelocations);

bool IsBinary = Opts.OutputType == AssemblerInvocation::FT_Obj;
std::unique_ptr<raw_fd_ostream> FDOS = getOutputStream(Opts, Diags, IsBinary);
Expand Down
16 changes: 0 additions & 16 deletions llvm/include/llvm/MC/MCAsmInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,17 +529,10 @@ class MCAsmInfo {
/// Preserve Comments in assembly
bool PreserveAsmComments;

/// Compress DWARF debug sections. Defaults to no compression.
DebugCompressionType CompressDebugSections = DebugCompressionType::None;

/// True if the integrated assembler should interpret 'a >> b' constant
/// expressions as logical rather than arithmetic.
bool UseLogicalShr = true;

// If true, emit GOTPCRELX/REX_GOTPCRELX instead of GOTPCREL, on
// X86_64 ELF.
bool RelaxELFRelocations = true;

// If true, then the lexer and expression parser will support %neg(),
// %hi(), and similar unary operators.
bool HasMipsExpressions = false;
Expand Down Expand Up @@ -887,18 +880,9 @@ class MCAsmInfo {
PreserveAsmComments = Value;
}

DebugCompressionType compressDebugSections() const {
return CompressDebugSections;
}

void setCompressDebugSections(DebugCompressionType CompressDebugSections) {
this->CompressDebugSections = CompressDebugSections;
}

bool shouldUseLogicalShr() const { return UseLogicalShr; }

bool canRelaxRelocations() const { return RelaxELFRelocations; }
void setRelaxELFRelocations(bool V) { RelaxELFRelocations = V; }
bool hasMipsExpressions() const { return HasMipsExpressions; }
bool needsFunctionDescriptors() const { return NeedsFunctionDescriptors; }
bool shouldUseMotorolaIntegers() const { return UseMotorolaIntegers; }
Expand Down

0 comments on commit fc416b2

Please sign in to comment.