aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* ARM: 'add Rd, pc, #imm' is an alias for 'adr Rd, #imm'.Jim Grosbach2012-09-251-0/+14
| | | | | | rdar://9795790 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164577 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused name of variable to quiet a warning. Also canonicalize aNick Lewycky2012-09-241-3/+3
| | | | | | | | declaration to use the same form as in the rest of the file. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164576 91177308-0d34-0410-b5e6-96231b3b80d8
* Mark jump tables in code sections with DataRegion directives.Jim Grosbach2012-09-242-0/+12
| | | | | | | | | Even out-of-line jump tables can be in the code section, so mark them as data-regions for those targets which support the directives. rdar://12362871&12362974 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164571 91177308-0d34-0410-b5e6-96231b3b80d8
* Rather then have a wrapper function, have tblgen instantiate the implementation.Chad Rosier2012-09-244-37/+0
| | | | | | Also remove an unused argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164567 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach DSE that strcpy, strncpy, strcat and strncat are all stores which may beNick Lewycky2012-09-241-32/+71
| | | | | | | dead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164561 91177308-0d34-0410-b5e6-96231b3b80d8
* Move all the calls to AA.getTargetLibraryInfo() to using a TLI member variable.Nick Lewycky2012-09-241-12/+11
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164560 91177308-0d34-0410-b5e6-96231b3b80d8
* Specify MachinePointerInfo as refering to the argument value and offset of theRoman Divacky2012-09-241-3/+5
| | | | | | | | store when handling byval arguments. Thus preventing reordering of the store with load with post-RA scheduler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164553 91177308-0d34-0410-b5e6-96231b3b80d8
* Rather then have a wrapper function, have tblgen instantiate the implementation.Chad Rosier2012-09-244-16/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164548 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing check for presence of target data.Richard Osborne2012-09-241-20/+22
| | | | | | This avoids a crash in visitAllocaInst when target data isn't available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164539 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable the new SROA pass by default.Chandler Carruth2012-09-241-1/+1
| | | | | | Queue the fallout. ;] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164480 91177308-0d34-0410-b5e6-96231b3b80d8
* Address one of the original FIXMEs for the new SROA pass by implementingChandler Carruth2012-09-241-1/+118
| | | | | | | | | | | | | | | | integer promotion analogous to vector promotion. When there is an integer alloca being accessed both as its integer type and as a narrower integer type, promote the narrower access to "insert" and "extract" the smaller integer from the larger one, and make the integer alloca a candidate for promotion. In the new formulation, we don't care about target legal integer or use thresholds to control things. Instead, we only perform this promotion to an integer type which the frontend has already emitted a load or store for. This bounds the scope and prevents optimization passes from coalescing larger and larger entities into a single integer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164479 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit dtors into proper section while compiling in vcpp-compatible mode.Anton Korobeynikov2012-09-231-6/+14
| | | | | | | Patch by Kai! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164476 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch to a signed representation for the dynamic offsets while walkingChandler Carruth2012-09-231-26/+75
| | | | | | | | | | | | | | | | | | | across the uses of the alloca. It's entirely possible for negative numbers to come up here, and in some rare cases simply doing the 2's complement arithmetic isn't the correct decision. Notably, we can't zext the index of the GEP. The definition of GEP is that these offsets are sign extended or truncated to the size of the pointer, and then wrapping 2's complement arithmetic used. This patch fixes an issue that comes up with *no* input from the buildbots or bootstrap afaict. The only place where it manifested, disturbingly, is Clang's own regression test suite. A reduced and targeted collection of tests are added to cope with this. Note that I've tried to pin down the potential cases of overflow, but may have missed some cases. I've tried to add a few cases to test this, but its hard because LLVM has quite limited support for >64bit constructs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164475 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't do actual work inside an assert statement. Fixes PR11760!Nick Lewycky2012-09-231-4/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164474 91177308-0d34-0410-b5e6-96231b3b80d8
* Add LLVM_OVERRIDE to methods that override their base classes.Craig Topper2012-09-236-21/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164471 91177308-0d34-0410-b5e6-96231b3b80d8
* ARMInstPrinter.cpp: Fix a warning in -Asserts. [-Wunused-variable]NAKAMURA Takumi2012-09-221-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164459 91177308-0d34-0410-b5e6-96231b3b80d8
* Whitespace.NAKAMURA Takumi2012-09-221-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164458 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix edge cases of ARM shift operands in arith instructions.Tim Northover2012-09-221-38/+6
| | | | | | | | | As before with load instructions, oddities like "asr #32", "rrx" could be printed incorrectly. Patch by Chris Lidbury. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164456 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the handling of edge cases in ARM shifted operands.Tim Northover2012-09-224-8/+35
| | | | | | | | | This patch fixes load/store instructions to handle less common cases like "asr #32", "rrx" properly throughout the MC layer. Patch by Chris Lidbury. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164455 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 16-bit atomic inst encoding and keep pseudo-inst starting with '#'Michael Liao2012-09-221-14/+14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164453 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in r164357Michael Liao2012-09-221-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164452 91177308-0d34-0410-b5e6-96231b3b80d8
* MIPS DSP: Add immediate leaves.Akira Hatanaka2012-09-221-0/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164435 91177308-0d34-0410-b5e6-96231b3b80d8
* MIPS DSP: Add predicates and instruction template.Akira Hatanaka2012-09-221-0/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164434 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MIPS DSP register classes. Set actions of DSP vector operations and overrideAkira Hatanaka2012-09-212-0/+49
| | | | | | | TargetLowering's callback functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164431 91177308-0d34-0410-b5e6-96231b3b80d8
* SelectionDAG node enums for MIPS DSP nodes.Akira Hatanaka2012-09-212-0/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164430 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MIPS accumulator and DSP control registers.Akira Hatanaka2012-09-212-1/+45
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164429 91177308-0d34-0410-b5e6-96231b3b80d8
* Add flags and feature bits for mips dsp.Akira Hatanaka2012-09-212-0/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164428 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a case where the new SROA pass failed to zap dead operands toChandler Carruth2012-09-211-0/+4
| | | | | | | | | | | selects with a constant condition. This resulted in the operands remaining live through the SROA rewriter. Most of the time, this just caused some dead allocas to persist and get zapped by later passes, but in one case found by Joerg, it caused a crash when we tried to *promote* the alloca despite it having this dead use. We already have the mechanisms in place to handle this, just wire select up to them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164427 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an --enable-backtraces option to configure to determineEric Christopher2012-09-211-1/+1
| | | | | | | | | whether or not we want to print out backtrace information. Useful for libraries that don't need backtrace information on a crash. rdar://11844710 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164426 91177308-0d34-0410-b5e6-96231b3b80d8
* [ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.Chad Rosier2012-09-214-0/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164420 91177308-0d34-0410-b5e6-96231b3b80d8
* Have the DbgVariable "isArtificial" and "isObjectPointer" notEric Christopher2012-09-212-5/+5
| | | | | | | | | | | | care about it being an argument variable so that we can decide that captured block and lambda vars that don't happen to be arguments could be an argument pointer. Add the object pointer for one case onto the subprogram die. rdar://12001329 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164419 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Chad Rosier2012-09-211-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164415 91177308-0d34-0410-b5e6-96231b3b80d8
* Add comment.Chad Rosier2012-09-211-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164414 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a significant recent(?) regression. StackSlotColoring no longer did anythingEvan Cheng2012-09-214-3/+10
| | | | | | | | | | because LiveStackAnalysis was not preserved by VirtRegWriter. This caused big stack usage regression in some cases. rdar://12340383 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164408 91177308-0d34-0410-b5e6-96231b3b80d8
* LoopIdiom: Give up when the loop is not in canonical form.Benjamin Kramer2012-09-211-0/+5
| | | | | | | | | We rely on it when doing the transforms. This can happen when there is an indirectbr in the loop. Fixes PR13892. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164383 91177308-0d34-0410-b5e6-96231b3b80d8
* [fast-isel] Fallback to SelectionDAG isel if we require strict alignment forChad Rosier2012-09-211-0/+6
| | | | | | | non-aligned i32 loads/stores. rdar://12304911 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164381 91177308-0d34-0410-b5e6-96231b3b80d8
* InstCombine: Make sure we use the pre-zext type when creating a constant of ↵Benjamin Kramer2012-09-211-1/+2
| | | | | | | | a value that is zext'd. Fixes PR13250. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164377 91177308-0d34-0410-b5e6-96231b3b80d8
* Encapsulate the "construct*AlignmentFromInt" functions.Bill Wendling2012-09-212-4/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164373 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo in r164357Michael Liao2012-09-211-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164372 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the 'get*AlignmentFromAttr' functions into member functions within the ↵Bill Wendling2012-09-214-11/+12
| | | | | | Attributes class. Now with fix. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164370 91177308-0d34-0410-b5e6-96231b3b80d8
* BitcodeReader: Correctly insert blockaddress constant referring to a already ↵Benjamin Kramer2012-09-211-6/+22
| | | | | | | | | | | | parsed function. We inserted a placeholder that was never replaced because the function was already visited. Assert that all placeholders have been resolved when tearing down the bitcode reader. Fixes PR13895. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164369 91177308-0d34-0410-b5e6-96231b3b80d8
* Cortex-A9 latency fixes (w/ -schedmodel only).Andrew Trick2012-09-211-5/+5
| | | | | | Quick review against the manual revealed a few obvious mistakes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164361 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing i8 max/min/umax/umin supportMichael Liao2012-09-211-9/+44
| | | | | | | | - Fix PR5145 and turn on test 8-bit atomic ops git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164358 91177308-0d34-0410-b5e6-96231b3b80d8
* Revise td of X86 atomic instructionsMichael Liao2012-09-213-218/+209
| | | | | | | | | - Rewirte most atomic instructions in templates for both better maintenance and future extensions, such as HLE in TSX. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164357 91177308-0d34-0410-b5e6-96231b3b80d8
* Mips16FrameLowering.cpp: Remove unused TII introduced in r164349. ↵NAKAMURA Takumi2012-09-211-1/+0
| | | | | | [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164354 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly save and restore RA and Mips16 callee save registers S0,S1Akira Hatanaka2012-09-213-6/+52
| | | | | | | Patch by Reed Kotler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164349 91177308-0d34-0410-b5e6-96231b3b80d8
* [fast-isel] Fallback to SelectionDAG isel if we require strict alignment forChad Rosier2012-09-211-0/+6
| | | | | | | non-halfword-aligned i16 loads/stores. rdar://12304911 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164345 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Whitespace.Jim Grosbach2012-09-211-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164344 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Formatting.Jim Grosbach2012-09-211-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164343 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: Use a dedicated intrinsic for vector bitwise select.Jim Grosbach2012-09-211-2/+29
| | | | | | | | | | | The expression based expansion too often results in IR level optimizations splitting the intermediate values into separate basic blocks, preventing the formation of the VBSL instruction as the code author intended. In particular, LICM would often hoist part of the computation out of a loop. rdar://11011471 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164340 91177308-0d34-0410-b5e6-96231b3b80d8