This is an archive of the discontinued LLVM Phabricator instance.

[GlobalIsel] Add support for address-taken basic blocks
ClosedPublic

Authored by kristof.beyls on Dec 27 2016, 8:43 AM.

Details

Summary

In this patch, support for handling address-taken basic blocks in GlobalISel is added.
Together with https://reviews.llvm.org/D28079, this makes SingleSource/Regression/C/2004-03-15-IndirectGoto in the test-suite run correctly with -mllvm -global-isel=true -mllvm -global-isel-abort=1.

To make this work, pointers from the MachineBasicBlock to the LLVM-IR-level basic blocks need to be initialized, as the AsmPrinter uses this link to be able to print out labels for the basic blocks that are address-taken.
Most of the patch therefore is adapting existing tests to include the basic block name that is now printed out in the MIR format, now that the name becomes available as the link to the LLVM-IR basic block is initialized.
The relevant test change for the functionality added in this patch are the added "(address-taken)" strings in test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll.

Diff Detail

Event Timeline

kristof.beyls retitled this revision from to [GlobalIsel] Add support for address-taken basic blocks.
kristof.beyls updated this object.
kristof.beyls added a subscriber: llvm-commits.
qcolombet accepted this revision.Jan 4 2017, 4:21 PM
qcolombet edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jan 4 2017, 4:21 PM
This revision was automatically updated to reflect the committed changes.