Page MenuHomePhabricator

[AVR] Expand STDWSPQRr & STDSPQRr, approach #2
Needs ReviewPublic

Authored by Patryk27 on Thu, Nov 25, 1:12 PM.

Details

Summary

This takes a different approach to solve https://reviews.llvm.org/D95664: instead of hacking around isFrameInstr(), I've moved parts of the logic to AVRMachineFunctionInfo which allowed me to move the registry-checking stuff directly into the AVRExpandPseudo pass, simplifying rest of the code; I think it's the cleaner approach for the issue posted on that MR.

This is my first merge request to LLVM, so probably the quality is subpar, but I'm ofc. open to any comments; thanks! :-)

Diff Detail

Event Timeline

Patryk27 created this revision.Thu, Nov 25, 1:12 PM
Patryk27 requested review of this revision.Thu, Nov 25, 1:12 PM
Patryk27 edited the summary of this revision. (Show Details)Thu, Nov 25, 1:12 PM
Patryk27 added inline comments.Thu, Nov 25, 1:15 PM
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
2114

just saw there's MBBI.getParent()->getParent() (or something like that) that returns associated function, too

llvm/lib/Target/AVR/AVRMachineFunctionInfo.h
84

passing MachineFunction "back in here" feels like cheating, but I can't see another way at the moment

Patryk27 added inline comments.Thu, Nov 25, 1:22 PM
llvm/lib/Target/AVR/AVRExpandPseudoInsts.cpp
2112

also, this ofc. needs to be refactored to use the EXPAND macro below

Patryk27 marked 2 inline comments as not done.Thu, Nov 25, 1:24 PM