summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* [arm-fast-isel] Add support for ELF PIC.Jush Lu2012-09-275-2/+123
| | | | | | | This is a preliminary step towards ELF support; currently ARMFastISel hasn't been used for ELF object files yet. llvm-svn: 164759
* MIPS DSP: rddsp (instruction which reads DSPControl register fields to a GPR).Akira Hatanaka2012-09-272-0/+26
| | | | llvm-svn: 164756
* MIPS DSP: CMPU.EQ.QB instruction sub-class.Akira Hatanaka2012-09-272-0/+224
| | | | llvm-svn: 164755
* MIPS DSP: ADDU.QB instruction sub-class.Akira Hatanaka2012-09-272-0/+195
| | | | llvm-svn: 164754
* MIPS DSP: Branch on Greater Than or Equal To Value 32 in DSPControl Pos ↵Akira Hatanaka2012-09-274-0/+103
| | | | | | Field instruction. llvm-svn: 164751
* MIPS DSP: all the remaining instructions which read or write accumulators.Akira Hatanaka2012-09-273-0/+444
| | | | llvm-svn: 164750
* MIPS DSP: add support for extract-word instructions.Akira Hatanaka2012-09-274-0/+224
| | | | llvm-svn: 164749
* MIPS DSP: add functions which decode DSP and accumulator registers.Akira Hatanaka2012-09-271-0/+29
| | | | llvm-svn: 164748
* MIPS DSP: add code necessary for pseudo instruction lowering.Akira Hatanaka2012-09-275-2/+22
| | | | llvm-svn: 164747
* MIPS DSP: add bitcast patterns between vectors and int.Akira Hatanaka2012-09-271-0/+10
| | | | | | No test cases. These patterns will get tested along with dsp intrinsics. llvm-svn: 164746
* MIPS DSP: add vector load/store patterns.Akira Hatanaka2012-09-272-0/+18
| | | | llvm-svn: 164744
* Fix of hang during Intel JIT profilingAndrew Kaylor2012-09-261-11/+9
| | | | | | Committed on behalf of Kirill Uhanov llvm-svn: 164736
* Disable the new SROA pass to get the tree back in working order. We don't yetNick Lewycky2012-09-261-1/+1
| | | | | | have testcases for the current problems. llvm-svn: 164731
* Add IRBuilder code for adding !tbaa.struct metadata tags to llvm.memcpy calls.Dan Gohman2012-09-261-1/+5
| | | | llvm-svn: 164728
* Query the parameter attributes directly instead of using the Attribute symbols.Bill Wendling2012-09-261-5/+5
| | | | llvm-svn: 164727
* Remove the `hasFnAttr' method from Function.Bill Wendling2012-09-2630-52/+52
| | | | | | | The hasFnAttr method has been replaced by querying the Attributes explicitly. No intended functionality change. llvm-svn: 164725
* X86_32: Large Symbol+Offset relocations.Jim Grosbach2012-09-261-8/+40
| | | | | | | | | | If the offset is more than 24-bits, it won't fit in a scattered relocation offset field, so we fall back to using a non-scattered relocation. rdar://12358909 llvm-svn: 164724
* Initial commit for the AttributesImpl class.Bill Wendling2012-09-264-1/+84
| | | | | | | | This opaque class will contain all of the attributes. All attribute queries will go through this object. This object will also be uniqued in the LLVMContext. Currently not used, so no implementation change. llvm-svn: 164722
* Add case clauses for returning dsp accumulator encoding values in functionAkira Hatanaka2012-09-261-2/+4
| | | | | | getMipsRegisterNumbering. llvm-svn: 164720
* Add DSP accumulator registers and register class. Remove hi/lo registers.Akira Hatanaka2012-09-261-33/+9
| | | | llvm-svn: 164719
* Delete member MipsFunctionInfo::OutArgFIRange and code that accesses it.Akira Hatanaka2012-09-263-31/+8
| | | | llvm-svn: 164718
* Add support for detecting some corei7-class Xeons.Benjamin Kramer2012-09-261-0/+2
| | | | llvm-svn: 164714
* Now that invoke of an intrinsic is possible (for the llvm.do.nothing intrinsic)Duncan Sands2012-09-261-4/+5
| | | | | | | teach the callgraph logic to not create callgraph edges to intrinsics for invoke instructions; it already skips this for call instructions. Fixes PR13903. llvm-svn: 164707
* YAMLParser: Fix invalid reads when encountering incorrectly quoted scalar.Benjamin Kramer2012-09-261-0/+7
| | | | | | Fixes PR12632. llvm-svn: 164701
* APFloat::roundToIntegral: Special values don't keep the exponent value up to ↵Benjamin Kramer2012-09-261-1/+1
| | | | | | | | date, don't rely on it. Add a couple of unit tests for special floats. Fixes 13929, found by MemorySanitizer. llvm-svn: 164698
* Address Duncan's comments on r164684:Hans Wennborg2012-09-261-9/+5
| | | | | | | | - Put statistics in alphabetical order - Don't use getZextValue when building TableInt, just use APInts - Introduce Create{Z,S}ExtOrTrunc in IRBuilder. llvm-svn: 164696
* Address Duncan's comments on r164682:Hans Wennborg2012-09-261-6/+4
| | | | | | | - Finish assert messages with exclamation mark - Move overflow checking into ShouldBuildLookupTable. llvm-svn: 164692
* Analogous fix to memset and memcpy rewriting. Don't have a test caseChandler Carruth2012-09-261-0/+16
| | | | | | | contrived for these yet, as I spotted them by inspection and the test cases are a bit more tricky to phrase. llvm-svn: 164691
* When rewriting the pointer operand to a load or store which hasChandler Carruth2012-09-261-0/+6
| | | | | | | alignment guarantees attached, re-compute the alignment so that we consider offsets which impact alignment. llvm-svn: 164690
* Teach all of the loads, stores, memsets and memcpys created by theChandler Carruth2012-09-261-32/+49
| | | | | | | | | | | | | rewriter in SROA to carry a proper alignment. This involves interrogating various sources of alignment, etc. This is a more complete and principled fix to PR13920 as well as related bugs pointed out by Eli in review and by inspection in the area. Also by inspection fix the integer and vector promotion paths to create aligned loads and stores. I still need to work up test cases for these... Sorry for the delay, they were found purely by inspection. llvm-svn: 164689
* Fix ordering of operands on lowering of atomicrmw min/max nodes on ARM.James Molloy2012-09-261-2/+2
| | | | llvm-svn: 164685
* SimplifyCFG: Make the switch-to-lookup table transformation store theHans Wennborg2012-09-261-12/+89
| | | | | | | | | | | | | | | | tables in bitmaps when they fit in a target-legal register. This saves some space, and it also allows for building tables that would otherwise be deemed too sparse. One interesting case that this hits is example 7 from http://blog.regehr.org/archives/320. We currently generate good code for this when lowering the switch to the selection DAG: we build a bitmask to decide whether to jump to one block or the other. My patch will result in the same bitmask, but it removes the need for the jump, as the return value can just be retrieved from the mask. llvm-svn: 164684
* SimplifyCFG: Refactor the switch-to-lookup table transformation byHans Wennborg2012-09-261-72/+115
| | | | | | breaking out the building of lookup tables into a separate class. llvm-svn: 164682
* The assumption that /proc/self/exe always exists is incorrect.Sylvestre Ledru2012-09-261-4/+13
| | | | | | | | | | | For example, under a Linux chroot, /proc/ might not be mounted. Therefor, we test if this file exist. If it is the case, use it (the current behavior). Otherwise, we fall back to the detection used by *BSD. The issue has been reported initially on the Debian bug tracker: http://bugs.debian.org/674588 llvm-svn: 164676
* Add SARX/SHRX/SHLX code generation supportMichael Liao2012-09-262-0/+61
| | | | llvm-svn: 164675
* Add RORX code generation supportMichael Liao2012-09-262-0/+27
| | | | llvm-svn: 164674
* Add MULX code generation supportMichael Liao2012-09-262-27/+83
| | | | llvm-svn: 164673
* Teach the 'lint' sanity checking pass to detect simple buffer overflows.Duncan Sands2012-09-261-19/+39
| | | | llvm-svn: 164671
* Revert the business end of r164636 and try again. I'll come in again. ;]Chandler Carruth2012-09-261-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should really, really fix PR13916. For real this time. The underlying bug is... a bit more subtle than I had imagined. The setup is a code pattern that leads to an @llvm.memcpy call with two equal pointers to an alloca in the source and dest. Now, not any pattern will do. The alloca needs to be formed just so, and both pointers should be wrapped in different bitcasts etc. When this precise pattern hits, a funny sequence of events transpires. First, we correctly detect the potential for overlap, and correctly optimize the memcpy. The first time. However, we do simplify the set of users of the alloca, and that causes us to run the alloca back through the SROA pass in case there are knock-on simplifications. At this point, a curious thing has happened. If we happen to have an i8 alloca, we have direct i8 pointer values. So we don't bother creating a cast, we rewrite the arguments to the memcpy to dircetly refer to the alloca. Now, in an unrelated area of the pass, we have clever logic which ensures that when visiting each User of a particular pointer derived from an alloca, we only visit that User once, and directly inspect all of its operands which refer to that particular pointer value. However, the mechanism used to detect memcpy's with the potential to overlap relied upon getting visited once per *Use*, not once per *User*. This is always true *unless* the same exact value is both source and dest. It turns out that almost nothing actually produces that pattern though. We can hand craft test cases that more directly test this behavior of course, and those are included. Also, note that there is a significant missed optimization here -- we prove in many cases that there is a non-volatile memcpy call with identical source and dest addresses. We shouldn't prevent splitting the alloca in that case, and in fact we should just remove such memcpy calls eagerly. I'll address that in a subsequent commit. llvm-svn: 164669
* Replace calls to getSizeInBits with getExtendedSizeInBits since its already ↵Craig Topper2012-09-261-7/+7
| | | | | | known its an extended type. llvm-svn: 164667
* Rename virtual table anchors from Anchor() to anchor() for consistency with ↵Craig Topper2012-09-263-4/+4
| | | | | | the rest of the tree. llvm-svn: 164666
* Remove hasNoAVX method. Can just invert hasAVX instead.Craig Topper2012-09-262-7/+6
| | | | llvm-svn: 164664
* Generate an error message instead of asserting or segfaulting when we have aBill Wendling2012-09-261-19/+29
| | | | | | | | scalar-to-vector conversion that we cannot handle. For instance, when an invalid constraint is used in an inline asm statement. <rdar://problem/12284092> llvm-svn: 164662
* Add 'lock' prefix output support in assembly printerMichael Liao2012-09-263-33/+38
| | | | | | | | - Instead of embedding 'lock' into each mnemonic of atomic instructions except 'xchg', we teach X86 assembly printer to output 'lock' prefix similar to or consistent with code emitter. llvm-svn: 164659
* Generate an error message instead of asserting or segfaulting when we have aBill Wendling2012-09-261-29/+41
| | | | | | | | scalar-to-vector conversion that we cannot handle. For instance, when an invalid constraint is used in an inline asm statement. <rdar://problem/12284092> llvm-svn: 164657
* Expansions for u/srem, using the udiv expansion. More unit tests for udiv ↵Michael Ilseman2012-09-261-7/+115
| | | | | | | | and u/srem. Fixed issue with Release build. llvm-svn: 164654
* Initialize boolean variables in MipsSubtarget's constructor.Akira Hatanaka2012-09-251-1/+2
| | | | llvm-svn: 164642
* Don't drop the alignment on a memcpy intrinsic when producing a store. This isNick Lewycky2012-09-251-2/+3
| | | | | | | | only a missed optimization opportunity if the store is over-aligned, but a miscompile if the store's new type has a higher natural alignment than the memcpy did. Fixes PR13920! llvm-svn: 164641
* blank line for test commitReed Kotler2012-09-251-0/+1
| | | | llvm-svn: 164640
* Revert the business end of r164634, and replace it with a different fix. TheNick Lewycky2012-09-251-7/+4
| | | | | | | | | reason we were getting two of the same alloca is because of a memmove/memcpy which had the same alloca in both the src and dest. Now we detect that case directly. This has the same testcase as before, but fixes a clang test CodeGenObjC/exceptions.m which runs clang -O2. llvm-svn: 164636
OpenPOWER on IntegriCloud