summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Revert r168635 "Step towards implementation of pass manager with ↵Owen Anderson2012-11-27
| | | | | | | | | doInitialization and doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model". It appears to have broken at least one buildbot. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168654 91177308-0d34-0410-b5e6-96231b3b80d8
* Fast-math optimization: fold multiply by zeroMichael Ilseman2012-11-27
| | | | | | | | Added in first optimization using fast-math flags to serve as an example for following optimizations. SimplifyInstruction will now try to optimize an fmul observing its FastMathFlags to see if it can fold multiply by zero when 'nnan' and 'nsz' flags are set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168648 91177308-0d34-0410-b5e6-96231b3b80d8
* Fast-math flags for the bitcodeMichael Ilseman2012-11-27
| | | | | | | | Added in bitcode enum for the serializing of fast-math flags. Added in the reading/writing of fast-math flags from the OptimizationFlags record for BinaryOps. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168646 91177308-0d34-0410-b5e6-96231b3b80d8
* Fast-math flags for LLVM IR parsing and printingMichael Ilseman2012-11-27
| | | | | | | | Added in the ability to read LLVM IR text that contains fast-math flags as a sequence of capital letters separated by spaces in any order. Added in the printing of the fast-math flags in a canonical order, and don't print the other flags when 'fast' is specified, as 'fast' implies all the others. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168645 91177308-0d34-0410-b5e6-96231b3b80d8
* Make comment names match function names.Eric Christopher2012-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168644 91177308-0d34-0410-b5e6-96231b3b80d8
* Add in sections for the fission case (no change so incorrect) andEric Christopher2012-11-27
| | | | | | add a TODO for starting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168643 91177308-0d34-0410-b5e6-96231b3b80d8
* Fast-math interfaces for InstructionsMichael Ilseman2012-11-27
| | | | | | | | Add in getter/setter methods for Instructions, allowing them to be the interface to FPMathOperator similarly to now NUS/NSW is handled. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168642 91177308-0d34-0410-b5e6-96231b3b80d8
* Reorder section output ordering.Eric Christopher2012-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168638 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace cleanup.Eric Christopher2012-11-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168637 91177308-0d34-0410-b5e6-96231b3b80d8
* Step towards implementation of pass manager with doInitialization and ↵Owen Anderson2012-11-26
| | | | | | | | | doFinalization per module detangled from runOn?? calls, still has temporary code not to break ASAN to be removed when that pass conforms to the proposed model Patch by Pedro Artigas, with feedback from by Chandler Carruth. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168635 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assertion to ensure freezeReservedRegs() is only ever called once.Chad Rosier2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168633 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,Chad Rosier2012-11-26
| | | | | | | | | r168627), we no longer need to call the freezeReservedRegs() function a second time. Previously, this pass was conservatively adding the FP to the set of reserved registers, requiring the second update to the reserved registers. rdar://12719844 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168631 91177308-0d34-0410-b5e6-96231b3b80d8
* Now that the X86 Maximal Stack Alignment Check pass has been removed (i.e.,Chad Rosier2012-11-26
| | | | | | | | | r168627), we no longer need to call the freezeReservedRegs() function a second time. Previously, this pass was conservatively adding the FP to the set of reserved registers, requiring the second update to the reserved registers. rdar://12719844 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168630 91177308-0d34-0410-b5e6-96231b3b80d8
* Get rid of the getPointeeAlignment helper function fromEli Friedman2012-11-26
| | | | | | | | | | InstCombineLoadStoreAlloca.cpp, which had many issues. (At least two bugs were noted on llvm-commits, and it was overly conservative.) Instead, use getOrEnforceKnownAlignment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168629 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the X86 Maximal Stack Alignment Check pass as it is no longer necessary.Chad Rosier2012-11-26
| | | | | | | | | | | | | | | This pass was conservative in that it always reserved the FP to enable dynamic stack realignment, which allowed the RA to use aligned spills for vector registers. This happens even when spills were not necessary. The RA has since been improved to use unaligned spills when necessary. The new behavior is to realign the stack if the frame pointer was already reserved for some other reason, but don't reserve the frame pointer just because a function contains vector virtual registers. Part of rdar://12719844 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168627 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use iterator after being erased.Jakub Staszak2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168622 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comments in HexagonOperands.td.Jyotsna Verma2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168617 91177308-0d34-0410-b5e6-96231b3b80d8
* rdar://12329730 (defect 2)Shuxin Yang2012-11-26
| | | | | | | | | | | | | | | Enhancement to InstCombine. Try to catch this opportunity: --------------------------------------------------------------- ((X^C1) >> C2) ^ C3 => (X>>C2) ^ ((C1>>C2)^C3) where the subexpression "X ^ C1" has more than one uses, and "(X^C1) >> C2" has single use. ---------------------------------------------------------------- Reviewed by Nadav (with minor change per his request). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168615 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unneeded #includes.Jakub Staszak2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168608 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a comment bug in toascii simplifierMeador Inge2012-11-26
| | | | | | | When I migrated the toascii simplifier in r168580 Benjamin Kramer noticed a bug in one of the comments that I migrated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168605 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine: Migrate printf optimizationsMeador Inge2012-11-26
| | | | | | | This patch migrates the printf optimizations from the simplify-libcalls pass into the instcombine library call simplifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168604 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the code that uses SCEVs prior to creating the new loops. Nadav Rotem2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168601 91177308-0d34-0410-b5e6-96231b3b80d8
* Normalize splat 256bit vectors with 8 elements.Jakub Staszak2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168600 91177308-0d34-0410-b5e6-96231b3b80d8
* Decouple MCInstBuilder from the streamer per Eli's request.Benjamin Kramer2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168597 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove stray trailing backslashMatt Beaumont-Gay2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168592 91177308-0d34-0410-b5e6-96231b3b80d8
* tsan: fix lint warningsDmitry Vyukov2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168590 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MCInstBuilder, a utility class to simplify MCInst creation similar to ↵Benjamin Kramer2012-11-26
| | | | | | | | MachineInstrBuilder. Simplify some repetitive code with it. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168587 91177308-0d34-0410-b5e6-96231b3b80d8
* [tsan] add fail order to compare_exchangeDmitry Vyukov2012-11-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168586 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a PassManager pointer use-after-free bug.Zhou Sheng2012-11-26
| | | | | | | The bug can be triggered when we require LoopInfo analysis ahead of DominatorTree construction in a Module Pass. The cause is that the LoopInfo analysis itself also invokes DominatorTree construction, therefore, when PassManager schedules LoopInfo, it will add DominatorTree first. Then after that, when the PassManger turns to schedule DominatorTree invoked by the above ModulePass, it finds there is already a DominatorTree, so it delete the redundant one. However, somehow it still try to access that pass pointer after free as code pasted below, which results in segment fault. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168581 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine: Migrate toascii optimizationsMeador Inge2012-11-26
| | | | | | | This patch migrates the toascii optimizations from the simplify-libcalls pass into the instcombine library call simplifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168580 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine: Migrate isascii optimizationsMeador Inge2012-11-26
| | | | | | | This patch migrates the isascii optimizations from the simplify-libcalls pass into the instcombine library call simplifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168579 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine: Migrate isdigit optimizationsMeador Inge2012-11-26
| | | | | | | This patch migrates the isdigit optimizations from the simplify-libcalls pass into the instcombine library call simplifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168578 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine: Migrate *abs optimizationsMeador Inge2012-11-26
| | | | | | | This patch migrates the *abs optimizations from the simplify-libcalls pass into the instcombine library call simplifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168574 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine: Migrate ffs* optimizationsMeador Inge2012-11-25
| | | | | | | This patch migrates the ffs* optimizations from the simplify-libcalls pass into the instcombine library call simplifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168571 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the max vector width to a constant parameter. No functionality change.Nadav Rotem2012-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168570 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the document style.Nadav Rotem2012-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168569 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the ptr runtime check generation code. No functionality change.Nadav Rotem2012-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168568 91177308-0d34-0410-b5e6-96231b3b80d8
* Code Custodian:Joe Abbey2012-11-25
| | | | | | | | | | - Widespread trailing space removal - A dash of OCD spacing to block align enums - joined a line that probably needed 80 cols a while back git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168566 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for .cfi_register now that it is easy to extent the representationRafael Espindola2012-11-25
| | | | | | | to support it. Original patch with the parsing and plumbing by the PaX team and Roman Divacky. I added the bits in MCDwarf.cpp and the test. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168565 91177308-0d34-0410-b5e6-96231b3b80d8
* Move semantics are great, don't destroy the optimization opportunity with ↵Benjamin Kramer2012-11-25
| | | | | | | | trivial copy ctors. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168561 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename method. No functionality change.Nadav Rotem2012-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168560 91177308-0d34-0410-b5e6-96231b3b80d8
* The induction-pointer work is inspired by a research paper. This commit adds ↵Nadav Rotem2012-11-25
| | | | | | a reference. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168559 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for pointer induction variables even when there is no integer ↵Nadav Rotem2012-11-25
| | | | | | induction variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168558 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor to make helper method static.Craig Topper2012-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168557 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove duplicate check of LimitFloatPrecision. It was already checked ↵Craig Topper2012-11-25
| | | | | | earlier before IsExp10 could be set to true. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168553 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor common code out of individual if blocks into common tail.Craig Topper2012-11-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168551 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove redundant calls to getCurDebugLoc in visitIntrinsicCall. It's already ↵Craig Topper2012-11-24
| | | | | | called at the start of the function and captured in a local variable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168548 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor a bit to make some helper methods static.Craig Topper2012-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168546 91177308-0d34-0410-b5e6-96231b3b80d8
* libLTO: Add a utility method to initialize the disassemblers.Benjamin Kramer2012-11-24
| | | | | | | | | | | | Necessary to give disassembler users (like darwin's otool) a possibility to dlopen libLTO and still initialize the required LLVM bits. This used to go through libMCDisassembler but that's a gross layering violation, the MC layer can't pull in functions from the targets. Adding a function to libLTO is a bit of a hack but not worse than exposing other disassembler bits from libLTO. Fixes PR14362. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168545 91177308-0d34-0410-b5e6-96231b3b80d8
* PPC: Reinstate the fatal error when trying to emit a macho file.Benjamin Kramer2012-11-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168543 91177308-0d34-0410-b5e6-96231b3b80d8