[PATCH] D28123: [GlobalIsel] Add support for address-taken basic blocks

Kristof Beyls via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 27 08:43:50 PST 2016


kristof.beyls created this revision.
kristof.beyls added reviewers: qcolombet, t.p.northover, ab, dsanders, rovka.
kristof.beyls added a subscriber: llvm-commits.
Herald added subscribers: dberris, aemerson.

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.


https://reviews.llvm.org/D28123

Files:
  lib/CodeGen/GlobalISel/IRTranslator.cpp
  test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
  test/CodeGen/AArch64/GlobalISel/irtranslator-exceptions.ll
  test/CodeGen/X86/GlobalISel/irtranslator-call.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28123.82542.patch
Type: text/x-patch
Size: 4870 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161227/333c0ca2/attachment.bin>


More information about the llvm-commits mailing list