summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* cleanupsChris Lattner2009-10-111-20/+18
| | | | llvm-svn: 83797
* cleanup, no functionality change.Chris Lattner2009-10-111-34/+33
| | | | llvm-svn: 83795
* generalize a transformation even more: we don't care whether theChris Lattner2009-10-111-12/+10
| | | | | | | | | input the the mul is a zext from bool, just that it is all zeros other than the low bit. This fixes some phase ordering issues that would cause us to miss some xforms in mul.ll when the worklist is visited differently. llvm-svn: 83794
* simplify a transformation by making it more general.Chris Lattner2009-10-111-32/+14
| | | | llvm-svn: 83792
* temporarily revert previous patchChris Lattner2009-10-111-14/+1
| | | | llvm-svn: 83791
* populate instcombine's initial worklist more carefully, causingChris Lattner2009-10-111-1/+14
| | | | | | | | it to visit instructions from the start of the function to the end of the function in the first path. This greatly speeds up some pathological cases (e.g. PR5150). llvm-svn: 83790
* Remove CleanupDbgInfo, instcombine does this and its not worth duplicating itTorok Edwin2009-10-111-35/+0
| | | | | | here. llvm-svn: 83789
* LICM shouldn't sink/delete debug information. Fix this and add a testcase.Torok Edwin2009-10-111-1/+39
| | | | | | | For now the metadata of sinked/hoisted instructions is still wrong, but that'll be fixed when instructions will have debug metadata directly attached. llvm-svn: 83786
* Implement 'm' memory operand properlyAnton Korobeynikov2009-10-111-0/+20
| | | | llvm-svn: 83785
* Implement proper asmprinting for the globals. This eliminates bogus "call" ↵Anton Korobeynikov2009-10-112-12/+12
| | | | | | modifier and also adds support for offsets wrt globals. llvm-svn: 83784
* Implement asm printing for inline asm memory operandsAnton Korobeynikov2009-10-111-0/+13
| | | | llvm-svn: 83783
* when folding duplicate conditions, delete the Chris Lattner2009-10-111-0/+2
| | | | | | now-probably-dead instruction tree feeding it. llvm-svn: 83778
* implement rdar://7293527, a trivial instcombine that llvm-gccChris Lattner2009-10-111-1/+12
| | | | | | | gets but clang doesn't, because it is implemented in GCC's fold routine. llvm-svn: 83761
* implement a transformation in jump threading that is currentlyChris Lattner2009-10-111-64/+218
| | | | | | | | | | done by condprop, but do it in a much more general form. The basic idea is that we can do a limited form of tail duplication in the case when we have a branch on a phi. Moving the branch up in to the predecessor block makes instruction selection much easier and encourages chained jump threadings. llvm-svn: 83759
* restructure some code, no functionality change.Chris Lattner2009-10-111-33/+29
| | | | llvm-svn: 83756
* factor some code better and move a function, no functionality change.Chris Lattner2009-10-111-81/+55
| | | | llvm-svn: 83755
* make jump threading on a phi with undef inputs happen.Chris Lattner2009-10-111-28/+54
| | | | llvm-svn: 83754
* rewrite LCSSA to use SSAUpdate, to only return true if it modifiesChris Lattner2009-10-111-154/+130
| | | | | | the IR, and to implement the FIXME'd optimization. llvm-svn: 83748
* clean up and simplify some code. Don't use setvector when things will beChris Lattner2009-10-111-28/+23
| | | | | | | inserted only once, just use vector. Don't compute ExitBlocks unless we need it, change std::sort to array_pod_sort. llvm-svn: 83747
* switch GVN to use SSAUpdater. Besides removing a lot of complexityChris Lattner2009-10-101-151/+38
| | | | | | | | from GVN, this also speeds it up, inserts fewer PHI nodes (see the testcase) and allows it to remove more loads (due to fewer PHI nodes standing in the way). llvm-svn: 83746
* add a simple helper method.Chris Lattner2009-10-101-0/+6
| | | | llvm-svn: 83745
* add ability for clients of SSAUpdater to find out about theChris Lattner2009-10-101-1/+9
| | | | | | PHI nodes inserted. llvm-svn: 83744
* remove dead codeChris Lattner2009-10-101-65/+0
| | | | llvm-svn: 83742
* add the ability to get a rewritten value from the middle of a block,Chris Lattner2009-10-101-3/+92
| | | | | | | not just at the end. Add a big comment explaining when this could be useful (which never happens for jump threading). llvm-svn: 83741
* rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect Chris Lattner2009-10-101-11/+11
| | | | | | what it does. llvm-svn: 83740
* It seems that OR operation does not affect status reg at all.Anton Korobeynikov2009-10-101-12/+8
| | | | | | Remove impdef of SRW. This fixes PR4779 llvm-svn: 83739
* use a typedef instead of spelling out an insane type. Yay for auto someday.Chris Lattner2009-10-101-3/+3
| | | | llvm-svn: 83707
* Change jump threading to use the new SSAUpdater class instead of Chris Lattner2009-10-101-16/+43
| | | | | | | | | DemoteRegToStack. This makes it more efficient (because it isn't creating a ton of load/stores that are eventually removed by a later mem2reg), and more slightly more effective (because those load/stores don't get in the way of threading). llvm-svn: 83706
* Implement an efficient and fully general SSA update mechanism that Chris Lattner2009-10-102-0/+233
| | | | | | works on unstructured CFGs. This implements PR217, our oldest open PR. llvm-svn: 83705
* random tidyingChris Lattner2009-10-102-12/+12
| | | | llvm-svn: 83701
* Create a new InstrEmitter class for translating SelectionDAG nodesDan Gohman2009-10-105-183/+263
| | | | | | | | into MachineInstrs. This is mostly just moving the code from ScheduleDAGSDNodesEmit.cpp into a new class. This decouples MachineInstr emitting from scheduling. llvm-svn: 83699
* Make getMachineNode return a MachineSDNode* instead of a generic SDNode*Dan Gohman2009-10-101-42/+53
| | | | | | | since it won't do any folding. This will help avoid some inconvenient casting. llvm-svn: 83698
* Remove a no-longer-necessary #include.Dan Gohman2009-10-101-1/+0
| | | | llvm-svn: 83697
* Replace X86's CanRematLoadWithDispOperand by calling the target-independentDan Gohman2009-10-102-26/+5
| | | | | | | MachineInstr::isInvariantLoad instead, which has the benefit of being more complete. llvm-svn: 83696
* Fix a missing initialization of PostRAScheduler's AA member.Dan Gohman2009-10-101-0/+2
| | | | llvm-svn: 83695
* The ScheduleDAG framework now requires an AliasAnalysis argument, thoughDan Gohman2009-10-095-5/+5
| | | | | | it isn't needed in the ScheduleDAGSDNodes schedulers. llvm-svn: 83691
* Mark the LDR instruction with isReMaterializable, as it is rematerializableDan Gohman2009-10-091-1/+1
| | | | | | when loading from an invariant memory location. llvm-svn: 83688
* Factor out LiveIntervalAnalysis' code to determine whether an instructionDan Gohman2009-10-0912-116/+135
| | | | | | | | | | | | | | is trivially rematerializable and integrate it into TargetInstrInfo::isTriviallyReMaterializable. This way, all places that need to know whether an instruction is rematerializable will get the same answer. This enables the useful parts of the aggressive-remat option by default -- using AliasAnalysis to determine whether a memory location is invariant, and removes the questionable parts -- rematting operations with virtual register inputs that may not be live everywhere. llvm-svn: 83687
* Extract scope information from the variable itself, instead of relying on ↵Devang Patel2009-10-094-32/+41
| | | | | | | | alloca or llvm.dbg.declare location. While recording beginning of a function, use scope info from the first location entry instead of just relying on first location entry itself. llvm-svn: 83684
* ExecutionEngine::clearGlobalMappingsFromModule failed to remove reverseJeffrey Yasskin2009-10-091-16/+19
| | | | | | | mappings, which could cause errors and assert-failures. This patch fixes that, adds a test, and refactors the global-mapping-removal code into a single place. llvm-svn: 83678
* Add a const qualifier.Dan Gohman2009-10-091-2/+2
| | | | llvm-svn: 83677
* Use names instead of numbers for some of the magicDale Johannesen2009-10-092-9/+10
| | | | | | | constants used in inlining heuristics (especially those used in more than one file). No functional change. llvm-svn: 83675
* Added another bit of the ARM target assembler to llvm-mc to parse registerKevin Enderby2009-10-091-21/+104
| | | | | | | | | | | lists. Changed ARMAsmParser::MatchRegisterName to return -1 instead of 0 on errors so 0-15 values could be returned as register numbers. Also added the rest of the arm register names to the currently hacked up version to allow more testing. Some changes to ARMAsmParser::ParseOperand to give different errors for things not yet supported and some additions to the hacked ARMAsmParser::MatchInstruction to allow more testing for now. llvm-svn: 83673
* isTriviallyReMaterializable checks theDan Gohman2009-10-094-7/+4
| | | | | | | TargetInstrDesc::isRematerializable flag, so it isn't necessary to do this check in its callers. llvm-svn: 83671
* Fix the x86 test-shrink optimization so that it doesn't shrink comparisonsDan Gohman2009-10-091-4/+74
| | | | | | | | when one of the bits being tested would end up being the sign bit in the narrower type, and a signed comparison is being performed, since this would change the result of the signed comparison. This fixes PR5132. llvm-svn: 83670
* Add basic infrastructure and x86 support for preserving MachineMemOperandDan Gohman2009-10-093-3/+99
| | | | | | information when unfolding memory references. llvm-svn: 83656
* Check invalid debug info for enums. This may happen when underlyng enum is ↵Devang Patel2009-10-091-2/+4
| | | | | | optimized away. Eventually DwarfChecker will clean this up during llvm verification stage. llvm-svn: 83655
* when previous scratch register is killed, flag the value as no longer trackingJim Grosbach2009-10-091-1/+4
| | | | llvm-svn: 83653
* Revert r83606 and add comments explaining why it isn't safe.Dan Gohman2009-10-091-12/+10
| | | | llvm-svn: 83649
* Give Dan and my recent changes, machine LICM is now code size neutral.Evan Cheng2009-10-091-4/+0
| | | | llvm-svn: 83624
OpenPOWER on IntegriCloud