Skip to content
This repository has been archived by the owner on Feb 5, 2019. It is now read-only.

Import of fastcomp commit 4105790f1549808c1f1daa5250b4ada5f41a5c02 #52

Merged
merged 1 commit into from
Sep 30, 2016

Conversation

brson
Copy link

@brson brson commented Sep 30, 2016

This is a minimal import of the emscripten "fastcomp" LLVM patchset.
All it contains is the target definitions necessary to create a
TargetMachine with the correct data layout. With this rustc can
emit LLVM IR that emcc will run through the PNaCl lagalizer and
the JS backend to generate asm.js.

r? @alexcrichton

This is a minimal import of the emscripten "fastcomp" LLVM patchset.
All it contains is the target definitions necessary to create a
TargetMachine with the correct data layout. With this rustc can
emit LLVM IR that emcc will run through the PNaCl lagalizer and
the JS backend to generate asm.js.
@alexcrichton
Copy link
Member

Looks good to me! Could you also document here (or in the commit message) the steps you took to trim the commit down? Other than that feel free to merge how you see fit (is the merge button right here?)

@brson
Copy link
Author

brson commented Sep 30, 2016

I'd expect us not to have to make changes to this in the future, except for possibly updating the JSBackend data layout (emscripten is considering it), since acquiring the data layout is just about the only thing this patch does now. But here's what I did:

  • Squashed the fastcomp branch from the merge base with our branch into one commit for easier diffing
  • (Previously) removed the lib/Transform changes that we've been told aren't needed. There are only two remaining, and the InstcombinePatch may not actually be necessary.
  • Preserved the asmjs changes to Triple.h and Triple.cpp
  • Deleted the PNaCl legalizer from lib/Target/JSBackend/NaCl/
  • ripgrepped for the three LLVMInitialize* functions in lib/Target/JSBackend. These are the three functions rustc calls to initalize the target information.
  • From there I traced all the dependencies and deleted everything that wasn't needed
  • Then removed the body of JSTargetMachine::addPassesToEmitFile
  • Then updated the CMakeLists.txt and LLVMBuild.txt files.

@brson brson merged commit b892152 into rust-lang:rust-llvm-2016-07-09 Sep 30, 2016
@alexcrichton
Copy link
Member

👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants