diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2013-07-27 00:01:07 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2013-07-27 00:01:07 +0000 |
commit | 8b1e021e85878c773e042dade2a30892f896c9c3 (patch) | |
tree | 603dd63f3e8f9a4281c1a80157f5a850a2f9fed3 /llvm/lib/CodeGen/BasicTargetTransformInfo.cpp | |
parent | 94faa4d0d4258ab534c1c9642f46ae41b52f07e5 (diff) | |
download | bcm5719-llvm-8b1e021e85878c773e042dade2a30892f896c9c3.tar.gz bcm5719-llvm-8b1e021e85878c773e042dade2a30892f896c9c3.zip |
SimplifyCFG: Use parallel-and and parallel-or mode to consolidate branch conditions
Merge consecutive if-regions if they contain identical statements.
Both transformations reduce number of branches. The transformation
is guarded by a target-hook, and is currently enabled only for +R600,
but the correctness has been tested on X86 target using a variety of
CPU benchmarks.
Patch by: Mei Ye
llvm-svn: 187278
Diffstat (limited to 'llvm/lib/CodeGen/BasicTargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BasicTargetTransformInfo.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp index 3755320ab15..cb12a40ff0f 100644 --- a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp +++ b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp @@ -65,6 +65,8 @@ public: return this; } + virtual bool hasBranchDivergence() const; + /// \name Scalar TTI Implementations /// @{ @@ -124,6 +126,7 @@ llvm::createBasicTargetTransformInfoPass(const TargetMachine *TM) { return new BasicTTI(TM); } +bool BasicTTI::hasBranchDivergence() const { return false; } bool BasicTTI::isLegalAddImmediate(int64_t imm) const { return getTLI()->isLegalAddImmediate(imm); |