[PATCH] D20682: Expose target-specific pre-linking passes in TargetMachine
Yaxun Liu via llvm-commits
llvm-commits at lists.llvm.org
Thu May 26 07:43:05 PDT 2016
yaxunl created this revision.
yaxunl added a reviewer: chandlerc.
yaxunl added subscribers: llvm-commits, Anastasia, rsmith, tstellarAMD.
Sometimes a backend needs to apply certain target-specific passes before linking. These passes sit in target directory and Clang needs a way to access them.
This patch attempts to expose target-specific pre-linking passes by adding a virtual member function addPreLinkPasses to TargetMachine.
The related Clang change is here:
http://reviews.llvm.org/D20681
http://reviews.llvm.org/D20682
Files:
include/llvm/Target/TargetMachine.h
Index: include/llvm/Target/TargetMachine.h
===================================================================
--- include/llvm/Target/TargetMachine.h
+++ include/llvm/Target/TargetMachine.h
@@ -254,6 +254,9 @@
return true;
}
+ /// Add target-specific pre-linking passes to the specified pass manager.
+ virtual void addPreLinkPasses(PassManagerBase &, raw_pwrite_stream &) {}
+
/// True if subtarget inserts the final scheduling pass on its own.
///
/// Branch relaxation, which must happen after block placement, can
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20682.58610.patch
Type: text/x-patch
Size: 540 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160526/1933f2ac/attachment.bin>
More information about the llvm-commits
mailing list