This is an archive of the discontinued LLVM Phabricator instance.

[COFF, ARM64] Make +reserve-x18 the default
AbandonedPublic

Authored by mgrang on Jul 17 2017, 6:57 PM.

Details

Diff Detail

Event Timeline

mgrang created this revision.Jul 17 2017, 6:57 PM

Wouldn't it make more sense to set this by default within LLVM, where it's already enabled by default for darwin?

Currently there's this code there:

AArch64Subtarget::AArch64Subtarget(const Triple &TT, const std::string &CPU,
                                   const std::string &FS,
                                   const TargetMachine &TM, bool LittleEndian)
    : AArch64GenSubtargetInfo(TT, CPU, FS), ReserveX18(TT.isOSDarwin()),

Wouldn't it make more sense to set this by default within LLVM, where it's already enabled by default for darwin?

Currently there's this code there:

AArch64Subtarget::AArch64Subtarget(const Triple &TT, const std::string &CPU,
                                   const std::string &FS,
                                   const TargetMachine &TM, bool LittleEndian)
    : AArch64GenSubtargetInfo(TT, CPU, FS), ReserveX18(TT.isOSDarwin()),

Thanks for pointing this out. This certainly seems a cleaner way/place to do this. Lemme give it a shot.

I pushed a new patch D35531. This implements the logic in llvm AArch64SubTarget which seems to be the proper place to do this.
Once that patch is reviewed/accepted, I will abandon this one.

mgrang abandoned this revision.Jul 18 2017, 1:43 PM