1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/include/llvm/Transforms
Wei Mi 402b9f7bb9 [GVN] Recommit the patch "Add phi-translate support in scalarpre".
The recommit fixes three bugs: The first one is to use CurrentBlock instead of
PREInstr's Parent as param of performScalarPREInsertion because the Parent
of a clone instruction may be uninitialized. The second one is stop PRE when
CurrentBlock to its predecessor is a backedge and an operand of CurInst is
defined inside of CurrentBlock. The same value defined inside of loop in last
iteration can not be regarded as available. The third one is an out-of-bound
array access in a flipped if guard.

Right now scalarpre doesn't have phi-translate support, so it will miss some
simple pre opportunities. Like the following testcase, current scalarpre cannot
recognize the last "a * b" is fully redundent because a and b used by the last
"a * b" expr are both defined by phis.

long a[100], b[100], g1, g2, g3;
__attribute__((pure)) long goo();

void foo(long a, long b, long c, long d) {

  g1 = a * b;
  if (__builtin_expect(g2 > 3, 0)) {
    a = c;
    b = d;
    g2 = a * b;
  }
  g3 = a * b;      // fully redundant.

}

The patch adds phi-translate support in scalarpre. This is only a temporary
solution before the newpre based on newgvn is available.

llvm-svn: 306313
2017-06-26 18:16:10 +00:00
..
InstCombine Do a sweep over move ctors and remove those that are identical to the default. 2016-10-20 12:20:28 +00:00
IPO Remove the LoadCombine pass. It was never enabled and is unsupported. 2017-06-22 22:58:12 +00:00
Scalar [GVN] Recommit the patch "Add phi-translate support in scalarpre". 2017-06-26 18:16:10 +00:00
Utils [InstCombine] Factor the logic for propagating !nonnull and !range 2017-06-26 03:31:31 +00:00
Vectorize Improve profile-guided heuristics to use estimated trip count. 2017-06-19 18:48:58 +00:00
Coroutines.h
GCOVProfiler.h
InstrProfiling.h [PGO] Implementate profile counter regiser promotion 2017-06-25 00:26:43 +00:00
Instrumentation.h [PGO] Implementate profile counter regiser promotion 2017-06-25 00:26:43 +00:00
IPO.h [ThinLTO] Add support for emitting minimized bitcode for thin link 2017-03-23 19:47:39 +00:00
ObjCARC.h
PGOInstrumentation.h [PGO] Memory intrinsic calls optimization based on profiled size 2017-04-04 16:42:20 +00:00
SampleProfile.h
Scalar.h Remove the LoadCombine pass. It was never enabled and is unsupported. 2017-06-22 22:58:12 +00:00
Vectorize.h