summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [ms-inline asm] Don't rewrite out parts of an inline-asm skipped by .if 0 ↵Eli Friedman2012-10-221-24/+1
| | | | | | | | and friends. It's unnecessary and makes the generated assembly less faithful to the original source. llvm-svn: 166440
* [ms-inline asm] Add the isOffsetOf() function.Chad Rosier2012-10-221-0/+5
| | | | | | Part of rdar://12470317 llvm-svn: 166436
* Iterating over a DenseMap<std::pair<BasicBlock*, unsigned>, PHINode*> is notJulien Lerouge2012-10-221-4/+4
| | | | | | | | | deterministic, replace it with a DenseMap<std::pair<unsigned, unsigned>, PHINode*> (we already have a map from BasicBlock to unsigned). <rdar://problem/12541389> llvm-svn: 166435
* [ms-inline asm] Add support for parsing the offset operator. Callback for Chad Rosier2012-10-221-5/+21
| | | | | | | CodeGen in the front-end not implemented yet. rdar://12470317 llvm-svn: 166433
* Don't crash if the load/store pointer is not a GEP.Nadav Rotem2012-10-221-1/+1
| | | | | | Fix by Shivarama Rao <Shivarama.Rao@amd.com> llvm-svn: 166427
* Revert r166407 because it caused analyzer tests to crash and broke self-host ↵Argyrios Kyrtzidis2012-10-221-67/+56
| | | | | | bots. llvm-svn: 166424
* BBVectorize should ignore unreachable blocks.Hal Finkel2012-10-221-0/+13
| | | | | | | | | Unreachable blocks can have invalid instructions. For example, jump threading can produce self-referential instructions in unreachable blocks. Also, we should not be spending time optimizing unreachable code. Fixes PR14133. llvm-svn: 166423
* Add the "ForceSizeOpt" attribute.Nadav Rotem2012-10-224-2/+9
| | | | | | | | | | | | Patch by Quentin Colombet <qcolombet@apple.com> Original description: """ The attached patch is the first step to have a better control on Oz related optimizations. The Oz optimization level focuses on code size, thus I propose to add an attribute called ForceSizeOpt. """ llvm-svn: 166422
* Rename a variable.Nadav Rotem2012-10-221-13/+13
| | | | llvm-svn: 166410
* Vectorizer: optimize the generation of selects. If the condition is uniform, ↵Nadav Rotem2012-10-221-6/+16
| | | | | | generate a scalar-cond select (i1 as selector). llvm-svn: 166409
* Update the loop vectorizer docs.Nadav Rotem2012-10-221-17/+38
| | | | llvm-svn: 166408
* Reapply r166405, teaching tailcallelim to be smarter about nocapture, with aNick Lewycky2012-10-221-56/+67
| | | | | | | | | | | | | | | very small but very important bugfix: bool shouldExplore(Use *U) { Value *V = U->get(); if (isa<CallInst>(V) || isa<InvokeInst>(V)) [...] should have read: bool shouldExplore(Use *U) { Value *V = U->getUser(); if (isa<CallInst>(V) || isa<InvokeInst>(V)) Fixes PR14143! llvm-svn: 166407
* Revert r166405, "Teach TailRecursionElimination to consider 'nocapture' when ↵NAKAMURA Takumi2012-10-221-67/+56
| | | | | | | | deciding whether" It broke selfhosting stage2 in several builders. llvm-svn: 166406
* Teach TailRecursionElimination to consider 'nocapture' when deciding whetherNick Lewycky2012-10-211-56/+67
| | | | | | calls can be marked tail. llvm-svn: 166405
* DataLayout should use itself when calculating the size of a vector.Hal Finkel2012-10-211-2/+4
| | | | | | | | This is important for vectors of pointers because only DataLayout, not the underlying vector type, knows how to calculate the size of the pointers in the vector. Fixes PR14138. llvm-svn: 166401
* Revert r166390 "LoopIdiom: Replace custom dependence analysis with ↵Benjamin Kramer2012-10-211-26/+74
| | | | | | | | | | | | | LoopDependenceAnalysis." It passes all tests, produces better results than the old code but uses the wrong pass, LoopDependenceAnalysis, which is old and unmaintained. "Why is it still in tree?", you might ask. The answer is obviously: "To confuse developers." Just swapping in the new dependency pass sends the pass manager into an infinte loop, I'll try to figure out why tomorrow. llvm-svn: 166399
* Don't crash when the Assignments vector is empty.Jakob Stoklund Olesen2012-10-211-1/+1
| | | | | | Reported by Vincent Lejeune using an out-of-tree target. llvm-svn: 166398
* Avoid an extra hash lookup when inserting a value into the widen map.Anders Carlsson2012-10-211-4/+4
| | | | llvm-svn: 166395
* Simplify code. No functionality change.Jakub Staszak2012-10-211-1/+1
| | | | llvm-svn: 166393
* Simplify code. No functionality change.Jakub Staszak2012-10-211-6/+5
| | | | llvm-svn: 166392
* LoopIdiom: Replace custom dependence analysis with LoopDependenceAnalysis.Benjamin Kramer2012-10-211-74/+26
| | | | | | | | | | Requires a lot less code and complexity on loop-idiom's side and the more precise analysis can catch more cases, like the one I included as a test case. This also fixes the edge-case miscompilation from PR9481. I'm not entirely sure that all cases are handled that the old checks handled but LDA will certainly become smarter in the future. llvm-svn: 166390
* Fix a bug in the vectorization of wide load/store operations.Nadav Rotem2012-10-211-4/+14
| | | | | | | | We used a SCEV to detect that A[X] is consecutive. We assumed that X was the induction variable. But X can be any expression that uses the induction for example: X = i + 2; llvm-svn: 166388
* Add support for reduction variables that do not start at zero.Nadav Rotem2012-10-211-51/+67
| | | | | | | | | | | | This is important for nested-loop reductions such as : In the innermost loop, the induction variable does not start with zero: for (i = 0 .. n) for (j = 0 .. m) sum += ... llvm-svn: 166387
* Document change. Describe the pass and some papers that inspired the design ↵Nadav Rotem2012-10-211-4/+18
| | | | | | of the pass. llvm-svn: 166386
* Vectorizer: fix a bug in the classification of induction/reduction phis.Nadav Rotem2012-10-211-0/+3
| | | | llvm-svn: 166384
* Fix an infinite loop in the loop-vectorizer.Nadav Rotem2012-10-201-0/+6
| | | | | | PR14134. llvm-svn: 166379
* Symbol hygiene: Make sure declarations and definitions match, make helper ↵Benjamin Kramer2012-10-203-3/+5
| | | | | | functions static. llvm-svn: 166376
* SROA: Simplify code. No functionality change.Benjamin Kramer2012-10-201-9/+2
| | | | llvm-svn: 166375
* InstCombine: Fix an edge case where constant icmps could sneak into ↵Benjamin Kramer2012-10-201-0/+4
| | | | | | | | ConstantFoldInstOperands and crash. Have to refactor the ConstantFolder interface one day to define bugs like this away. Fixes PR14131. llvm-svn: 166374
* Vectorize: teach cavVectorizeMemory to distinguish between A[i]+=x and ↵Nadav Rotem2012-10-201-74/+137
| | | | | | | | | A[B[i]]+=x. If the pointer is consecutive then it is safe to read and write. If the pointer is non-loop-consecutive then it is unsafe to vectorize it because we may hit an ordering issue. llvm-svn: 166371
* Fix a typoNadav Rotem2012-10-201-1/+1
| | | | llvm-svn: 166367
* Vectorizer: refactor the memory checks to a new function. No functionality ↵Nadav Rotem2012-10-201-33/+51
| | | | | | change. llvm-svn: 166366
* [ms-inline asm] Rename AsmOpRewrite to just AsmRewrite to be more generic. ↵Chad Rosier2012-10-201-13/+13
| | | | | | No functional change intended. llvm-svn: 166360
* [ms-inline asm] If the state of the parser is ignore, then don't parse theChad Rosier2012-10-201-2/+25
| | | | | | inline assembly. Also make sure the remove the ignored statements from the IR. llvm-svn: 166357
* LoopVectorize: Keep the IRBuilder on the stack.Nadav Rotem2012-10-191-40/+35
| | | | llvm-svn: 166354
* [ms-inline asm] Continue parsing even when we're in an ignore block.Chad Rosier2012-10-191-1/+1
| | | | llvm-svn: 166352
* Vectorizer: Add support for loop reductions.Nadav Rotem2012-10-191-74/+392
| | | | | | | | | For example: for (i=0; i<n; i++) sum += A[i] + B[i] + i; llvm-svn: 166351
* 1. Remove noreturn attribute from __builtin_debugtrap().Shuxin Yang2012-10-191-2/+2
| | | | | | | | (The change at Clang side was committed in r166345) 2. Cosmetic change in order to conform to coding standards. llvm-svn: 166350
* [ms-inline asm] Reset the opcode prior to parsing a statement.Chad Rosier2012-10-192-4/+6
| | | | llvm-svn: 166349
* [mips] Use 64-bit registers to return an sret pointer if target ABI is N64.Akira Hatanaka2012-10-191-2/+4
| | | | llvm-svn: 166344
* [mips] Add code to do tail call optimization.Akira Hatanaka2012-10-192-5/+44
| | | | | | | Currently, it is enabled only if option "enable-mips-tail-calls" is given and all of the callee's arguments are passed in registers. llvm-svn: 166342
* [mips] Fix TAILCALL's operand node type.Akira Hatanaka2012-10-191-5/+11
| | | | llvm-svn: 166341
* revert r166264 because the LTO build is still failingNadav Rotem2012-10-194-96/+86
| | | | llvm-svn: 166340
* [mips] Delete MipsFunctionInfo::MaxCallFrameSize which is no longer used.Akira Hatanaka2012-10-192-10/+1
| | | | llvm-svn: 166339
* [mips] Add tail call instructions.Akira Hatanaka2012-10-192-0/+12
| | | | llvm-svn: 166338
* [mips] Make the branch nodes used in jump instructions a template parameter.Akira Hatanaka2012-10-191-10/+21
| | | | llvm-svn: 166337
* Add node and enum for mips tail call.Akira Hatanaka2012-10-193-0/+8
| | | | llvm-svn: 166318
* [ms-inline asm] Have the TargetParser callback to Sema to determine the size ofChad Rosier2012-10-192-14/+65
| | | | | | | a memory operand. Retain this information and then add the sizing directives to the IR. This allows the backend to do proper instruction selection. llvm-svn: 166316
* SimplifyLibcalls: The return value of ffsll is always i32, even when the ↵Benjamin Kramer2012-10-191-2/+2
| | | | | | | | input is zero. Fixes PR13028. llvm-svn: 166313
* This patch is to fix radar://8426430. It is about llvm support of ↵Shuxin Yang2012-10-194-5/+24
| | | | | | | | | | | | | | | | | | | | | | | __builtin_debugtrap() which is supposed to consistently raise SIGTRAP across all systems. In contrast, __builtin_trap() behave differently on different systems. e.g. it raises SIGTRAP on ARM, and SIGILL on X86. The purpose of __builtin_debugtrap() is to consistently provide "trap" functionality, in the mean time preserve the compatibility with on gcc on __builtin_trap(). The X86 backend is already able to handle debugtrap(). This patch is to: 1) make front-end recognize "__builtin_debugtrap()" (emboddied in the one-line change to Clang). 2) In DAG legalization phase, by default, "debugtrap" will be replaced with "trap", which make the __builtin_debugtrap() "available" to all existing ports without the hassle of changing their code. 3) If trap-function is specified (via -trap-func=xyz to llc), both __builtin_debugtrap() and __builtin_trap() will be expanded into the function call of the specified trap function. This behavior may need change in the future. The provided testing-case is to make sure 2) and 3) are working for ARM port, and we already have a testing case for x86. llvm-svn: 166300
OpenPOWER on IntegriCloud