This is an archive of the discontinued LLVM Phabricator instance.

[ARM] PR25722 Delay ARM constant pool creation
ClosedPublic

Authored by peter.smith on May 11 2016, 2:51 AM.

Details

Summary

This is first in a series of patches to fix PR25722.

This change adds a new constant pool kind to ARMOperand. When parsing the operand for =immediate we create an instance of this operand rather than creating a constant pool entry and rewriting the operand.

As the new operand kind is only created for ldr rt,= we can make ldr rt,= an explicit pseudo instruction in ARM, Thumb and Thumb2

The pseudo instruction is expanded in processInstruction(). This creates the constant pool and transforms the pseudo instruction into a pc-relative ldr to the constant pool.

There are no functional changes and no modifications needed to existing tests.

Diff Detail

Event Timeline

peter.smith retitled this revision from to [ARM] PR25722 Delay ARM constant pool creation.
peter.smith updated this object.
peter.smith added a subscriber: llvm-commits.
rengolin updated this object.May 11 2016, 3:11 AM
rengolin added a reviewer: jmolloy.

Hi Peter,

Good to see you around the LLVM lists! This change mostly looks good to me, just one comment really:

lib/Target/ARM/AsmParser/ARMAsmParser.cpp
6892

You change this line in D20155. It would seem sensible to either do it here or not at all.

peter.smith edited edge metadata.

If I've understood correctly I think you mean to make the initial contents of this patch match the final set as much as possible so that the later one is a pure increment.

Hello Tim,

Sorry to bother you, can I just check you are happy with this patch as well as D20155 depends on it. If it's ok I'll ask Renato to commit the patches as I've not got commit access yet.

Peter

rengolin accepted this revision.May 12 2016, 2:39 PM
rengolin edited edge metadata.

Marking as accepted based on Tim's reply on the list.

This revision is now accepted and ready to land.May 12 2016, 2:39 PM
rengolin closed this revision.May 12 2016, 2:39 PM

Committed in r269352