aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetPassConfig.cpp
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2018-11-02 01:31:50 +0000
committerMatthias Braun <matze@braunis.de>2018-11-02 01:31:50 +0000
commite8f717aea86c4fbc0e3f3d2990765ffcd1ed8dbd (patch)
tree4b7317416fa404693c370e84134646a34c7baeb9 /llvm/lib/CodeGen/TargetPassConfig.cpp
parent3231e518a3b57d3a43100bf127fa3484005edafb (diff)
downloadllvm-e8f717aea86c4fbc0e3f3d2990765ffcd1ed8dbd.zip
llvm-e8f717aea86c4fbc0e3f3d2990765ffcd1ed8dbd.tar.gz
llvm-e8f717aea86c4fbc0e3f3d2990765ffcd1ed8dbd.tar.bz2
LLVMTargetMachine/TargetPassConfig: Simplify handling of start/stop options; NFC
- Make some TargetPassConfig methods that just check whether options have been set static. - Shuffle code in LLVMTargetMachine around so addPassesToGenerateCode only deals with TargetPassConfig now (but not with MCContext or the creation of MachineModuleInfo) llvm-svn: 345918
Diffstat (limited to 'llvm/lib/CodeGen/TargetPassConfig.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetPassConfig.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp
index 6a9c3c0..9adacd2e 100644
--- a/llvm/lib/CodeGen/TargetPassConfig.cpp
+++ b/llvm/lib/CodeGen/TargetPassConfig.cpp
@@ -419,8 +419,13 @@ TargetPassConfig::TargetPassConfig()
"triple set?");
}
-bool TargetPassConfig::hasLimitedCodeGenPipeline() const {
- return StartBefore || StartAfter || StopBefore || StopAfter;
+bool TargetPassConfig::willCompleteCodeGenPipeline() {
+ return StopBeforeOpt.empty() && StopAfterOpt.empty();
+}
+
+bool TargetPassConfig::hasLimitedCodeGenPipeline() {
+ return !StartBeforeOpt.empty() || !StartAfterOpt.empty() ||
+ !willCompleteCodeGenPipeline();
}
std::string