aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Make SCEV::getType() and SCEV::print non-virtual. Move SCEV::hasOperandDan Gohman2010-11-173-167/+186
| | | | | | | to ScalarEvolution. Delete SCEV::~SCEV. SCEV is no longer virtual. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119578 91177308-0d34-0410-b5e6-96231b3b80d8
* Second attempt at correct encodings for Thumb2 bitfield instructions.Owen Anderson2010-11-172-13/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119575 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment typo.Jim Grosbach2010-11-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119573 91177308-0d34-0410-b5e6-96231b3b80d8
* These tests are looking for library function names thatDale Johannesen2010-11-177-7/+7
| | | | | | | | | appear to differ on Linux. Try to make them pass on Linux. Would be good for a Linux person to review this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119572 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SCEV::dominates and properlyDominates to ScalarEvolution.Dan Gohman2010-11-175-117/+112
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119570 91177308-0d34-0410-b5e6-96231b3b80d8
* Change ARMGlobalMerge to keep BSS globals in separate pools.Bob Wilson2010-11-172-5/+17
| | | | | | This completes the fixes for Radar 8673120. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119566 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ARMGlobalMerge pass to check if globals are entirely within range.Bob Wilson2010-11-172-2/+11
| | | | | | | It is generally not sufficient to check if the starting offset is in range of the maximum offset that can be efficiently used for the target. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119565 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the symbol for merged globals from "merged" to "_MergedGlobals".Bob Wilson2010-11-172-2/+2
| | | | | | | This makes it more clear that the symbol is an internal, compiler-generated name and gives a little more description about its contents. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119564 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the ARMGlobalMerge pass to look at variable sizes instead of pointer sizes.Bob Wilson2010-11-172-1/+12
| | | | | | | It was mistakenly looking at the pointer type when checking for the size of global variables. This is a partial fix for Radar 8673120. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119563 91177308-0d34-0410-b5e6-96231b3b80d8
* Move SCEV::isLoopInvariant and hasComputableLoopEvolution to be memberDan Gohman2010-11-177-154/+163
| | | | | | | | functions of ScalarEvolution, in preparation for memoization and other optimizations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119562 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the ARM BR_JTadd instruction an explicit pseudo and lower it properlyJim Grosbach2010-11-172-12/+25
| | | | | | in the MC lowering process. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119559 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid isel movcc of large immediates when the large immediate is available ↵Evan Cheng2010-11-171-10/+14
| | | | | | in a register. These immediates aren't free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119558 91177308-0d34-0410-b5e6-96231b3b80d8
* Reference ScalarEvolution by name rather than directly in LICM,Dan Gohman2010-11-171-2/+1
| | | | | | | to avoid an unneeded dependence. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119557 91177308-0d34-0410-b5e6-96231b3b80d8
* Before replacing a phi node with a different value, itDuncan Sands2010-11-171-11/+15
| | | | | | | | | | | needs to be checked that this won't break LCSSA form. Change the existing checking method to a more direct one: rather than seeing if all predecessors belong to the loop, check that the replacing value is either not in any loop or is in a loop that contains the phi node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119556 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r119551, which broke buildbots.Owen Anderson2010-11-172-40/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119555 91177308-0d34-0410-b5e6-96231b3b80d8
* Verify SCEVAddRecExpr's invariant in ScalarEvolution::getAddRecExprDan Gohman2010-11-172-5/+4
| | | | | | | | instead of in SCEVAddRecExpr's constructor, in preparation for an upcoming change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119554 91177308-0d34-0410-b5e6-96231b3b80d8
* Provide Thumb2 encodings for bitfield instructions.Owen Anderson2010-11-172-13/+40
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119551 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ScalarEvolution's range memoization to avoid using aDan Gohman2010-11-173-47/+63
| | | | | | | default ctor with ConstantRange. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119550 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove ARM isel hacks that fold large immediates into a pair of add, sub, and,Evan Cheng2010-11-1718-55/+269
| | | | | | | | | | | | | | | | | | | | | | and xor. The 32-bit move immediates can be hoisted out of loops by machine LICM but the isel hacks were preventing them. Instead, let peephole optimization pass recognize registers that are defined by immediates and the ARM target hook will fold the immediates in. Other changes include 1) do not fold and / xor into cmp to isel TST / TEQ instructions if there are multiple uses. This happens when the 'and' is live out, machine sink would have sinked the computation and that ends up pessimizing code. The peephole pass would recognize situations where the 'and' can be toggled to define CPSR and eliminate the comparison anyway. 2) Move peephole pass to after machine LICM, sink, and CSE to avoid blocking important optimizations. rdar://8663787, rdar://8241368 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119548 91177308-0d34-0410-b5e6-96231b3b80d8
* make isVirtualSection a virtual method on MCSection. Chris' suggestion.Rafael Espindola2010-11-1714-52/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119547 91177308-0d34-0410-b5e6-96231b3b80d8
* More miscellaneous Thumb2 encodings.Owen Anderson2010-11-172-14/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119546 91177308-0d34-0410-b5e6-96231b3b80d8
* add some justification for "using namespace llvm;"Chris Lattner2010-11-171-5/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119544 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Jim Grosbach2010-11-171-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119542 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing opcodes now that this function's used in more than one place.Bill Wendling2010-11-171-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119539 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Add a missing irem identity (X % X -> 0).Benjamin Kramer2010-11-172-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119538 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some those Xor simplifications which don't require creating newDuncan Sands2010-11-174-62/+100
| | | | | | | | | instructions out of InstCombine and into InstructionSimplify. While there, introduce an m_AllOnes pattern to simplify matching with integers and vectors with all bits equal to one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119536 91177308-0d34-0410-b5e6-96231b3b80d8
* More ARM encoding bits. LDRH now encodes properly.Jim Grosbach2010-11-172-30/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119529 91177308-0d34-0410-b5e6-96231b3b80d8
* various cleanups and other improvements, patch by Zhanyong Wan!Chris Lattner2010-11-171-48/+47
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119515 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for .int.Rafael Espindola2010-11-172-3/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119512 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for .2byte, .4byte and .8byte.Rafael Espindola2010-11-172-0/+26
| | | | | | Fixes PR8631. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119511 91177308-0d34-0410-b5e6-96231b3b80d8
* MC-JIT: Stub out "pure" streamer.Daniel Dunbar2010-11-173-0/+267
| | | | | | - No immediate use, but maybe someone feels like hacking on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119510 91177308-0d34-0410-b5e6-96231b3b80d8
* MCJIT: Stub out MCJIT implementation, still doesn't do anything useful.Daniel Dunbar2010-11-179-2/+309
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119509 91177308-0d34-0410-b5e6-96231b3b80d8
* lli: Add stub -use-mcjit option, which doesn't currently do anything.Daniel Dunbar2010-11-173-3/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119508 91177308-0d34-0410-b5e6-96231b3b80d8
* Have InlineFunction use SimplifyInstruction rather thanDuncan Sands2010-11-171-9/+11
| | | | | | | | | | hasConstantValue. I was leery of using SimplifyInstruction while the IR was still in a half-baked state, which is the reason for delaying the simplification until the IR is fully cooked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119494 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that hasConstantValue has been made simpler, it may return theDuncan Sands2010-11-172-5/+7
| | | | | | | | phi node itself if it occurs in an unreachable basic block. Protect against this. Hopefully this will fix some more buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119493 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r119109 for now. It's breaking 176.gcc.Evan Cheng2010-11-171-17/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119492 91177308-0d34-0410-b5e6-96231b3b80d8
* Previously SimplifyInstruction could report that an instructionDuncan Sands2010-11-173-19/+32
| | | | | | | | | simplified to itself (this can only happen in unreachable blocks). Change it to return null instead. Hopefully this will fix some buildbot failures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119490 91177308-0d34-0410-b5e6-96231b3b80d8
* With the newly simplified SourceMgr interfaces and the generalizedChris Lattner2010-11-172-6/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SrcMgrDiagHandler, we can improve clang diagnostics for inline asm: instead of reporting them on a source line of the original line, we can report it on the correct line wherever the string literal came from. For something like this: void foo() { asm("push %rax\n" ".code32\n"); } we used to get this: (note that the line in t.c isn't helpful) t.c:4:7: error: warning: ignoring directive for now asm("push %rax\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ now we get: t.c:5:8: error: warning: ignoring directive for now ".code32\n" ^ <inline asm>:2:1: note: instantiated into assembly here .code32 ^ Note that we're pointing to line 5 properly now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119488 91177308-0d34-0410-b5e6-96231b3b80d8
* now that AsmPrinter::EmitInlineAsm is factored right, we can eliminate theChris Lattner2010-11-176-29/+28
| | | | | | | | | cookie argument to the SourceMgr diagnostic stuff. This cleanly separates LLVMContext's inlineasm handler from the sourcemgr error handling definition, increasing type safety and cleaning things up. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119486 91177308-0d34-0410-b5e6-96231b3b80d8
* Add simple arithmetics and %type directive for PTXChe-Liang Chiou2010-11-177-15/+89
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119485 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify code that toggle optional operand to ARM::CPSR.Evan Cheng2010-11-171-3/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119484 91177308-0d34-0410-b5e6-96231b3b80d8
* rearrange how the handler in SourceMgr is installed, eliminating the use of Chris Lattner2010-11-171-8/+35
| | | | | | | the cookie argument to setDiagHandler git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119483 91177308-0d34-0410-b5e6-96231b3b80d8
* refactor the interface to EmitInlineAsm a bit, no functionality change.Chris Lattner2010-11-173-12/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119482 91177308-0d34-0410-b5e6-96231b3b80d8
* fix PR8613 - Copy constructor of SwitchInst does not call SwitchInst::initChris Lattner2010-11-172-9/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119463 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upChris Lattner2010-11-172-26/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119462 91177308-0d34-0410-b5e6-96231b3b80d8
* The machine instruction no longer encodes the submode as a separate operand. WeBill Wendling2010-11-173-6/+14
| | | | | | | should get the submode from the load/store multiple instruction's opcode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119461 91177308-0d34-0410-b5e6-96231b3b80d8
* Proper encoding for VLDM and VSTM instructions. The register lists for theseBill Wendling2010-11-175-11/+71
| | | | | | | | | | instructions have to distinguish between lists of single- and double-precision registers in order for the ASM matcher to do a proper job. In all other respects, a list of single- or double-precision registers are the same as a list of GPR registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119460 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a layering violation: hasConstantValue, which is part of the PHINodeDuncan Sands2010-11-174-69/+47
| | | | | | | | | | | | | | | class, uses DominatorTree which is an analysis. This change moves all of the tricky hasConstantValue logic to SimplifyInstruction, and replaces it with a very simple literal implementation. I already taught users of hasConstantValue that need tricky stuff to use SimplifyInstruction instead. I didn't update InlineFunction because the IR looks like it might be in a funky state at the point it calls hasConstantValue, which makes calling SimplifyInstruction dangerous since it can in theory do a lot of tricky reasoning. This may be a pessimization, for example in the case where all phi node operands are either undef or a fixed constant. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119459 91177308-0d34-0410-b5e6-96231b3b80d8
* Have ScalarEvolution use SimplifyInstruction rather than hasConstantValue.Duncan Sands2010-11-171-1/+5
| | | | | | | While there, add a note about an inefficiency I noticed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119458 91177308-0d34-0410-b5e6-96231b3b80d8
* Have RemovePredecessorAndSimplify you SimplifyInstructionDuncan Sands2010-11-171-4/+4
| | | | | | | rather than hasConstantValue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119457 91177308-0d34-0410-b5e6-96231b3b80d8