[llvm] r195944 - Refactor a lot of patchpoint/stackmap related code to simplify and make it
Lang Hames
lhames at gmail.com
Thu Jan 2 11:44:12 PST 2014
Thanks for catching this Juergen. I've removed the redundant
foldMemoryOperandImpl call in r198341.
- Lang.
On Thu, Dec 19, 2013 at 5:43 PM, Juergen Ributzka <juergen at apple.com> wrote:
>
>> // Ask the target to do the actual folding.
>> - MachineInstr *NewMI = foldMemoryOperandImpl(MF, MI, Ops, LoadMI);
>> + MachineInstr *NewMI = 0;
>> + int FrameIndex = 0;
>> +
>> + if ((MI->getOpcode() == TargetOpcode::STACKMAP ||
>> + MI->getOpcode() == TargetOpcode::PATCHPOINT) &&
>> + isLoadFromStackSlot(LoadMI, FrameIndex)) {
>> + // Fold stackmap/patchpoint.
>> + NewMI = foldPatchpoint(MF, MI, Ops, FrameIndex, *this);
>> + } else {
>> + // Ask the target to do the actual folding.
>> + NewMI =foldMemoryOperandImpl(MF, MI, Ops, LoadMI);
>> + }
>> + foldMemoryOperandImpl(MF, MI, Ops, LoadMI);
>
> Looks like we are folding here twice and never use the result?
>
> -Juergen
More information about the llvm-commits
mailing list