aboutsummaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* Support/Windows: Cleanup scoped handles.Michael J. Spencer2011-12-124-59/+80
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146362 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach the verifier to reject all non-constant arguments to the secondChandler Carruth2011-12-121-0/+6
| | | | | | argument of the cttz and ctlz intrinsics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146360 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch llvm.cttz and llvm.ctlz to accept a second i1 parameter whichChandler Carruth2011-12-123-11/+42
| | | | | | | | | | | | | | | | | | | | indicates whether the intrinsic has a defined result for a first argument equal to zero. This will eventually allow these intrinsics to accurately model the semantics of GCC's __builtin_ctz and __builtin_clz and the X86 instructions (prior to AVX) which implement them. This patch merely sets the stage by extending the signature of these intrinsics and establishing auto-upgrade logic so that the old spelling still works both in IR and in bitcode. The upgrade logic preserves the existing (inefficient) semantics. This patch should not change any behavior. CodeGen isn't updated because it can use the existing semantics regardless of the flag's value. Note that this will be followed by API updates to Clang and DragonEgg. Reviewed by Nick Lewycky! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146357 91177308-0d34-0410-b5e6-96231b3b80d8
* ExecutionEngine: refactor interfaceDylan Noblesmith2011-12-126-35/+28
| | | | | | | | The OptLevel is now redundant with the TargetMachine*. And selectTarget() isn't really JIT-specific and could probably get refactored into one of the lower level libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146355 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove some remants of the old palign pattern fragment that were still ↵Craig Topper2011-12-113-20/+7
| | | | | | hanging around. Also remove a cast from inside getShuffleVPERM2X128Immediate and getShuffleVPERMILPImmediate since the only caller already had done the cast. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146344 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix ↵Stepan Dyatkovskiy2011-12-111-0/+22
| | | | | | for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Third attempt: simplified checks in test for armv7-apple-darwin11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146341 91177308-0d34-0410-b5e6-96231b3b80d8
* Mips: Don't create a dangling IR function just to get the address of a symbol.Benjamin Kramer2011-12-111-6/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146340 91177308-0d34-0410-b5e6-96231b3b80d8
* Also remove unnecessary includes from this file, which was supposed to be partNick Lewycky2011-12-111-2/+0
| | | | | | | of r146334! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146338 91177308-0d34-0410-b5e6-96231b3b80d8
* Minimize #include's and forward-declares in Target.Nick Lewycky2011-12-101-2/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146335 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor the implementation of the TargetOptions out of TargetMachine, takingNick Lewycky2011-12-103-33/+53
| | | | | | | the only parts of TM that depends on CodeGen headers with it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146334 91177308-0d34-0410-b5e6-96231b3b80d8
* [fast-isel] SelectInsertValue seems to be causing miscompiles for ARM. ↵Chad Rosier2011-12-101-0/+1
| | | | | | Disable while I investigate. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146331 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r146322 to appease buildbots. Original commit message:Chad Rosier2011-12-101-22/+0
| | | | | | | | | Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Second attempt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146328 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo.Chad Rosier2011-12-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146327 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed bug 9905: Failure in code selection for llvm intrinsics sqrt/exp (fix ↵Stepan Dyatkovskiy2011-12-101-0/+22
| | | | | | for FSQRT, FSIN, FCOS, FPOWI, FPOW, FLOG, FLOG2, FLOG10, FEXP, FEXP2). Second attempt. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146322 91177308-0d34-0410-b5e6-96231b3b80d8
* Make CR spill and restore use a reserved register. These operations cannot ↵Hal Finkel2011-12-101-10/+18
| | | | | | use the register scavenger because the scavenger can only scavenge one register and frame-index elimination may have already grabbed it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146318 91177308-0d34-0410-b5e6-96231b3b80d8
* Try to align the point where a large basic block is split.Jakob Stoklund Olesen2011-12-101-11/+50
| | | | | | | | | | | | | | | | The split point is picked such that the newly created water has the same alignment as the function. This makes the island suitable for constant pool entries with potentially higher alignment. This also fixes an issue where the basic block was split one instruction too late, causing nonconvergence of the algorithm. <rdar://problem/10550705> There is still an issue with correctly packing differently aligned entries in the island. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146314 91177308-0d34-0410-b5e6-96231b3b80d8
* More debug output formatting.Jakob Stoklund Olesen2011-12-101-9/+20
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146313 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle expressions of the form _GLOBAL_OFFSET_TABLE_-symbol the same way gasRafael Espindola2011-12-101-12/+28
| | | | | | | | does. The _GLOBAL_OFFSET_TABLE_ is still magical in that we get a R_386_GOTPC, but it doesn't change the immediate in the same way as when the expression has no right hand side symbol. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146311 91177308-0d34-0410-b5e6-96231b3b80d8
* LSR: ignore strides in outer loops.Andrew Trick2011-12-101-1/+2
| | | | | | | | | Since we're not rewriting IVs in other loops, there's not much reason to consider their stride when generating formulae. This should reduce the number of useless formulas considered by LSR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146302 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM add some more pre-UAL VFP mnemonics for convenience when porting old code.Jim Grosbach2011-12-102-1/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146300 91177308-0d34-0410-b5e6-96231b3b80d8
* Splats can contain undef's; make sure to handle them correctly. PR11526.Eli Friedman2011-12-091-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146299 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM add some pre-UAL VFP mnemonics for convenience when porting old code.Jim Grosbach2011-12-093-6/+31
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146296 91177308-0d34-0410-b5e6-96231b3b80d8
* Add dump method for debugging.Bill Wendling2011-12-091-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146293 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM allows '' syntax, not just '#imm' for assembly.Jim Grosbach2011-12-091-10/+21
| | | | | | | | | Backwards compatibility with 'gas'. #imm is the preferered and documented syntax, but lots of existing code uses the '$' prefix, so we should support it if we can. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146285 91177308-0d34-0410-b5e6-96231b3b80d8
* [asan] call __asan_init from .preinit_array. This simplifies __asan_init vs ↵Kostya Serebryany2011-12-091-0/+15
| | | | | | malloc chicken-and-egg situation on Android and probably on other flavours of Linux. Patch by eugenis@google.com. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146284 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM assembly aliases for BIC<-->AND (immediate).Jim Grosbach2011-12-092-0/+27
| | | | | | | | | | | | When the immediate operand of an AND or BIC instruction isn't representable in the immediate field of the instruction, but the bitwise negation of the immediate is, assemble the instruction as the inverse operation instead with the inverted immediate as the operand. rdar://10550057 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146283 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM NEON data type aliases for VBIC(register).Jim Grosbach2011-12-091-1/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146281 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM assembly parsing and encoding for VLD2 with writeback.Jim Grosbach2011-12-095-67/+139
| | | | | | | | | | | | Refactor the instructions into fixed writeback and register-stride writeback variants to simplify the offset operand (no more optional register operand using reg0). This is a simpler representation and allows the assembly parser to more easily handle these instructions. Add tests for the instruction variants now supported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146278 91177308-0d34-0410-b5e6-96231b3b80d8
* SplitBlockPredecessors uses ArrayRef instead of Data and Size.Jakub Staszak2011-12-096-29/+16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146277 91177308-0d34-0410-b5e6-96231b3b80d8
* [fast-isel] Add support for selecting insertvalue.Chad Rosier2011-12-091-0/+102
| | | | | | rdar://10530851 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146276 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle reloc_signed_4byte in here. Not doing so was a regression from myRafael Espindola2011-12-091-0/+1
| | | | | | | previous commit. It is strange that we see it in 32 bits. We already have a fixme about it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146273 91177308-0d34-0410-b5e6-96231b3b80d8
* User a helper overload for a common pattern.Jakob Stoklund Olesen2011-12-091-8/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146270 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Better base class factoring.Jim Grosbach2011-12-091-21/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146267 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Better base class factoring.Jim Grosbach2011-12-091-20/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146266 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak debugging output.Jakob Stoklund Olesen2011-12-091-20/+28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146264 91177308-0d34-0410-b5e6-96231b3b80d8
* The second part of support for generating dwarf for assembly source files. ThisKevin Enderby2011-12-094-0/+356
| | | | | | | | | | | generates the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. The next part will be to get the clang driver to enable this when assembling a .s file. rdar://9275556 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146262 91177308-0d34-0410-b5e6-96231b3b80d8
* This is now implemented.Benjamin Kramer2011-12-091-13/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146258 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Add patterns for the various rounding ops for SSE4.1 and AVX.Benjamin Kramer2011-12-092-0/+53
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146257 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Split (v)rounds[sd] into a normal and an intrinsic version.Benjamin Kramer2011-12-092-2/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146256 91177308-0d34-0410-b5e6-96231b3b80d8
* Move isUnpredicatedTerminator() default implementation to ↵Evan Cheng2011-12-092-12/+13
| | | | | | TargetInstrInfoImpl to break Target's dependency on CodeGen. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146247 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove hasSSE1orAVX(). It's the same as hasXMM().Evan Cheng2011-12-093-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146246 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -unroll-runtime for unrolling loops with run-time trip counts.Andrew Trick2011-12-094-14/+426
| | | | | | | | | | | | | | Patch by Brendon Cahoon! This extends the existing LoopUnroll and LoopUnrollPass. Brendon measured no regressions in the llvm test suite with -unroll-runtime enabled. This implementation works by using the existing loop unrolling code to unroll the loop by a power-of-two (default 8). It generates an if-then-else sequence of code prior to the loop to execute the extra iterations before entering the unrolled loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146245 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle the case of the magical _GLOBAL_OFFSET_TABLE_ showing up in aRafael Espindola2011-12-091-7/+18
| | | | | | | | symbol difference. This matches gas behavior and fixes PR11513. We still don't handle _GLOBAL_OFFSET_TABLE_ in data sections. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146238 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename WrapperPIC. It is now used for both pic and static.Akira Hatanaka2011-12-095-25/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146232 91177308-0d34-0410-b5e6-96231b3b80d8
* jalr should use t9 ($25) for indirect calls regardless of the relocation modelAkira Hatanaka2011-12-091-4/+8
| | | | | | | | specified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146229 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix comment.Devang Patel2011-12-091-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146226 91177308-0d34-0410-b5e6-96231b3b80d8
* Update stale comment.Devang Patel2011-12-091-4/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146220 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a couple of logic bugs in TargetLowering::SimplifyDemandedBits. PR11514.Eli Friedman2011-12-091-4/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146219 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r146184. I am seeing performance regression cause by this patch in ↵Devang Patel2011-12-081-10/+11
| | | | | | one test case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146205 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM convenience aliases for VSQRT.Jim Grosbach2011-12-082-1/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146201 91177308-0d34-0410-b5e6-96231b3b80d8