aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Provide move semantics for (Small)BitVector.Benjamin Kramer2012-06-012-0/+40
| | | | | | CodeGen makes a lot of BitVector copies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157826 91177308-0d34-0410-b5e6-96231b3b80d8
* testcase for PR13006, thanks to Duncan for filing it.Chris Lattner2012-06-011-0/+7
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157824 91177308-0d34-0410-b5e6-96231b3b80d8
* BoundsChecking: fix a bug when the handling of recursive PHIs failed and ↵Nuno Lopes2012-06-013-23/+88
| | | | | | | | | | could leave dangling references in the cache add regression tests for this problem. Can already compile & run: PHP, PCRE, and ICU (i.e., all the software I tried) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157822 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement the local-dynamic TLS model for x86 (PR3985)Hans Wennborg2012-06-0113-17/+353
| | | | | | | | | This implements codegen support for accesses to thread-local variables using the local-dynamic model, and adds a clean-up pass so that the base address for the TLS block can be re-used between local-dynamic access on an execution path. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157818 91177308-0d34-0410-b5e6-96231b3b80d8
* PR1255: case ranges.Stepan Dyatkovskiy2012-06-013-117/+141
| | | | | | | | | IntegersSubset devided into IntegersSubsetGeneric and into IntegersSubset itself. The first has no references to ConstantInt and works with IntItem only. IntegersSubsetMapping also made generic. Here added second template parameter "IntegersSubsetTy" that allows to use on of two IntegersSubset types described below. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157815 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove noisy semicolons.Benjamin Kramer2012-06-011-26/+26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157814 91177308-0d34-0410-b5e6-96231b3b80d8
* quick fix for PR13006, will check in testcase later.Chris Lattner2012-06-011-1/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157813 91177308-0d34-0410-b5e6-96231b3b80d8
* PR1255: case ranges.Stepan Dyatkovskiy2012-06-015-98/+142
| | | | | | | | | | | | IntItem cleanup. IntItemBase, IntItemConstantIntImp and IntItem merged into IntItem. All arithmetic operators was propogated from APInt. Also added comparison operators <,>,<=,>=. Currently you will find set of macros that propogates operators from APInt to IntItem in the beginning of IntegerSubset. Note that THESE MACROS WILL REMOVED after all passes will case-ranges compatible. Also note that these macros much smaller pain that something like this: if (V->getValue().ugt(AnotherV->getValue()) { ... } These changes made IntItem full featured integer object. It allows to make IntegerSubset class generic (move out all ConstantInt references inside and add unit-tests) in next commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157810 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable automatic detection of FMA3 support to allow intrinsics to be used.Craig Topper2012-06-011-6/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157805 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove fadd(fmul) patterns for FMA3. This needs to be implemented by paying ↵Craig Topper2012-06-012-278/+0
| | | | | | attention to FP_CONTRACT and matching @llvm.fma which is not available yet. This will allow us to enablle intrinsic use at least though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157804 91177308-0d34-0410-b5e6-96231b3b80d8
* Add VFNSUB* instructions to folding table.Craig Topper2012-06-011-0/+17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157802 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a trailing space and fix a comment.Craig Topper2012-06-011-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157801 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance the logic for looking through tailcalls to look through transparent ↵Chris Lattner2012-06-012-1/+67
| | | | | | | | | | casts in multiple-return value scenarios, like what happens on X86-64 when returning small structs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157800 91177308-0d34-0410-b5e6-96231b3b80d8
* Tidy up. Remove trailing spaces and fix the worst of the 80 column violations.Craig Topper2012-06-011-74/+90
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157799 91177308-0d34-0410-b5e6-96231b3b80d8
* enhance getNoopInput to know about vector<->vector bitcasts of legalChris Lattner2012-06-012-10/+60
| | | | | | | | | types, as well as int<->ptr casts. This allows us to tailcall functions with some trivial casts between the call and return (i.e. because the return types disagree). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157798 91177308-0d34-0410-b5e6-96231b3b80d8
* add some simple 64-bit tail call tests.Chris Lattner2012-06-011-0/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157797 91177308-0d34-0410-b5e6-96231b3b80d8
* rearrange some logic, no functionality change.Chris Lattner2012-06-011-24/+32
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157796 91177308-0d34-0410-b5e6-96231b3b80d8
* merge some tests.Chris Lattner2012-06-013-13/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157795 91177308-0d34-0410-b5e6-96231b3b80d8
* rename testChris Lattner2012-06-011-0/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157794 91177308-0d34-0410-b5e6-96231b3b80d8
* ARM: support struct byval in llvmManman Ren2012-06-013-15/+279
| | | | | | | | | | | We handle struct byval by inserting a pseudo op, which will be expanded to a loop at ExpandISelPseudos. A separate patch for clang will be submitted to enable struct byval. rdar://9877866 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157793 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix 80 columns.Michael J. Spencer2012-06-011-3/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157788 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for enum forward declarations.Eric Christopher2012-06-014-9/+34
| | | | | | Part of rdar://11570854 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157786 91177308-0d34-0410-b5e6-96231b3b80d8
* Put the shiny new MCSubRegIterator to work.Chad Rosier2012-06-011-8/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157783 91177308-0d34-0410-b5e6-96231b3b80d8
* add -bounds-checking-multiple-traps option to make one trap BB per checkNuno Lopes2012-05-312-1/+17
| | | | | | disabled by default for now; we can discusse the default value (& name) later git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157777 91177308-0d34-0410-b5e6-96231b3b80d8
* revamp BoundsChecking considerably:Nuno Lopes2012-05-312-130/+231
| | | | | | | | | | | | - compute size & offset at the same time. The side-effects of this are that we now support negative GEPs. It's now approaching a phase that it can be reused by other passes (e.g., lowering of the objectsize intrinsic) - use APInt throughout to handle wrap-arounds - add support for PHI instrumentation - add a cache (required for recursive PHIs anyway) - remove hoisting support for now, since it was wrong in a few cases sorry for the churn here.. tests will follow soon. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157775 91177308-0d34-0410-b5e6-96231b3b80d8
* IntrusiveRefCntPtr: Simplify operator= as suggested by Richard Smith.Benjamin Kramer2012-05-311-30/+2
| | | | | | This way the constructors do all the hard work. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157773 91177308-0d34-0410-b5e6-96231b3b80d8
* Make this testcase independent of register allocation.Owen Anderson2012-05-311-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157761 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for return value promotion in X86 calling conventions.Jakob Stoklund Olesen2012-05-311-0/+10
| | | | | | Patch by Yiannis Tsiouris! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157757 91177308-0d34-0410-b5e6-96231b3b80d8
* Didn't mean to export this function.Jakob Stoklund Olesen2012-05-311-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157756 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: replace SUB with CMP if possibleManman Ren2012-05-315-0/+61
| | | | | | | | | | | | | | | | | | | This patch will optimize the following movq %rdi, %rax subq %rsi, %rax cmovsq %rsi, %rdi movq %rdi, %rax to cmpq %rsi, %rdi cmovsq %rsi, %rdi movq %rdi, %rax Perform this optimization if the actual result of SUB is not used. rdar: 11540023 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157755 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a PrintRegUnit helper similar to PrintReg.Jakob Stoklund Olesen2012-05-312-0/+44
| | | | | | | | | | | Reg-units are named after their root registers, and most units have a single root, so they simply print as 'AL', 'XMM0', etc. The rare dual root reg-units print as FPSCR~FPSCR_NZCV, FP0~ST7, ... The printing piggybacks on the existing register name tables, so no extra const data space is required. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157754 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit register unit root tables.Jakob Stoklund Olesen2012-05-312-1/+63
| | | | | | | | | | Each register unit has one or two root registers. The full set of registers containing a given register unit can be computed as the union of the root registers and their super-registers. Provide an MCRegUnitRootIterator class to enumerate the roots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157753 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typosJoel Jones2012-05-311-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157752 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos noticed by Benjamin Kramer.Rafael Espindola2012-05-313-17/+60
| | | | | | | Also make the checks stronger and test that we reject ranges that overlap a previous wrapped range. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157749 91177308-0d34-0410-b5e6-96231b3b80d8
* X86: Rename the CLMUL target feature to PCLMUL.Benjamin Kramer2012-05-316-25/+25
| | | | | | | It was renamed in gcc/gas a while ago and causes all kinds of confusion because it was named differently in llvm and clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157745 91177308-0d34-0410-b5e6-96231b3b80d8
* Require intervals in the range metadata to be in a canonical form: They mustRafael Espindola2012-05-314-2/+74
| | | | | | | | | | | be non contiguous, non overlapping and sorted by the lower end. While this is technically a backward incompatibility, every frontent currently produces range metadata with a single interval and we don't have any pass that merges intervals yet, so no existing bitcode files should be rejected by this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157741 91177308-0d34-0410-b5e6-96231b3b80d8
* Added FMA3 Intel instructions.Elena Demikhovsky2012-05-318-49/+607
| | | | | | | | | | I disabled FMA3 autodetection, since the result may differ from expected for some benchmarks. I added tests for GodeGen and intrinsics. I did not change llvm.fma.f32/64 - it may be done later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157737 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance the sinking code to handle diamond patterns. Patch byDuncan Sands2012-05-312-75/+95
| | | | | | | Carlo Alberto Ferraris. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157736 91177308-0d34-0410-b5e6-96231b3b80d8
* Add intrinsic for pclmulqdq instruction.Craig Topper2012-05-313-16/+30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157731 91177308-0d34-0410-b5e6-96231b3b80d8
* Cleanup and factoring of mips16 tablegen classes. Make register classesAkira Hatanaka2012-05-313-61/+89
| | | | | | | | | | CPU16RegsRegClass and CPURARegRegClass available. Add definition of mips16 jalr instruction. Patch by Reed Kotler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157730 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo in assembly directive. Noticed by inspection.Eric Christopher2012-05-311-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157726 91177308-0d34-0410-b5e6-96231b3b80d8
* Add lit.local.cfg to run the tests in test/MC/Disassembler/Mips.Akira Hatanaka2012-05-311-0/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157725 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid depending on list orders and register numbering.Jakob Stoklund Olesen2012-05-301-6/+9
| | | | | | This code is covered by test/CodeGen/ARM/arm-modifier.ll. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157720 91177308-0d34-0410-b5e6-96231b3b80d8
* Extract some pointer hacking to a function.Jakob Stoklund Olesen2012-05-301-22/+22
| | | | | | Switch to MCSuperRegIterator while we're there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157717 91177308-0d34-0410-b5e6-96231b3b80d8
* Prioritize smaller register classes for urgent evictions.Jakob Stoklund Olesen2012-05-302-1/+16
| | | | | | | | | | | | | | It helps compile exotic inline asm. In the test case, normal GR32 virtual registers use up eax-edx so the final GR32_ABCD live range has no registers left. Since all the live ranges were tiny, we had no way of prioritizing the smaller register class. This patch allows tiny unspillable live ranges to be evicted by tiny unspillable live ranges from a smaller register class. <rdar://problem/11542429> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157715 91177308-0d34-0410-b5e6-96231b3b80d8
* Print uint16_t numbers without a sign.Jakob Stoklund Olesen2012-05-301-1/+1
| | | | | | It seems I broke C++11. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157711 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for the mips inline asm 'm' output modifier.Eric Christopher2012-05-302-0/+11
| | | | | | Patch by Jack Carter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157709 91177308-0d34-0410-b5e6-96231b3b80d8
* Switch the canonical FMA term operand order to match both the comment I ↵Owen Anderson2012-05-302-2/+2
| | | | | | wrote and the usual LLVM convention. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157708 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach DAGCombine to canonicalize the position of a constant in the term ↵Owen Anderson2012-05-302-0/+13
| | | | | | operands of an FMA node. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157707 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove extra space.Chad Rosier2012-05-301-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157706 91177308-0d34-0410-b5e6-96231b3b80d8