llvm-6502/include/llvm
Chris Lattner 9e59c64c14 Implement initial support for PHI translation in memdep. This means that
memdep keeps track of how PHIs affect the pointer in dep queries, which 
allows it to eliminate the load in cases like rle-phi-translate.ll, which
basically end up being:

BB1:
   X = load P
   br BB3
BB2:
   Y = load Q
   br BB3
BB3:
   R = phi [P] [Q]
   load R

turning "load R" into a phi of X/Y.  In addition to additional exposed
opportunities, this makes memdep safe in many cases that it wasn't before
(which is required for load PRE) and also makes it substantially more 
efficient.  For example, consider:


bb1:  // has many predecessors.
   P = some_operator()
   load P

In this example, previously memdep would scan all the predecessors of BB1
to see if they had something that would mustalias P.  In some cases (e.g.
test/Transforms/GVN/rle-must-alias.ll) it would actually find them and end
up eliminating something.  In many other cases though, it would scan and not
find anything useful.  MemDep now stops at a block if the pointer is defined
in that block and cannot be phi translated to predecessors.  This causes it
to miss the (rare) cases like rle-must-alias.ll, but makes it faster by not
scanning tons of stuff that is unlikely to be useful.  For example, this
speeds up GVN as a whole from 3.928s to 2.448s (60%)!.  IMO, scalar GVN 
should be enhanced to simplify the rle-must-alias pointer base anyway, which
would allow the loads to be eliminated.

In the future, this should be enhanced to phi translate through geps and 
bitcasts as well (as indicated by FIXMEs) making memdep even more powerful.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61022 91177308-0d34-0410-b5e6-96231b3b80d8
2008-12-15 03:35:32 +00:00
..
ADT Add explicit this-> for some member function in templated base class. 2008-12-13 10:55:13 +00:00
Analysis Implement initial support for PHI translation in memdep. This means that 2008-12-15 03:35:32 +00:00
Assembly Move Print*Pass to use raw_ostream. 2008-10-22 03:25:22 +00:00
Bitcode Add raw_ostream versions of WriteBitcodeToFile and BitcodeWriterPass. 2008-10-22 17:39:14 +00:00
CodeGen Reapply r60997, this time without forgetting that 2008-12-14 09:43:15 +00:00
CompilerDriver Merge Base.td and Tools.td. 2008-12-11 10:38:06 +00:00
Config CMake: Remove HAVE_LT_DLOPEN from config.h.cmake because it was 2008-11-18 21:12:01 +00:00
Debugger
ExecutionEngine DisableGVCompilation should not abort on internal GlobalValue's. 2008-12-09 07:31:49 +00:00
Support newline at end of phile 2008-12-09 06:32:32 +00:00
System Update the stub and callback code to handle lazy compilation. The stub 2008-10-20 21:39:23 +00:00
Target Fix MachineCodeEmitter to use uintptr_t instead of intptr_t. This avoids some overflow issues. Patch by Thomas Jablin. 2008-12-10 02:32:19 +00:00
Transforms Factor some code into a new FoldSingleEntryPHINodes method. 2008-12-03 19:44:02 +00:00
AbstractTypeUser.h
Argument.h Large mechanical patch. 2008-09-25 21:00:45 +00:00
Attributes.h Introducing nocapture, a parameter attribute for pointers to indicate that the 2008-12-15 01:34:58 +00:00
AutoUpgrade.h Enable first-class aggregates support. 2008-07-23 00:34:11 +00:00
BasicBlock.h fix grammar, thanks Duncan! 2008-12-11 11:44:49 +00:00
CallGraphSCCPass.h Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
CallingConv.h Add "inreg" field to CallSDNode (doesn't increase 2008-09-26 19:31:26 +00:00
CMakeLists.txt CMake: Adds header and TableGen files to Visual Studio solution. A new 2008-11-15 02:08:08 +00:00
Constant.h fix typo's 2008-10-13 10:28:12 +00:00
Constants.h Make ConstantAggregateZero::get return a ConstantAggregateZero*, 2008-12-08 07:10:54 +00:00
DerivedTypes.h Remove unused parameter. Some clients might use -Werror when compiling and 2008-06-05 07:24:08 +00:00
Function.h Fix disagreement about where the attributes are 2008-10-07 22:33:44 +00:00
GlobalAlias.h Make safer variant of alias resolution routine to be default 2008-09-09 20:05:04 +00:00
GlobalValue.h Rename isWeakForLinker to mayBeOverridden. Use it 2008-09-29 11:25:42 +00:00
GlobalVariable.h Add GlobalValue::{removeFromParent,eraseFromParent} 2008-08-29 07:30:15 +00:00
InlineAsm.h Keep track of *which* input constraint matches an output 2008-10-17 16:47:46 +00:00
InstrTypes.h Use the opcode predicates, instead of duplicating the code. 2008-10-17 21:42:45 +00:00
Instruction.def Cosmetic. 2008-10-06 20:33:02 +00:00
Instruction.h improve const correctness. 2008-11-27 08:39:18 +00:00
Instructions.h add a long-overdue AllocaInst::isStaticAlloca method. 2008-11-26 02:54:17 +00:00
IntrinsicInst.h reapply Sanjiv's patch to genericize memcpy/memset/memmove to take an 2008-11-21 16:42:48 +00:00
Intrinsics.h Large mechanical patch. 2008-09-25 21:00:45 +00:00
Intrinsics.td Add sub/mul overflow intrinsics. This currently doesn't have a 2008-12-09 22:08:41 +00:00
IntrinsicsAlpha.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsARM.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsCellSPU.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsPowerPC.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsX86.td Modify the intrinsics pattern to separate out the "return" types from the 2008-11-13 09:08:33 +00:00
IntrinsicsXCore.td Add XCore intrinsics for getid (returns thread id) and bitrev (reverses 2008-11-14 10:12:16 +00:00
LinkAllPasses.h Add new helper pass that strips all symbol names except debugging information. 2008-11-18 21:34:39 +00:00
LinkAllVMCore.h opt was not exporting the Mangler symbols 2008-11-05 22:42:50 +00:00
Linker.h Make comments and code for QuietWarnings and QuietErrors 2008-10-25 17:57:20 +00:00
Module.h - Add a "getOrInsertGlobal" method to the Module class. This acts similarly to 2008-11-04 22:51:24 +00:00
ModuleProvider.h
OperandTraits.h 80col 2008-07-05 22:41:37 +00:00
Pass.h Add an assert to catch user errors like: 2008-10-31 17:27:41 +00:00
PassAnalysisSupport.h Speed up the passmgr by avoiding heap thrashing on vectors. 2008-08-08 05:33:04 +00:00
PassManager.h allow updating the MPM, so that you can use one FunctionPAssManager with 2008-06-26 22:26:45 +00:00
PassManagers.h Trim #includes. 2008-10-16 20:18:31 +00:00
PassSupport.h Correct a comment. 2008-06-24 17:46:48 +00:00
SymbolTableListTraits.h Fold the useful features of alist and alist_node into ilist, and 2008-07-28 21:51:04 +00:00
Type.h add a new form of Type::dump that takes a module for type names, 2008-10-01 20:16:19 +00:00
TypeSymbolTable.h
Use.h Add comment on how tagged pointers are 2008-10-17 08:31:36 +00:00
User.h Do not allow a user to set the operand for a constant. 2008-10-28 17:22:40 +00:00
Value.h Comment typeo fix, thanks Duncan! 2008-12-02 18:33:11 +00:00
ValueSymbolTable.h implement some fixme's by making "autorenaming" in the value symbol table not 2008-06-27 21:26:26 +00:00