Commit Graph

88578 Commits

Author SHA1 Message Date
Eli Bendersky 583860339b Add forgotten test case for the x32 commit
llvm-svn: 173181
2013-01-22 18:52:39 +00:00
Benjamin Kramer fee7d21ae7 X86: Make sure we account for the FMA4 register immediate value, otherwise rip-rel relocations will be off by one byte.
PR15040.

llvm-svn: 173176
2013-01-22 18:05:59 +00:00
Eli Bendersky 0893e1079d Initial patch for x32 ABI support.
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
2013-01-22 18:02:49 +00:00
Dmitri Gribenko 44ee2e7a23 Tests: rewrite 'opt ... %s' to 'opt ... < %s' so that opt does not emit a ModuleID
This is done to avoid odd test failures, like the one fixed in r171243.

llvm-svn: 173163
2013-01-22 14:39:21 +00:00
Alexey Samsonov ea83bafbda llvm-symbolizer: factor out bits of the tool into separate LLVMSymbolize.{h,cpp} files. No functionality change.
llvm-svn: 173159
2013-01-22 14:21:19 +00:00
Evgeniy Stepanov dcf6bcb904 [msan] Export the value of msan-keep-going flag for the runtime.
llvm-svn: 173156
2013-01-22 13:26:53 +00:00
Evgeniy Stepanov c4415591ed [msan] Do not insert check on volatile store.
Volatile bitfields can cause valid stores of uninitialized bits.

llvm-svn: 173153
2013-01-22 12:30:52 +00:00
Tim Northover 984b472161 Fix truncation of relocation types in Support/ELF.h
This is a follow-up to r171845, which fixes the same issue in the Support code.
Only targets with >256 relocations (principally AArch64) should be affected.

llvm-svn: 173151
2013-01-22 12:01:43 +00:00
Chandler Carruth 0ba8db45c6 Begin fleshing out an interface in TTI for modelling the costs of
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
2013-01-22 11:26:02 +00:00
NAKAMURA Takumi 6c03b6d005 ADT/SparseMultiSetTest.cpp: Try to appease cygwin-clang on stage2, take two. [-Wsign-compare]
llvm-svn: 173144
2013-01-22 10:39:31 +00:00
Tim Northover 98d9b7e1d4 Fix missed out llvm-stress after APFloat change.
llvm-svn: 173141
2013-01-22 10:18:26 +00:00
Tim Northover 29178a348a Make APFloat constructor require explicit semantics.
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
2013-01-22 09:46:31 +00:00
NAKAMURA Takumi be39b10ee1 SparseMultiSet.h: Add suggested parentheses.
llvm-svn: 173128
2013-01-22 05:41:57 +00:00
NAKAMURA Takumi 90c45fcaa6 ADT/SparseMultiSetTest.cpp: Try to appease cygwin-clang (libstdc++-4.5) on stage2. [-Wsign-compare]
llvm-svn: 173127
2013-01-22 05:30:15 +00:00
Michael Gottesman 469a465fa8 This test is only supposed to test that the objc-arc alias analysis
allows for gvn to perform certain optimizations. Thus the runline should
only contain -objc-arc-aa, not the full -objc-arc.

llvm-svn: 173126
2013-01-22 04:41:11 +00:00
NAKAMURA Takumi 08e028e194 ErrorOrTest.cpp: Check existence of EXPECT_DEBUG_DEATH. It is not always available.
llvm-svn: 173123
2013-01-22 04:02:41 +00:00
Daniel Dunbar 34ea79f9a3 [MC/Mach-O] Load commands are supposed to 8-byte aligned on 64-bit.
llvm-svn: 173120
2013-01-22 03:42:49 +00:00
NAKAMURA Takumi 8f75355a12 [CMake] bugpoint-passes should not be built in "all", when LLVM_BUILD_TOOLS is OFF.
llvm-svn: 173112
2013-01-22 01:44:00 +00:00
Andrew Trick 2d35fabc7d Remove target triple from an LSR test.
Manish already fixed this test to work with NoTTI.

llvm-svn: 173110
2013-01-22 00:57:16 +00:00
Bill Wendling eb9c0ec26e Add a new method that adds the AttributeSet at the given index. No functional change.
llvm-svn: 173109
2013-01-22 00:53:12 +00:00
Bill Wendling 360a4ae48e Add the attributes that are passed in instead of the ones we're merging into.
llvm-svn: 173108
2013-01-22 00:41:33 +00:00
Bill Wendling b679233a24 Remove unused method.
llvm-svn: 173106
2013-01-21 23:41:50 +00:00
Joel Jones 7818be446c Fix spelling
llvm-svn: 173103
2013-01-21 23:20:47 +00:00
Bill Wendling e183597d03 Use AttributeSet instead of Attribute to verify things.
llvm-svn: 173101
2013-01-21 23:03:18 +00:00
Bill Wendling c90d9f89b7 Have AttributeSet::getRetAttributes() return an AttributeSet instead of Attribute.
This further restricts the use of the Attribute class to the Attribute family of
classes.

llvm-svn: 173098
2013-01-21 22:44:49 +00:00
Bill Wendling bd4ea16bf3 Make AttributeSet::getFnAttributes() return an AttributeSet instead of an 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
2013-01-21 21:57:28 +00:00
Paul Redmond 9d86a4a3b6 Transform (sub 0, (zext bool to A)) to (sext bool to A) and
(sub 0, (sext bool to A)) to (zext bool to A).

