This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Implement pseudo LDR <reg>, =<literal/label>
ClosedPublic

Authored by weimingz on Jun 16 2014, 1:38 PM.

Diff Detail

Event Timeline

weimingz updated this revision to Diff 10456.Jun 16 2014, 1:38 PM
weimingz retitled this revision from to [AArch64] Implement pseudo LDR <reg>, =<literal/label>.
weimingz updated this object.
weimingz edited the test plan for this revision. (Show Details)
weimingz added reviewers: dpeixott, t.p.northover.
dpeixott edited edge metadata.Jun 17 2014, 4:58 PM

Overall this looks good to me, but I think we should split this into two commits: 1 factoring commit that moves the constant pools to a place that can be accessed by both AArch64 and ARM backends, and a second commit to implement the ldr= psuedo for AArch64.

test/MC/AArch64/ldr-pseudo.s
1 ↗(On Diff #10456)

Either add the corresponding test for darwin, or delete this comment. I'm not sure if it is applicable for aarch64, or if the syntax is now unified between linux and darwin.

dpeixott added a subscriber: Unknown Object (MLST).Jun 17 2014, 5:17 PM

Adding llvm-commits to CC.

weimingz updated this revision to Diff 10523.Jun 17 2014, 6:25 PM
weimingz edited edge metadata.

This is the refactoring part.

dpeixott accepted this revision.Jun 17 2014, 6:55 PM
dpeixott edited edge metadata.

LGTM with a suitable commit message explaining why we want to split out the implementation.

This revision is now accepted and ready to land.Jun 17 2014, 6:55 PM
In D4163#9, @dpeixott wrote:

LGTM with a suitable commit message explaining why we want to split out the implementation.

Thanks for reviewing, David. I committed the refactoring part as r211198.

weimingz updated this revision to Diff 10583.Jun 18 2014, 11:48 AM
weimingz edited edge metadata.

This is the second part (for aarch64).

Minor cleanup, otherwise LGTM.

As a suggestion for the future I think it would be better to start a new differential revision for each patch. Also, if you add "Differential Revison: <url>" to the commit message it will close it automatically on commit.

lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp
3031 ↗(On Diff #10583)

use cast<> instead of dyn_cast<> when not checking the return value for null.

weimingz updated this revision to Diff 10707.Jun 20 2014, 2:43 PM
weimingz closed this revision.Jun 23 2014, 1:52 PM
weimingz updated this revision to Diff 10763.

Closed by commit rL211533 (authored by @weimingz).