This is an archive of the discontinued LLVM Phabricator instance.

Make ExecutionEngine::getPointerToGlobal understand GlobalAlias
AbandonedPublic

Authored by yaron.keren on Jun 22 2014, 3:06 AM.

Details

Reviewers
lhames
Summary

ExecutionEngine::getPointerToGlobal gets to unreachable if passed a GlobalAlias.

Diff Detail

Event Timeline

yaron.keren retitled this revision from to Make ExecutionEngine::getPointerToGlobal understand GlobalAlias.
yaron.keren updated this object.
yaron.keren edited the test plan for this revision. (Show Details)
yaron.keren edited the test plan for this revision. (Show Details)
yaron.keren added a subscriber: Unknown Object (MLST).

Any chance of a test? (I know JIT stuff isn't the most testable)

David, sorry for the late response, I had not seen an e-mail update from Phab, probably due to the e-mail problems it had.

I have a test case (code above) but can't run it with lit since lit knows how to run under mcjit (%lli_mcjit) but not under jit. We would have to teach lli to use the jit just to test this.

Anyhow, while I encuntered the problem using the JIT, the patch teaches ExecutionEngine::getPointerToGlobal to handle GlobalAlias and is not really JIT specific.

lhames edited edge metadata.Jul 23 2014, 12:11 PM

Hi Yaron,

This looks good to me, but Dave is right that a test case would be nice.

How did you compile that C++ code to IR, and how did you invoke the JIT?
While %lli_mcjit will run MCJIT, I believe that a vanilla lli call will use the old JIT, which should allow us to test this. If more infrastructure is needed to test this I'm happy to look in to adding it.

Cheers,
Lang.

yaron.keren abandoned this revision.Nov 20 2014, 12:48 AM

No JIT.