Patch by Muhammad Ahmad
Reviewed by Duncan Sands

llvm-svn: 173093
2013-01-21 21:57:20 +00:00
Michael Ilseman 830875bbda Docs for SparseMultiSet
llvm-svn: 173092
2013-01-21 21:46:32 +00:00
Richard Osborne 5d477751df Fix some incorrectly named u10 / lu10 instructions.
llvm-svn: 173090
2013-01-21 21:12:30 +00:00
Jakub Staszak 691860c294 Remove unneeded #include.
llvm-svn: 173088
2013-01-21 21:02:47 +00:00
Richard Osborne 38cff3ea7f Remove unused multiclass.
llvm-svn: 173087
2013-01-21 20:50:54 +00:00
Richard Osborne 9d3ec06ef8 Add instruction encodings / disassembly support for u6 / lu6 instructions.
llvm-svn: 173086
2013-01-21 20:44:17 +00:00
Richard Osborne 6e58c6d86d Add instruction encoding / disassembly support for ru6 / lru6 instructions.
llvm-svn: 173085
2013-01-21 20:42:16 +00:00
Richard Osborne 0d68e21ca7 Use correct format for the LDAWCP instruction (u6).
llvm-svn: 173083
2013-01-21 20:32:54 +00:00
Chris Lattner 085c5450d9 r173072 is causing some regressions on big endian hosts, I don't have time to debug it
so revert it for now.

llvm-svn: 173074
2013-01-21 19:08:15 +00:00
Chris Lattner bba95c08e4 rework the Bitstream reader to actually work a machine word at a time, instead of 32-bits at a time.
This cuts in half the number of virtual methods called to refill that word when compiling on a 64-bit
host, and will make 64-bit read operations faster.

llvm-svn: 173072
2013-01-21 18:48:26 +00:00
Chris Lattner 1aeca1e806 Fix a heinous inefficiency introduced in r149918, wherein reading each byte of a
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
2013-01-21 18:24:49 +00:00
Michael Ilseman 3e3194f4ec Introduce a new data structure, the SparseMultiSet, and changes to the MI 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
2013-01-21 18:18:53 +00:00
Chris Lattner 9221b8fdac wean Blob handling logic off of banging on NextChar directly. Instead, make
it reason about the current bit position, which is always independent of the
underlying cursors word size.

llvm-svn: 173063
2013-01-21 18:18:25 +00:00
Chris Lattner e1817aae5f rename "SkipToWord" to "SkipToFourByteBoundary" since a word is not always 4 bytes.
llvm-svn: 173062
2013-01-21 18:04:19 +00:00
Nadav Rotem b2e7e7a0b6 Fix a comment. Induction vars dont need to start at zero.
llvm-svn: 173061
2013-01-21 17:59:18 +00:00
Tom Stellard c9b903138d R600/SI: Use unnormalized coordinates for sampling with the RECT target.
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
2013-01-21 15:40:48 +00:00
Tom Stellard 14421a793f R600/SI: Take target parameter for sample intrinsics.
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
2013-01-21 15:40:47 +00:00
Tom Stellard 74dda0da31 R600/SI: Derive all sample intrinsics from a single class.
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: 173051
2013-01-21 15:40:46 +00:00
NAKAMURA Takumi c96fb1bd36 R600/SILowerControlFlow.cpp: Fix a warning. [-Wunused-variable]
llvm-svn: 173040
2013-01-21 14:06:48 +00:00
Chandler Carruth bb9caa9241 Switch CodeMetrics itself over to use TTI to determine if an instruction
is free. The whole CodeMetrics API should probably be reworked more, but
this is enough to allow deleting the duplicate code there for computing
whether an instruction is free.

All of the passes using this have been updated to pull in TTI and hand
it to the CodeMetrics stuff. Further, a dead CodeMetrics API
(analyzeFunction) is nuked for lack of users.

llvm-svn: 173036
2013-01-21 13:04:33 +00:00
Chandler Carruth d11e9a8300 Fix indentation and formatting.
This change brought to by clang-format. =]

llvm-svn: 173034
2013-01-21 12:14:42 +00:00
Chandler Carruth d73bc5fbe2 Sink InlineCost.cpp into IPA -- it is now officially an interprocedural
analysis. How cute that it wasn't previously. ;]

Part of this confusion stems from the flattened header file tree. Thanks
to Benjamin for pointing out the goof on IRC, and we're considering
un-flattening the headers, so speak now if that would bug you.

llvm-svn: 173033
2013-01-21 12:09:41 +00:00
Chandler Carruth b8cf510d81 Move the inline cost analysis's primary cost query to TTI instead of the
old CodeMetrics system. TTI has the specific advantage of being
extensible and customizable by targets to reflect target-specific cost
metrics.

llvm-svn: 173032
2013-01-21 12:05:16 +00:00
Chandler Carruth 42f3dceb63 Now that the inline cost analysis is a pass, we can easily have it
depend on and use other analyses (as long as they're either immutable
passes or CGSCC passes of course -- nothing in the pass manager has been
fixed here). Leverage this to thread TargetTransformInfo down through
the inline cost analysis.

No functionality changed here, this just threads things through.

llvm-svn: 173031
2013-01-21 11:55:09 +00:00