This revision was automatically updated to reflect the committed changes.
Closed by commit rL269202: Embed bitcode in object file (clang cc1 part)
(authored by steven_wu).
Changed prior to commit:
http://reviews.llvm.org/D17392?vs=56371&id=56930#toc
Repository:
rL LLVM
http://reviews.llvm.o
steven_wu added a comment.
Attach a new patch with the comments
Comment at: lib/CodeGen/BackendUtil.cpp:799-831
@@ +798,35 @@
+ // Embed the bitcode for the llvm module.
+ std::string Data;
+ ArrayRef ModuleData;
+ Triple T(M->getTargetTriple());
+ if (CGOpts.getEmbedBitcod
steven_wu updated this revision to Diff 56371.
steven_wu marked 2 inline comments as done.
steven_wu added a comment.
Add comments to address the feedback fromt the review.
http://reviews.llvm.org/D17392
Files:
include/clang/CodeGen/BackendUtil.h
include/clang/Driver/Options.td
include/cl
rsmith added inline comments.
Comment at: lib/CodeGen/BackendUtil.cpp:799-831
@@ +798,35 @@
+ // Embed the bitcode for the llvm module.
+ std::string Data;
+ ArrayRef ModuleData;
+ Triple T(M->getTargetTriple());
+ if (CGOpts.getEmbedBitcode() != CodeGenOptions::Embed_Marker)
steven_wu updated this revision to Diff 56367.
steven_wu added a comment.
Format update according to review.
http://reviews.llvm.org/D17392
Files:
include/clang/CodeGen/BackendUtil.h
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
include/clang/Frontend/CodeGen
steven_wu added inline comments.
Comment at: lib/CodeGen/BackendUtil.cpp:769-770
@@ +768,4 @@
+void clang::EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts,
+ llvm::MemoryBufferRef Buf)
+{
+ if (CGOpts.getEmbedBitcode() == CodeGenOptions::Embed_O
rsmith added inline comments.
Comment at: lib/CodeGen/BackendUtil.cpp:769-770
@@ +768,4 @@
+void clang::EmbedBitcode(llvm::Module *M, const CodeGenOptions &CGOpts,
+ llvm::MemoryBufferRef Buf)
+{
+ if (CGOpts.getEmbedBitcode() == CodeGenOptions::Embed_Off)
steven_wu added a comment.
Ping.
http://reviews.llvm.org/D17392
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
steven_wu updated this revision to Diff 54597.
steven_wu added a comment.
Thanks Vedant!
Address all of your review in this update.
http://reviews.llvm.org/D17392
Files:
include/clang/CodeGen/BackendUtil.h
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
includ
vsk added a subscriber: vsk.
vsk added a comment.
Just a few nitpicks.
Comment at: lib/CodeGen/BackendUtil.cpp:785
@@ +784,3 @@
+ llvm::WriteBitcodeToFile(M, OS, /* ShouldPreserveUseListOrder */ true);
+ ModuleData = ArrayRef((uint8_t*)OS.str().data(),
+
steven_wu updated this revision to Diff 54559.
steven_wu added a comment.
Ping.
Rebase the patch over trunk and tweak the testcase.
http://reviews.llvm.org/D17392
Files:
include/clang/CodeGen/BackendUtil.h
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
includ
steven_wu added a comment.
ping. The currently -fembed-bitcode option is only half working. I don't want
to leave it like that too long.
http://reviews.llvm.org/D17392
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cg
steven_wu updated this revision to Diff 52435.
steven_wu added a comment.
Address the feedback from Richard:
Break -fembed-bitcode option into multiple -fembed-bitcode= options.
-fembed-bitcode=all will embed both bitcode and commandline and
-fembed-bitcode=bitcode will embed only the bitcode in
rsmith added a comment.
From a code standpoint, this looks fine to me, but I'd like to understand a bit
more about what you aim to achieve with the various parts here.
Comment at: include/clang/Frontend/CodeGenOptions.def:57
@@ -56,1 +56,3 @@
+CODEGENOPT(EmbedBitcode , 1,
steven_wu added a comment.
Hi Richard
Thanks for looking at the patch! Replies are inlined with the feedback.
Steven
Comment at: include/clang/Frontend/CodeGenOptions.def:57
@@ -56,1 +56,3 @@
+CODEGENOPT(EmbedBitcode , 1, 0) ///< Embed LLVM IR bitcode as data.
+CODEGENOPT
steven_wu added a comment.
ping
http://reviews.llvm.org/D17392
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
16 matches
Mail list logo