Go to file
Arnold Schwaighofer 3546ccf465 SimplifyCFG: If convert single conditional stores
This transformation will transform a conditional store with a preceeding
uncondtional store to the same location:

 a[i] =
 may-alias with a[i] load
 if (cond)
   a[i] = Y

into an unconditional store.

 a[i] = X
 may-alias with a[i] load
 tmp = cond ? Y : X;
 a[i] = tmp

We assume that on average the cost of a mispredicted branch is going to be
higher than the cost of a second store to the same location, and that the
secondary benefits of creating a bigger basic block for other optimizations to
work on outway the potential case were the branch would be correctly predicted
and the cost of the executing the second store would be noticably reflected in
performance.

hmmer's execution time improves by 30% on an imac12,2 on ref data sets. With
this change we are on par with gcc's performance (gcc also performs this
transformation). There was a 1.2 % performance improvement on a ARM swift chip.
Other tests in the test-suite+external seem to be mostly uninfluenced in my
experiments:
This optimization was triggered on 41 tests such that the executable was
different before/after the patch. Only 1 out of the 40 tests (dealII) was
reproducable below 100% (by about .4%). Given that hmmer benefits so much I
believe this to be a fair trade off.

I am going to watch performance numbers across the builtbots and will revert
this if anything unexpected comes up.

llvm-svn: 179957
2013-04-20 21:42:09 +00:00
clang Update some stuff on the open projects page to reflect things we've already done. 2013-04-20 16:20:44 +00:00
clang-tools-extra Fixed outdate comment, and comment typo. 2013-04-15 22:32:28 +00:00
compiler-rt Fixup for r179843: add missing header 2013-04-19 08:49:05 +00:00
debuginfo-tests Remove IR scenario tests. 2013-03-15 20:52:10 +00:00
libclc Update the copyright coredits -- Happy new year 2013! 2013-01-01 10:00:19 +00:00
libcxx After years of telling people: 'If you ever find any of my code that self-move-assigns, send me a bug report.' Somebody finally took me up on it. vector::erase(begin(), begin()) does a self-move-assign of every element in the vector, leaving all of those elements in an unspecified state. I checked the other containers for this same bug and did not find it. Added test case. 2013-04-18 15:02:57 +00:00
libcxxabi Add capability to demangle invocation functions for ObjC blocks. 2013-04-10 19:44:03 +00:00
lld Distinguish between unsupported and unrecognised flavours. 2013-04-16 19:24:13 +00:00
lldb Fixed the expression parser's handling of result 2013-04-20 02:40:45 +00:00
llvm SimplifyCFG: If convert single conditional stores 2013-04-20 21:42:09 +00:00
polly IndependentBlocks: We can only reconstruct PHI nodes that are within the ScoP 2013-04-17 07:20:36 +00:00