[PATCH] D15025: [ThinLTO] Option to invoke ThinLTO backend passes and importing

Teresa Johnson via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 4 06:33:29 PST 2015


tejohnson added a comment.

> Talked with Duncan, we're not convinced about -fthinlto-backend=... for the option name: the word backend does not seems right here. What about -fthinlto-index=...?


I wanted to express that this was invoking a different pipeline, and distinguish from a normal compilation that takes a source file. But I'm ok with your suggestion if you prefer that.


================
Comment at: lib/CodeGen/CodeGenAction.cpp:822
@@ +821,3 @@
+      TheModule = std::move(Combined);
+    }
+
----------------
joker.eph wrote:
> Could we refactor this in a helper in llvm?
I can create a new Linker interface that takes the index path, builds the index, does the link and returns the ErrorOr index.

================
Comment at: test/Driver/thinlto_backend.c:6
@@ +5,3 @@
+// RUN: %clang -target x86_64-unknown-linux -O2 -o %t1.o -x ir %t.o -c -fthinlto-backend=%t.thinlto.bc -### 2> %t
+// RUN: FileCheck -check-prefix=CHECK-THINLTOBE-ACTION < %t %s
+// CHECK-THINLTOBE-ACTION: -fthinlto-backend=
----------------
joker.eph wrote:
> Why not pipe to FileCheck here?
Will do. I think I cloned this from another test.


http://reviews.llvm.org/D15025





More information about the cfe-commits mailing list