Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ MipsELFMCAsmInfo::MipsELFMCAsmInfo(const Triple &TheTriple,
const MCTargetOptions &Options) {
IsLittleEndian = TheTriple.isLittleEndian();

MipsABIInfo ABI = MipsABIInfo::computeTargetABI(TheTriple, Options.getABIName());
MipsABIInfo ABI =
MipsABIInfo::computeTargetABI(TheTriple, Options.getABIName());

if (TheTriple.isMIPS64() && !ABI.IsN32())
CodePointerSize = CalleeSaveStackSlotSize = 8;
Expand Down
14 changes: 7 additions & 7 deletions llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ static cl::opt<bool> DisableRequireStructuredCFG(
"unexpected regressions happen."),
cl::init(false), cl::Hidden);

static cl::opt<bool> UseShortPointersOpt(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This definitely should not be configurable by cl::opt

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but is that a blocking concern? I assume this is load bearing. It has tons of tests. As covered in the commit message, I modeled this as an ABI name string (which wasn't used for anything before) and moved on.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this an ABI name string now, it should be passed via the dedicated --target-abi option. Not a blocker to me (not saying for @arsenm), but a FIXME would be nice.

"nvptx-short-ptr",
cl::desc(
"Use 32-bit pointers for accessing const/local/shared address spaces."),
cl::init(false), cl::Hidden);

// byval arguments in NVPTX are special. We're only allowed to read from them
// using a special instruction, and if we ever need to write to them or take an
// address, we must make a local copy and use it, instead.
Expand Down Expand Up @@ -112,12 +118,6 @@ extern "C" LLVM_ABI LLVM_EXTERNAL_VISIBILITY void LLVMInitializeNVPTXTarget() {
initializeNVPTXPrologEpilogPassPass(PR);
}

static cl::opt<bool> NVPTXUseShortPointers(
"nvptx-short-ptr",
cl::desc(
"Use 32-bit pointers for accessing const/local/shared address spaces."),
cl::init(false), cl::Hidden);

NVPTXTargetMachine::NVPTXTargetMachine(const Target &T, const Triple &TT,
StringRef CPU, StringRef FS,
const TargetOptions &Options,
Expand All @@ -127,7 +127,7 @@ NVPTXTargetMachine::NVPTXTargetMachine(const Target &T, const Triple &TT,
// The pic relocation model is used regardless of what the client has
// specified, as it is the only relocation model currently supported.
: CodeGenTargetMachineImpl(
T, TT.computeDataLayout(NVPTXUseShortPointers ? "" : "shortptr"), TT,
T, TT.computeDataLayout(UseShortPointersOpt ? "shortptr" : ""), TT,
CPU, FS, Options, Reloc::PIC_,
getEffectiveCodeModel(CM, CodeModel::Small), OL),
is64bit(is64bit), TLOF(std::make_unique<NVPTXTargetObjectFile>()),
Expand Down
1 change: 0 additions & 1 deletion llvm/lib/Target/X86/X86TargetMachine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
return std::make_unique<X86ELFTargetObjectFile>();
}


static Reloc::Model getEffectiveRelocModel(const Triple &TT, bool JIT,
std::optional<Reloc::Model> RM) {
bool is64Bit = TT.getArch() == Triple::x86_64;
Expand Down
Loading