aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Re-commit r124462 with fixes. Tail recursion elim will now dup ret into ↵Evan Cheng2011-01-294-44/+147
| | | | | | unconditional predecessor to enable TCE on demand. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124518 91177308-0d34-0410-b5e6-96231b3b80d8
* Implementation of path profiling.Andrew Trick2011-01-2912-20/+2624
| | | | | | | | | | | Modified patch by Adam Preuss. This builds on the existing framework for block tracing, edge profiling and optimal edge profiling. See -help-hidden for new flags. For documentation, see the technical report "Implementation of Path Profiling..." in llvm.org/pubs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124515 91177308-0d34-0410-b5e6-96231b3b80d8
* Error on .code16 instead of producing wrong (32bit) code.Roman Divacky2011-01-281-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124498 91177308-0d34-0410-b5e6-96231b3b80d8
* This dyn_cast should be a cast. Pointed out by Frits van Bommel.Duncan Sands2011-01-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124497 91177308-0d34-0410-b5e6-96231b3b80d8
* Thread divisions over selects and phis. This doesn't fire much and has ↵Duncan Sands2011-01-281-9/+19
| | | | | | | | | basically zero effect on the testsuite (it improves two Ada testcases). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124496 91177308-0d34-0410-b5e6-96231b3b80d8
* PR9030: Fix disassembly of ARM "mov pc, lr" instruction.Bob Wilson2011-01-281-2/+2
| | | | | | Patch by Jyun-Yan You. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124492 91177308-0d34-0410-b5e6-96231b3b80d8
* My auto-simplifier noticed that ((X/Y)*Y)/Y occurs several times in SPECDuncan Sands2011-01-282-56/+131
| | | | | | | | | | | | | | | | | | benchmarks, and that it can be simplified to X/Y. (In general you can only simplify (Z*Y)/Y to Z if the multiplication did not overflow; if Z has the form "X/Y" then this is the case). This patch implements that transform and moves some Div logic out of instcombine and into InstructionSimplify. Unfortunately instcombine gets in the way somewhat, since it likes to change (X/Y)*Y into X-(X rem Y), so I had to teach instcombine about this too. Finally, thanks to the NSW/NUW flags, sometimes we know directly that "Z*Y" does not overflow, because the flag says so, so I added that logic too. This eliminates a bunch of divisions and subtractions in 447.dealII, and has good effects on some other benchmarks too. It seems to have quite an effect on tramp3d-v4 but it's hard to say if it's good or bad because inlining decisions changed, resulting in massive changes all over. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124487 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix libffi usage when it is on a custom path.Oscar Fuentes2011-01-281-9/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124486 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for parsing .floatRoman Divacky2011-01-281-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124485 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename functions to follow coding standard. Also rejiggers comments. NoNick Lewycky2011-01-281-89/+88
| | | | | | | functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124482 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a doxygen comment for this class.Nick Lewycky2011-01-281-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124480 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder for readability. (Chris, is this what you meant?)Nick Lewycky2011-01-281-148/+150
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124479 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r124462. There are a few big regressions that I need to fix first.Evan Cheng2011-01-282-13/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124478 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce the number of functions we look at in the first pass, and preallocateNick Lewycky2011-01-281-1/+3
| | | | | | | the function equality set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124475 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix build with stdcxx by using llvm::next. Patch by Joerg Sonnenberger!Nick Lewycky2011-01-281-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124472 91177308-0d34-0410-b5e6-96231b3b80d8
* Fold select + select where both selects are on the same condition.Nick Lewycky2011-01-281-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124469 91177308-0d34-0410-b5e6-96231b3b80d8
* Print the visibility of declarations.Rafael Espindola2011-01-281-1/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124468 91177308-0d34-0410-b5e6-96231b3b80d8
* PR8951: Support for .equiv in integrated assembler, patch by Jörg Sonnenberger!Nico Weber2011-01-281-8/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124467 91177308-0d34-0410-b5e6-96231b3b80d8
* - Stop simplifycfg from duplicating "ret" instructions into unconditionalEvan Cheng2011-01-282-5/+13
| | | | | | | | | branches. PR8575, rdar://5134905, rdar://8911460. - Allow codegen tail duplication to dup small return blocks after register allocation is done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124462 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PLD encoding.Evan Cheng2011-01-271-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124458 91177308-0d34-0410-b5e6-96231b3b80d8
* Changed llvm-mc arm target to give an error if .syntax divided is used. SinceKevin Enderby2011-01-271-1/+1
| | | | | | | only .syntax unified is supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124454 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the paths to libffi's header and library even when no customOscar Fuentes2011-01-271-6/+10
| | | | | | location was stated with FFI_INCLUDE_DIR/FFI_LIBRARY_DIR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124449 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX] Clean up the code to configure target lowering for AVX. SpecifyDavid Greene2011-01-271-73/+47
| | | | | | | | how to lower more/new operations. This is a prerequisite for adding additional AVX lowering. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124447 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a temporary workaround for a lencod miscompile. Depends on the fix in ↵Andrew Trick2011-01-271-2/+0
| | | | | | r124442. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124443 91177308-0d34-0410-b5e6-96231b3b80d8
* VirtRegRewriter fix: update kill flags, which are used by the scavenger.Andrew Trick2011-01-271-64/+88
| | | | | | | | | | | | | | | | | | | | | | | | rdar://problem/8893967: JM/lencod miscompile at -arch armv7 -mthumb -O3 Added ResurrectKill to remove kill flags after we decide to reused a physical register. And (hopefully) ensure that we call it in all the right places. Sorry, I'm not checking in a unit test given that it's a miscompile I can't reproduce easily with a toy example. Failures in the rewriter depend on a series of heuristic decisions maked during one of the many upstream phases in codegen. This case would require coercing regalloc to generate a couple of rematerialzations in a way that causes the scavenger to reuse the same register at just the wrong point. The general way to test this is to implement kill flags verification. Then we could have a simple, robust compile-only unit test. That would be worth doing if the whole pass was not about to disappear. At this point we focus verification work on the next generation of regalloc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124442 91177308-0d34-0410-b5e6-96231b3b80d8
* Unbreak the build.Benjamin Kramer2011-01-271-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124426 91177308-0d34-0410-b5e6-96231b3b80d8
* Expound upon this comparison!Nick Lewycky2011-01-271-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124406 91177308-0d34-0410-b5e6-96231b3b80d8
* Use dyn_cast instead of isa+cast.Nick Lewycky2011-01-271-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124404 91177308-0d34-0410-b5e6-96231b3b80d8
* Speculatively revert r124380.Devang Patel2011-01-272-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124397 91177308-0d34-0410-b5e6-96231b3b80d8
* While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal ↵Devang Patel2011-01-272-1/+4
| | | | | | | | | nodes. Take 2. This includes fix for dragonegg crash. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124380 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for specifying register name in cfi-register/offset/defRoman Divacky2011-01-271-3/+23
| | | | | | | | as well as register number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124379 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce virtual ParseRegister method in TargetAsmParser.Roman Divacky2011-01-273-6/+19
| | | | | | | | Create override of this method in X86/ARM/MBlaze. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124378 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix indentation.Jay Foad2011-01-271-9/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124375 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix surprising missed optimization in mergefunc where we forgot to considerNick Lewycky2011-01-271-3/+12
| | | | | | | that relationships like "i8* null" is equivalent to "i32* null". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124368 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid modifying the OneClassForEachPhysReg map while iterating over it.Bob Wilson2011-01-271-2/+6
| | | | | | | | | Linear scan regalloc is currently assuming that any register aliased with a member of a regclass must also be in at least one regclass. That is not always true. For example, for X86, RIP is in a regclass but IP is not. If you're unlucky, this can cause a crash by invalidating the iterator. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124365 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the incoming VT not the VT of where we're trying to store to determineEric Christopher2011-01-271-2/+2
| | | | | | | | | if we can store a value. Also, the exclusion is or, not and. Fixes rdar://8920247. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124357 91177308-0d34-0410-b5e6-96231b3b80d8
* lib/Target/X86/X86ISelDAGToDAG.cpp: __main should be WINCALL64 on Win64.NAKAMURA Takumi2011-01-271-1/+1
| | | | | | CALL64 marks %xmm* as dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124354 91177308-0d34-0410-b5e6-96231b3b80d8
* Try harder to not have unused variables.Matt Beaumont-Gay2011-01-271-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124350 91177308-0d34-0410-b5e6-96231b3b80d8
* Opt-mode -Wunused-variable cleanupMatt Beaumont-Gay2011-01-271-4/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124346 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 124301Devang Patel2011-01-271-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124339 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize variable to get rid of clang warning.Bill Wendling2011-01-261-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124331 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify User::operator delete().Jay Foad2011-01-261-10/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124330 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 124301.Devang Patel2011-01-261-5/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124327 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r124302Devang Patel2011-01-261-3/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124320 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for printing out floating point values from the ARM assemblyBill Wendling2011-01-261-2/+27
| | | | | | | | parser. The parser will always give us a binary representation of the floating point number. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124318 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert 124275 to see if it brings the dragonegg buildbot back.Eric Christopher2011-01-261-85/+82
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124312 91177308-0d34-0410-b5e6-96231b3b80d8
* [AVX] Add INSERT_SUBVECTOR and support it on x86. This provides aDavid Greene2011-01-264-1/+96
| | | | | | | | | default implementation for x86, going through the stack in a similr fashion to how the codegen implements BUILD_VECTOR. Eventually this will get matched to VINSERTF128 if AVX is available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124307 91177308-0d34-0410-b5e6-96231b3b80d8
* While legalizing SDValues do not drop SDDbgValues, trasfer them to new legal ↵Devang Patel2011-01-261-0/+3
| | | | | | nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124302 91177308-0d34-0410-b5e6-96231b3b80d8
* Process valid SDDbgValues even if the node does not have any order assigned.Devang Patel2011-01-261-1/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124301 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor.Devang Patel2011-01-261-19/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124300 91177308-0d34-0410-b5e6-96231b3b80d8