aboutsummaryrefslogtreecommitdiff
path: root/include/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/CodeGen/Passes.h2
-rw-r--r--include/llvm/Support/CommandLine.h22
-rw-r--r--include/llvm/Target/TargetMachine.h8
3 files changed, 31 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h
index bd13664852..e7a97cf6bd 100644
--- a/include/llvm/CodeGen/Passes.h
+++ b/include/llvm/CodeGen/Passes.h
@@ -79,7 +79,7 @@ namespace llvm {
/// optimizations to delete branches to branches, eliminate branches to
/// successor blocks (creating fall throughs), and eliminating branches over
/// branches.
- FunctionPass *createBranchFoldingPass();
+ FunctionPass *createBranchFoldingPass(bool DefaultEnableTailMerge);
/// IfConverter Pass - This pass performs machine code if conversion.
FunctionPass *createIfConverterPass();
diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h
index c31d79f4e6..08aca8160a 100644
--- a/include/llvm/Support/CommandLine.h
+++ b/include/llvm/Support/CommandLine.h
@@ -544,6 +544,28 @@ public:
EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<bool>);
+//--------------------------------------------------
+// parser<boolOrDefault>
+enum boolOrDefault { BOU_UNSET, BOU_TRUE, BOU_FALSE };
+template<>
+class parser<boolOrDefault> : public basic_parser<boolOrDefault> {
+public:
+ // parse - Return true on error.
+ bool parse(Option &O, const char *ArgName, const std::string &Arg,
+ boolOrDefault &Val);
+
+ enum ValueExpected getValueExpectedFlagDefault() const {
+ return ValueOptional;
+ }
+
+ // getValueName - Do not print =<value> at all.
+ virtual const char *getValueName() const { return 0; }
+
+ // An out-of-line virtual method to provide a 'home' for this class.
+ virtual void anchor();
+};
+
+EXTERN_TEMPLATE_INSTANTIATION(class basic_parser<boolOrDefault>);
//--------------------------------------------------
// parser<int>
diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h
index e5fceba522..faf3c35c49 100644
--- a/include/llvm/Target/TargetMachine.h
+++ b/include/llvm/Target/TargetMachine.h
@@ -185,6 +185,10 @@ public:
AssemblyFile, ObjectFile, DynamicLibrary
};
+ /// DoTailMergeDefault - Whether it is generally a good idea to do this
+ /// on this target. User flag overrides.
+ virtual const bool DoTailMergeDefault() const { return true; }
+
/// addPassesToEmitFile - Add passes to the specified pass manager to get the
/// specified file emitted. Typically this will involve several steps of code
/// generation. If Fast is set to true, the code generator should emit code
@@ -315,6 +319,10 @@ public:
MachineCodeEmitter &MCE) {
return true;
}
+
+ /// DoTailMergeDefault - Whether it is generally a good idea to do this
+ /// on this target. User flag overrides.
+ virtual const bool DoTailMergeDefault() const { return true; }
};
} // End llvm namespace