summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* InstCombine: Clean up weird code that talks about a modulus that's long gone.Benjamin Kramer2013-01-231-6/+1
| | | | | | | This does the right thing unless the multiplication overflows, but the old code didn't handle that case either. llvm-svn: 173276
* Fix powerpc test failure - forgot to initialize stack slot size for ↵Eli Bendersky2013-01-231-2/+3
| | | | | | PPCLinuxMCAsmInfo llvm-svn: 173275
* Clean up assignment of CalleeSaveStackSlotSize: get rid of the default and ↵Eli Bendersky2013-01-236-10/+14
| | | | | | explicitly set this in every target that needs to change it from the default. llvm-svn: 173270
* NVPTX: Stop leaking memory by using a managed constant instead of a new ↵Benjamin Kramer2013-01-231-3/+5
| | | | | | | | | Argument. This is still an egregious hack since we don't have a nice interface for this kind of thing but should help the valgrind leak check buildbot to become green. llvm-svn: 173267
* Make sure metarenamer won't rename special stuff (intrinsics and explicitly ↵Anton Korobeynikov2013-01-231-3/+17
| | | | | | | | renamed stuff). Otherwise this might hide the problems. llvm-svn: 173265
* [asan] use ADD instead of OR when applying shadow offset of PowerPC. See ↵Kostya Serebryany2013-01-231-4/+15
| | | | | | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55975 for details llvm-svn: 173258
* Initialize the components of this class. Otherwise GCC thinks that Array may beDuncan Sands2013-01-231-1/+2
| | | | | | | | used uninitialized, since it fails to understand that Array is only used when SingleValue is not, and outputs a warning. It also seems generally safer given that the constructor is non-trivial and has plenty of early exits. llvm-svn: 173242
* Add the heuristic to differentiate SSPStrong from SSPRequired.Bill Wendling2013-01-231-23/+103
| | | | | | | | | | | | | | | | | | The requirements of the strong heuristic are: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) llvm-svn: 173231
* Add the IR attribute 'sspstrong'.Bill Wendling2013-01-237-15/+53
| | | | | | | | | | | | | | | | | | | | | SSPStrong applies a heuristic to insert stack protectors in these situations: * A Protector is required for functions which contain an array, regardless of type or length. * A Protector is required for functions which contain a structure/union which contains an array, regardless of type or length. Note, there is no limit to the depth of nesting. * A protector is required when the address of a local variable (i.e., stack based variable) is exposed. (E.g., such as through a local whose address is taken as part of the RHS of an assignment or a local whose address is taken as part of a function argument.) This patch implements the SSPString attribute to be equivalent to SSPRequired. This will change in a subsequent patch. llvm-svn: 173230
* Remove the last of uses that use the Attribute object as a collection of ↵Bill Wendling2013-01-238-54/+88
| | | | | | | | | attributes. Collections of attributes are handled via the AttributeSet class now. This finally frees us up to make significant changes to how attributes are structured. llvm-svn: 173228
* R600: rework handling of the constantsTom Stellard2013-01-2316-104/+483
| | | | | | | | | | | | | | | | | | | | Remove Cxxx registers, add new special register - "ALU_CONST" and new operand for each alu src - "sel". ALU_CONST is used to designate that the new operand contains the value to override src.sel, src.kc_bank, src.chan for constants in the driver. Patch by: Vadim Girlin Vincent Lejeune: - Use pointers for constants - Fold CONST_ADDRESS when possible Tom Stellard: - Give CONSTANT_BUFFER_0 its own address space - Use integer types for constant loads Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 173222
* R600: Add a CONST_ADDRESS node to model constant buf readTom Stellard2013-01-233-1/+12
| | | | | | | Patch by: Vincent Lejeune Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 173221
* R600: Factorise VTX_WORD0 and VTX_WORD1 in tblgen defTom Stellard2013-01-231-45/+65
| | | | | | | Patch by: Vincent Lejeune Reviewed-by: Tom Stellard <thomas.stellard@amd.com> llvm-svn: 173220
* Add support for reverse pointer induction variables. These are loops that ↵Nadav Rotem2013-01-231-7/+82
| | | | | | | | | | | | | contain pointers that count backwards. For example, this is the hot loop in BZIP: do { m = *--p; *p = ( ... ); } while (--n); llvm-svn: 173219
* Use the AttributeSet when removing multiple attributes. Use Attribute::AttrKindBill Wendling2013-01-237-20/+44
| | | | | | when removing one attribute. This further encapsulates the use of the attributes. llvm-svn: 173214
* Use the AttributeSet when adding multiple attributes and an Attribute::AttrKindBill Wendling2013-01-232-10/+15
| | | | | | when adding a single attribute to the function. llvm-svn: 173210
* Add instruction encodings / disassembly support for u10 / lu10 instructions.Richard Osborne2013-01-222-12/+22
| | | | llvm-svn: 173204
* Fixed typo.Michael Gottesman2013-01-221-2/+1
| | | | llvm-svn: 173202
* [ObjCARC] Refactored out the inner most 2-loops from PerformCodePlacement ↵Michael Gottesman2013-01-221-153/+198
| | | | | | | | | | | | | | | | into the method ConnectTDBUTraversals. The method PerformCodePlacement was doing too much (i.e. 3x loops, lots of different checking). This refactoring separates the analysis section of the method into a separate function while leaving the actual code placement and analysis preparation in PerformCodePlacement. *NOTE* Really this part of ObjCARC should be refactored out of the main pass class into its own seperate class/struct. But, it is not time to make that change yet though (don't want to make such an invasive change without fixing all of the bugs first). llvm-svn: 173201
* Fix an issue of pseudo atomic instruction DAG scheduleMichael Liao2013-01-222-3/+8
| | | | | | | | | | - Add list of physical registers clobbered in pseudo atomic insts Physical registers are clobbered when pseudo atomic instructions are expanded. Add them in clobber list to prevent DAG scheduler to mis-schedule them after these insns are declared side-effect free. - Add test case from Michael Kuperstein <michael.m.kuperstein@intel.com> llvm-svn: 173200
* Add a warning when there is a macro defintion that has named parameters butKevin Enderby2013-01-221-0/+104
| | | | | | | | | | | | | the body does not use them and it appears the body has positional parameters. This can cause unexpected results as in the added test case. As the darwin version of gas(1) which only supported positional parameters, happened to ignore the named parameters. Now that we want to support both styles of macros we issue a warning in this specific case. rdar://12861644 llvm-svn: 173199
* [mips] Implement MipsRegisterInfo::getRegPressureLimit.Akira Hatanaka2013-01-222-0/+24
| | | | llvm-svn: 173197
* More encapsulation work.Bill Wendling2013-01-226-59/+60
| | | | | | | Use the AttributeSet when we're talking about more than one attribute. Add a function that adds a single attribute. No functionality change intended. llvm-svn: 173196
* Have the integrated assembler give an error if $1 is used as an identifier inKevin Enderby2013-01-221-2/+7
| | | | | | | | | an expression. Currently this bug causes the line to be ignored in a release build and an assert in a debug build. rdar://13062484 llvm-svn: 173195
* [mips] Clean up code in MipsTargetLowering::LowerCall. No functional changeAkira Hatanaka2013-01-222-21/+14
| | | | | | intended llvm-svn: 173189
* X86: Make sure we account for the FMA4 register immediate value, otherwise ↵Benjamin Kramer2013-01-221-1/+1
| | | | | | | | rip-rel relocations will be off by one byte. PR15040. llvm-svn: 173176
* Initial patch for x32 ABI support.Eli Bendersky2013-01-224-4/+16
| | | | | | | | Add the x32 environment kind to the triple, and separate the concept of pointer size and callee save stack slot size, since they're not equal on x32. llvm-svn: 173175
* [msan] Export the value of msan-keep-going flag for the runtime.Evgeniy Stepanov2013-01-221-0/+3
| | | | llvm-svn: 173156
* [msan] Do not insert check on volatile store.Evgeniy Stepanov2013-01-221-4/+1
| | | | | | Volatile bitfields can cause valid stores of uninitialized bits. llvm-svn: 173153
* Begin fleshing out an interface in TTI for modelling the costs ofChandler Carruth2013-01-224-66/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | generic function calls and intrinsics. This is somewhat overlapping with an existing intrinsic cost method, but that one seems targetted at vector intrinsics. I'll merge them or separate their names and use cases in a separate commit. This sinks the test of 'callIsSmall' down into TTI where targets can control it. The whole thing feels very hack-ish to me though. I've left a FIXME comment about the fundamental design problem this presents. It isn't yet clear to me what the users of this function *really* care about. I'll have to do more analysis to figure that out. Putting this here at least provides it access to proper analysis pass tools and other such. It also allows us to more cleanly implement the baseline cost interfaces in TTI. With this commit, it is now theoretically possible to simplify much of the inline cost analysis's handling of calls by calling through to this interface. That conversion will have to happen in subsequent commits as it requires more extensive restructuring of the inline cost analysis. The CodeMetrics class is now really only in the business of running over a block of code and aggregating the metrics on that block of code, with the actual cost evaluation done entirely in terms of TTI. llvm-svn: 173148
* Make APFloat constructor require explicit semantics.Tim Northover2013-01-2214-100/+129
| | | | | | | | | Previously we tried to infer it from the bit width size, with an added IsIEEE argument for the PPC/IEEE 128-bit case, which had a default value. This default value allowed bugs to creep in, where it was inappropriate. llvm-svn: 173138
* [MC/Mach-O] Load commands are supposed to 8-byte aligned on 64-bit.Daniel Dunbar2013-01-221-7/+8
| | | | llvm-svn: 173120
* Add a new method that adds the AttributeSet at the given index. No ↵Bill Wendling2013-01-221-8/+3
| | | | | | functional change. llvm-svn: 173109
* Add the attributes that are passed in instead of the ones we're merging into.Bill Wendling2013-01-221-2/+2
| | | | llvm-svn: 173108
* Use AttributeSet instead of Attribute to verify things.Bill Wendling2013-01-211-53/+52
| | | | llvm-svn: 173101
* Have AttributeSet::getRetAttributes() return an AttributeSet instead of ↵Bill Wendling2013-01-214-30/+47
| | | | | | | | | Attribute. This further restricts the use of the Attribute class to the Attribute family of classes. llvm-svn: 173098
* Make AttributeSet::getFnAttributes() return an AttributeSet instead of an ↵Bill Wendling2013-01-215-20/+45
| | | | | | | | | Attribute. This is more code to isolate the use of the Attribute class to that of just holding one attribute instead of a collection of attributes. llvm-svn: 173094
* Transform (sub 0, (zext bool to A)) to (sext bool to A) andPaul Redmond2013-01-211-0/+10
| | | | | | | | | (sub 0, (sext bool to A)) to (zext bool to A). Patch by Muhammad Ahmad Reviewed by Duncan Sands llvm-svn: 173093
* Fix some incorrectly named u10 / lu10 instructions.Richard Osborne2013-01-211-25/+12
| | | | llvm-svn: 173090
* Remove unused multiclass.Richard Osborne2013-01-211-12/+0
| | | | llvm-svn: 173087
* Add instruction encodings / disassembly support for u6 / lu6 instructions.Richard Osborne2013-01-212-59/+42
| | | | llvm-svn: 173086
* Add instruction encoding / disassembly support for ru6 / lru6 instructions.Richard Osborne2013-01-213-94/+97
| | | | llvm-svn: 173085
* Use correct format for the LDAWCP instruction (u6).Richard Osborne2013-01-211-7/+3
| | | | llvm-svn: 173083
* Fix a heinous inefficiency introduced in r149918, wherein reading each byte of aChris Lattner2013-01-211-9/+8
| | | | | | | | BLOB (i.e., large, performance intensive data) in a bitcode file was switched to invoking one virtual method call per byte read. Now we do one virtual call per BLOB. llvm-svn: 173065
* Introduce a new data structure, the SparseMultiSet, and changes to the MI ↵Michael Ilseman2013-01-211-45/+33
| | | | | | | | scheduler to use it. A SparseMultiSet adds multiset behavior to SparseSet, while retaining SparseSet's desirable properties. Essentially, SparseMultiSet provides multiset behavior by storing its dense data in doubly linked lists that are inlined into the dense vector. This allows it to provide good data locality as well as vector-like constant-time clear() and fast constant time find(), insert(), and erase(). It also allows SparseMultiSet to have a builtin recycler rather than keeping SparseSet's behavior of always swapping upon removal, which allows it to preserve more iterators. It's often a better alternative to a SparseSet of a growable container or vector-of-vector. llvm-svn: 173064
* wean Blob handling logic off of banging on NextChar directly. Instead, makeChris Lattner2013-01-211-10/+13
| | | | | | | it reason about the current bit position, which is always independent of the underlying cursors word size. llvm-svn: 173063
* rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 ↵Chris Lattner2013-01-211-3/+3
| | | | | | bytes. llvm-svn: 173062
* Fix a comment. Induction vars dont need to start at zero.Nadav Rotem2013-01-211-1/+1
| | | | llvm-svn: 173061
* R600/SI: Use unnormalized coordinates for sampling with the RECT target.Tom Stellard2013-01-212-0/+13
| | | | | | | | | Patch by: Michel Dänzer Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 173053
* R600/SI: Take target parameter for sample intrinsics.Tom Stellard2013-01-212-4/+4
| | | | | | | | | Patch by: Michel Dänzer Reviewed-by: Tom Stellard <thomas.stellard@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> llvm-svn: 173052
OpenPOWER on IntegriCloud