1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00
llvm-mirror/include/llvm
Wei Mi d9cf09c389 [GVN] Recommit the patch "Add phi-translate support in scalarpre"
Recommit after workaround the bug PR31652.

Three bugs fixed in previous recommits: 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.

Differential Revision: https://reviews.llvm.org/D32252

llvm-svn: 309397
2017-07-28 15:47:25 +00:00
..
ADT Remove Bitrig: LLVM Changes 2017-07-21 22:48:47 +00:00
Analysis [ValueTracking] Remove a number of unused arguments. NFC. 2017-07-28 14:39:06 +00:00
AsmParser
BinaryFormat [WebAssembly] Expose the offset of each data segment 2017-07-12 00:24:54 +00:00
Bitcode ThinLTO Minimized Bitcode File Size Reduction 2017-07-21 17:25:20 +00:00
CodeGen Re-commit: r309094 [globalisel][tablegen] Fuse the generated tables together. 2017-07-27 11:03:45 +00:00
Config Implement parsing and writing of a single xml manifest file. 2017-07-20 21:42:04 +00:00
DebugInfo [PDB] Write public symbol records and the publics hash table 2017-07-27 18:25:59 +00:00
Demangle
ExecutionEngine Make EHFrames available to sub-classes of RTDyldMemoryManager. 2017-07-18 15:50:28 +00:00
IR DebugInfo: Consider a CU containing only local imported entities to be 'empty' 2017-07-28 03:06:25 +00:00
IRReader
LineEditor
Linker [Linker] Provide callback for internalization 2017-03-13 18:08:11 +00:00
LTO [LTO] Prevent dead stripping and internalization of symbols with sections 2017-07-25 19:42:32 +00:00
MC MC: add support for cfi_return_column 2017-07-28 03:39:19 +00:00
Object [LTO] Prevent dead stripping and internalization of symbols with sections 2017-07-25 19:42:32 +00:00
ObjectYAML [yaml2obj][ELF] Add support for program headers 2017-07-19 20:38:46 +00:00
Option [libOption] - Add flag allowing to print options aliases in help text. 2017-07-26 09:09:56 +00:00
Passes Make new PM honor -fdebug-info-for-profiling 2017-07-26 15:01:20 +00:00
ProfileData [ProfData] Detect if zlib is available 2017-07-21 21:41:15 +00:00
Support [TargetParser] Use enum classes for various ARM kind enums. 2017-07-27 16:27:56 +00:00
TableGen Fix Wdocumentation warning 2017-06-20 12:28:33 +00:00
Target [MachineOutliner] NFC: Split up getOutliningBenefit 2017-07-28 03:21:58 +00:00
Testing/Support [Testing/Support] Remove the const_cast in TakeExpected 2017-06-22 13:11:50 +00:00
ToolDrivers llvm: add llvm-dlltool support to the archiver 2017-07-18 21:26:38 +00:00
Transforms [GVN] Recommit the patch "Add phi-translate support in scalarpre" 2017-07-28 15:47:25 +00:00
WindowsManifest Move manifest utils into separate lib, to reduce libxml2 deps. 2017-07-26 01:21:55 +00:00
XRay [XRay][tools] Add option to llvm-xray extract to symbolize functions 2017-04-18 23:23:54 +00:00
CMakeLists.txt Support: Add a VCSRevision.h header file. 2017-04-13 01:26:12 +00:00
InitializePasses.h [RegAllocFast] Add the proper initialize method to use the .mir infrastructure 2017-07-07 19:25:42 +00:00
LinkAllIR.h Move Object format code to lib/BinaryFormat. 2017-06-07 03:48:56 +00:00
LinkAllPasses.h Remove the BBVectorize pass. 2017-06-30 07:09:08 +00:00
module.modulemap Move manifest utils into separate lib, to reduce libxml2 deps. 2017-07-26 01:21:55 +00:00
module.modulemap.build
Pass.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
PassAnalysisSupport.h Reverted: Track validity of pass results 2017-01-15 10:23:18 +00:00
PassInfo.h [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00
PassRegistry.h
PassSupport.h [LegacyPassManager] Remove TargetMachine constructors 2017-05-18 17:21:13 +00:00