[PATCH] D33839: Correctly remap BlockAddress when using CodeExtractor
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 11 01:11:47 PDT 2017
serge-sans-paille added a comment.
@davidxl
It is probably not legal to outline a BB with BB's address captured,
I don't see anything in the lang ref that goes in that way. You could save the `blockaddress` in an array at some point in the program, and use it later on.
================
Comment at: test/Transforms/CodeExtractor/BlockAddressreference.ll:1-2
+; RUN: opt < %s -loop-extract -disable-output
+
+ at label = common local_unnamed_addr global i8* null
----------------
davide wrote:
> This test has no check lines, so I guess it will pass also without your change [unless it crashed before] ? Is there a better way of testing?
@davide: yeah, it was crashing before, illegaly referencing `blockaddress(@asterix, %for.cond)` that no longer existed because of the outlining. This patch remaps it to `@blockaddress(@outlined_function, %for.cond)`.
https://reviews.llvm.org/D33839
More information about the llvm-commits
mailing list