1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-25 14:02:52 +02:00
llvm-mirror/lib
Bruno Cardoso Lopes e5225dc00d [PeepholeOptimizer] Look through PHIs to find additional register sources
Reapply 243271 with more fixes; although we are not handling multiple
sources with coalescable copies, we were not properly skipping this
case.

- Teaches the ValueTracker in the PeepholeOptimizer to look through PHI
instructions.
- Add findNextSourceAndRewritePHI method to lookup into multiple sources
returnted by the ValueTracker and rewrite PHIs with new sources.

With these changes we can find more register sources and rewrite more
copies to allow coaslescing of bitcast instructions. Hence, we eliminate
unnecessary VR64 <-> GR64 copies in x86, but it could be extended to
other archs by marking "isBitcast" on target specific instructions. The
x86 example follows:

A:
  psllq %mm1, %mm0
  movd  %mm0, %r9
  jmp C

B:
  por %mm1, %mm0
  movd  %mm0, %r9
  jmp C

C:
  movd  %r9, %mm0
  pshufw  $238, %mm0, %mm0

Becomes:

A:
  psllq %mm1, %mm0
  jmp C

B:
  por %mm1, %mm0
  jmp C

C:
  pshufw  $238, %mm0, %mm0

Differential Revision: http://reviews.llvm.org/D11197
rdar://problem/20404526

llvm-svn: 243486
2015-07-28 21:45:50 +00:00
..
Analysis [SCEV] Apply NSW and NUW flags via poison value analysis 2015-07-28 18:22:40 +00:00
AsmParser [opaque pointers] Avoid the use of pointee types when parsing inline asm in IR 2015-07-27 23:32:19 +00:00
Bitcode Reserve some constant values for the Swift calling convention. 2015-07-28 04:05:45 +00:00
CodeGen [PeepholeOptimizer] Look through PHIs to find additional register sources 2015-07-28 21:45:50 +00:00
DebugInfo [RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef 2015-07-28 17:52:11 +00:00
ExecutionEngine [RuntimeDyld] Make LoadedObjectInfo::getLoadedSectionAddress take a SectionRef 2015-07-28 17:52:11 +00:00
Fuzzer [libFuzzer] ensure that the dfsan tracing hooks actually run (using -verbosity=3 in tests) 2015-07-28 01:25:00 +00:00
IR Remove unnecessary const_casts. NFC 2015-07-28 04:28:46 +00:00
IRReader Return a unique_ptr from getLazyBitcodeModule and parseBitcodeFile. NFC. 2015-06-16 22:27:55 +00:00
LibDriver Add support for producing thin archives in llvm-lib. 2015-07-17 16:01:11 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
LTO Remove access to the DataLayout in the TargetMachine 2015-07-24 16:04:22 +00:00
MC [llvm-mc] Add --no-warn flag with -W alias to disable outputting warnings while assembling. 2015-07-27 22:39:14 +00:00
Object Summary: 2015-07-28 16:18:17 +00:00
Option [Option] Plug a leak when move-assigning an InputArgList. 2015-06-23 15:28:10 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Support - Added support for parsing HWDiv features using Target Parser. 2015-07-27 22:26:59 +00:00
TableGen [TableGen] Emit the correct error message. 2015-07-27 17:22:19 +00:00
Target [PeepholeOptimizer] Look through PHIs to find additional register sources 2015-07-28 21:45:50 +00:00
Transforms [Unroll] Add debug dumps to loop-unroll analyzer. 2015-07-28 20:07:29 +00:00
CMakeLists.txt LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00
LLVMBuild.txt Wrap some long lines in LLVMBuild files. NFC 2015-06-12 18:44:57 +00:00
Makefile LibDriver, llvm-lib: introduce. 2015-06-09 21:50:22 +00:00