1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
Commit Graph

59185 Commits

Author SHA1 Message Date
Manman Ren
7ddbce87d4 Correct indentation for dumping LexicalScope.
llvm-svn: 174237
2013-02-02 00:02:03 +00:00
Manman Ren
783b7811da [Dwarf] avoid emitting multiple AT_const_value for static memebers.
Testing case is reduced from MultiSource/BenchMarks/Prolangs-C++/deriv1.

rdar://problem/13071590

llvm-svn: 174235
2013-02-01 23:54:37 +00:00
Bill Schmidt
314ae91cb8 Add notes about future PowerPC features
llvm-svn: 174232
2013-02-01 23:10:09 +00:00
Bill Schmidt
d3beefd1a4 LLVM enablement for some older PowerPC CPUs
llvm-svn: 174230
2013-02-01 22:59:51 +00:00
Bill Wendling
867f5df67b Change the AttributeImpl to hold a single Constant* for the values.
This Constant could be an aggregate to represent multiple values.

llvm-svn: 174228
2013-02-01 22:32:30 +00:00
Preston Gurd
fd12deb433 This patch aims to improve compile time performance by increasing
the SCEV vector size in LoopStrengthReduce. It is observed that
the BaseRegs vector size is 4 in most cases,
and elements are frequently copied when it is initialized as
SmallVector<const SCEV *, 2> BaseRegs.
Our benchmark results show that the compilation time performance
improved by ~0.5%.

Patch by Wan Xiaofei.

llvm-svn: 174219
2013-02-01 20:41:27 +00:00
David Sehr
59597001bc Two changes relevant to LEA and x32:
1) allows the use of RIP-relative addressing in 32-bit LEA instructions under
   x86-64 (ILP32 and LP64)
2) separates the size of address registers in 64-bit LEA instructions from
   control by ILP32/LP64.

llvm-svn: 174208
2013-02-01 19:28:09 +00:00
Nadav Rotem
3f8178d398 Fix errant fallthrough in the generation of the lifetime markers.
Found by Alexander Kornienko.

llvm-svn: 174207
2013-02-01 19:25:23 +00:00
Jim Grosbach
bb7b339a2a Fix misplaced 'break'.
llvm-svn: 174205
2013-02-01 18:57:06 +00:00
Chad Rosier
99c22c1ea6 Use a continue to simplify loop and reduce indentation. No functional change.
llvm-svn: 174198
2013-02-01 17:49:07 +00:00
Jyotsna Verma
460af8cdc9 Replace LDriu*[bhdw]_indexed_V4 instructions with "def Pats".
llvm-svn: 174193
2013-02-01 16:36:16 +00:00
Jyotsna Verma
3896fefde4 Add appropriate TSFlags to the instructions that must be always extended.
llvm-svn: 174186
2013-02-01 15:54:43 +00:00
Benjamin Kramer
e39befdbbc InstSimplify: stripAndComputeConstantOffsets can be called with vectors of pointers too.
Prepare it for vectors of pointers and handle simple cases. We don't handle
complicated cases because accumulateConstantOffset bails on pointer vectors.
Fixes selfhost on i386.

llvm-svn: 174179
2013-02-01 15:21:10 +00:00
Tim Northover
2d7b1de7be Remove currently unused register decoder from AArch64.
This should fix a warning when building this backend.

llvm-svn: 174177
2013-02-01 14:55:05 +00:00
Nadav Rotem
696003f5f2 Revert r174152. The shift amount may overflow and in that case this transformation is illegal.
llvm-svn: 174156
2013-02-01 07:59:33 +00:00
Nadav Rotem
8e40171f27 Optimize shift lefts of a constant by a value plus constant into a single shift.
llvm-svn: 174152
2013-02-01 06:45:40 +00:00
Bill Wendling
5c32451ec5 Remove some dead code, improve some asserts, and other assorted changes. No functionality change.
llvm-svn: 174132
2013-02-01 01:04:27 +00:00
Dan Gohman
40cf94a450 Add a comment explaining an unavailable optimization.
llvm-svn: 174131
2013-02-01 00:49:06 +00:00
Bill Wendling
b272a4d3bf Remove one of the odious 'Raw' methods.
llvm-svn: 174130
2013-02-01 00:48:14 +00:00
Bill Wendling
f2edd83fe8 Use iterators instead of relying upon a bitmask of attributes to remove attributes from an AttrBuilder.
llvm-svn: 174123
2013-02-01 00:13:50 +00:00
Dan Gohman
dddbd57a07 Rewrite instsimplify's handling if icmp on pointer values to remove the
remaining use of AliasAnalysis concepts such as isIdentifiedObject to
prove pointer inequality.

@external_compare in test/Transforms/InstSimplify/compare.ll shows a simple
case where a noalias argument can be equal to a global variable address, and
while AliasAnalysis can get away with saying that these pointers don't alias,
instsimplify cannot say that they are not equal.

llvm-svn: 174122
2013-02-01 00:11:13 +00:00
Chandler Carruth
305ed81b1c Fix another typo in the classof definitions that doesn't (currently)
have any effect. Spotted by Eli in review, thanks!!!

llvm-svn: 174121
2013-02-01 00:04:33 +00:00
Bill Wendling
a55db587cd Add iterators to the AttributeSet class so that we can access the Attributes in a nice way.
llvm-svn: 174120
2013-01-31 23:53:05 +00:00
Dan Gohman
680f51974b An alloca can be equal to an argument. It can't *alias* an alloca, but it could
be equal, since there's nothing preventing a caller from correctly predicting
the stack location of an alloca.

llvm-svn: 174119
2013-01-31 23:49:33 +00:00
Chandler Carruth
6a7f563b49 Switch the code added in r173885 to use the new, shiny RTTI
infrastructure on MCStreamer to test for whether there is an
MCELFStreamer object available.

This is just a cleanup on the AsmPrinter side of things, moving ad-hoc
tests of random APIs to a direct type query. But the AsmParser
completely broken. There were no tests, it just blindly cast its
streamer to an MCELFStreamer and started manipulating it.

I don't have a test case -- this actually failed on LLVM's own
regression test suite. Unfortunately the failure only appears when the
stars, compilers, and runtime align to misbehave when we read a pointer
to a formatted_raw_ostream as-if it were an MCAssembler. =/

UBSan would catch this immediately.

Many thanks to Matt for doing about 80% of the debugging work here in
GDB, Jim for helping to explain how exactly to fix this, and others for
putting up with the hair pulling that ensued during debugging it.

llvm-svn: 174118
2013-01-31 23:43:14 +00:00
Bill Wendling
eb853de95f s/AttrBuilder::addAttributes/AttrBuilder::addAttribute/g because that's more descriptive of what it actually is.
llvm-svn: 174116
2013-01-31 23:38:01 +00:00
Chandler Carruth
0c74d78ebf Give the MCStreamer class hierarchy LLVM RTTI facilities for use with
isa<> and dyn_cast<>. In several places, code is already hacking around
the absence of this, and there seem to be several interfaces that might
be lifted and/or devirtualized using this.

This change was based on a discussion with Jim Grosbach about how best
to handle testing for specific MCStreamer subclasses. He said that this
was the correct end state, and everything else was too hacky so
I decided to just make it so.

No functionality should be changed here, this is just threading the kind
through all the constructors and setting up the classof overloads.

llvm-svn: 174113
2013-01-31 23:29:57 +00:00
Bill Wendling
7faa9ee1dc Remove the AttrBuilder form of the Attribute::get creators.
The AttrBuilder is for building a collection of attributes. The Attribute object
holds only one attribute. So it's not really useful for the Attribute object to
have a creator which takes an AttrBuilder.

This has two fallouts:

1. The AttrBuilder no longer holds its internal attributes in a bit-mask form.
2. The attributes are now ordered alphabetically (hence why the tests have changed).

llvm-svn: 174110
2013-01-31 23:16:25 +00:00
NAKAMURA Takumi
9a3506966b Update AMDGPURegisterInfo::eliminateFrameIndex() corresponding to r174083.
llvm-svn: 174106
2013-01-31 22:55:51 +00:00
Tom Stellard
91336f7259 R600: Fold clamp, neg, abs
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174099
2013-01-31 22:11:54 +00:00
Tom Stellard
fe5c14ff9a R600: Consider bitcast when folding const_address node.
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174098
2013-01-31 22:11:53 +00:00
Tom Stellard
585a9178bf R600: Make store_dummy intrinsic more general by passing export type
Patch by: Vincent Lejeune

Reviewed-by: Tom Stellard <thomas.stellard@amd.com>
llvm-svn: 174097
2013-01-31 22:11:46 +00:00
Chad Rosier
ae7fb3bcb7 Remove unused variable, which should have been removed with r174083.
llvm-svn: 174094
2013-01-31 21:23:44 +00:00
Manman Ren
e0deec7fe0 Linker: correctly link in dbg.declare
This is a re-worked version of r174048.
Given source IR:
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15
we used to generate 
call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29
!27 = metadata !{null}

With this patch, we will correctly generate
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28

Looking up %argc.addr in ValueMap will return null, since %argc.addr is already
correctly set up, we can use identity mapping.

rdar://problem/13089880

llvm-svn: 174093
2013-01-31 21:19:18 +00:00
Bill Wendling
0b0b695442 Add support for emitting a string attribute.
Attributes that are strings are typically target-dependent attributes. They are
of this form in the IR:

   "attr"
   "attr" = "val"

llvm-svn: 174090
2013-01-31 20:59:05 +00:00
Chad Rosier
797c35aba9 Add braces, so my head doesn't explode.
llvm-svn: 174088
2013-01-31 20:57:50 +00:00
Tim Northover
3d8039e3f0 Update AArch64 backend to changed eliminateFrameIndex interface.
llvm-svn: 174086
2013-01-31 20:46:53 +00:00
Lang Hames
ff8ee44f3a When lowering memcpys to loads and stores, make sure we don't promote alignments
past the natural stack alignment.

llvm-svn: 174085
2013-01-31 20:23:43 +00:00
Manman Ren
f01539f6a1 [Dwarf] early exit to avoid creating dangling DIEs
We used to create children DIEs for a scope, then check whether ScopeDIE is
null. If ScopeDIE is null, the children DIEs will be dangling. Other DIEs can
link to those dangling DIEs, which are not emitted at all, causing dwarf error.

The current testing case is 4k lines, from MultiSource/BenchMark/McCat/09-vor.

rdar://problem/13071959

llvm-svn: 174084
2013-01-31 20:05:14 +00:00
Chad Rosier
ebbd4433e6 [PEI] Pass the frame index operand number to the eliminateFrameIndex function.
Each target implementation was needlessly recomputing the index.
Part of rdar://13076458

llvm-svn: 174083
2013-01-31 20:02:54 +00:00
Jim Grosbach
24ae32bc2f interpreter: Fix errant fallthrough.
llvm-svn: 174080
2013-01-31 19:46:59 +00:00
Jim Grosbach
3ea2e57843 Object: Fix errant fallthrough.
llvm-svn: 174079
2013-01-31 19:46:57 +00:00
Jim Grosbach
8035e3683d RuntimeDyld: Fix errant fallthrough.
llvm-svn: 174078
2013-01-31 19:46:28 +00:00
Derek Schuff
ef8694af28 [MC] bundle alignment: prevent padding instructions from crossing bundle boundaries
llvm-svn: 174067
2013-01-31 17:00:03 +00:00
Tim Northover
e2b0519ed8 Add AArch64 as an experimental target.
This patch adds support for AArch64 (ARM's 64-bit architecture) to
LLVM in the "experimental" category. Currently, it won't be built
unless requested explicitly.

This initial commit should have support for:
    + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions
      (except the late addition CRC instructions).
    + CodeGen features required for C++03 and C99.
    + Compilation for the "small" memory model: code+static data <
      4GB.
    + Absolute and position-independent code.
    + GNU-style (i.e. "__thread") TLS.
    + Debugging information.

The principal omission, currently, is performance tuning.

This patch excludes the NEON support also reviewed due to an outbreak of
batshit insanity in our legal department. That will be committed soon bringing
the changes to precisely what has been approved.

Further reviews would be gratefully received.

llvm-svn: 174054
2013-01-31 12:12:40 +00:00
Evgeniy Stepanov
51eee1f016 Annotate BumpPtrAllocator for MemorySanitizer.
This change adds MemorySanitizer annotations to BumpPtrAllocator to
improve report quality.

llvm-svn: 174051
2013-01-31 09:58:59 +00:00
Alexey Samsonov
365f5a5d7b Revert r173946. This breaks compilation of googletest with Clang
llvm-svn: 174048
2013-01-31 08:02:11 +00:00
Bill Wendling
2fe5911bfe Remove the Attribute::hasAttributes() function.
That function doesn't make sense anymore because there's only one attribute per
Attribute object now.

llvm-svn: 174044
2013-01-31 06:22:35 +00:00
NAKAMURA Takumi
ad566655e3 Revert r174026, "Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private."
It broke many hosts to crash.

llvm-svn: 174035
2013-01-31 03:47:28 +00:00
Dan Gohman
eabc737422 Change stripAndComputeConstantOffsets to accept a NULL DataLayout pointer
as well.

llvm-svn: 174030
2013-01-31 02:50:36 +00:00
Dan Gohman
c75c606cf7 Add a comment.
llvm-svn: 174028
2013-01-31 02:45:26 +00:00
Dan Gohman
6968f40e37 Move isKnownNonNull out of AliasAnalysis.h and into ValueTracking.cpp since
it isn't really an AliasAnalysis concept, and ValueTracking has similar things
that it could plausibly share code with some day.

llvm-svn: 174027
2013-01-31 02:40:59 +00:00
Bill Wendling
37dbbd1577 Remove Attribute::hasAttributes() and make Attribute::hasAttribute() private.
The Attribute::hasAttributes() is kind of meaningless since an Attribute can
have only one attribute. And we would rather people use the 'operator=='
instead of Attribute::hasAttribute().

llvm-svn: 174026
2013-01-31 02:18:19 +00:00
Dan Gohman
7eac0c2694 Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.

llvm-svn: 174024
2013-01-31 02:00:45 +00:00
Bill Wendling
967a150cda Make the AttrBuilder creation method of Attribute private so that people won't use it.
llvm-svn: 174023
2013-01-31 01:51:27 +00:00
Bill Wendling
bc16a254b0 Revert for now:
--- Reverse-merging r174010 into '.':
U    include/llvm/IR/Attributes.h
U    lib/IR/Verifier.cpp
U    lib/IR/Attributes.cpp

llvm-svn: 174012
2013-01-31 01:04:51 +00:00
Bill Wendling
d1d96ba2d8 Remove the AttrBuilder version of the Attribute::get function.
The AttrBuilder is there to build up multiple attributes. The Attribute class
represents only one attribute at a time. So remove this unnecessary builder
creator method.

llvm-svn: 174010
2013-01-31 00:53:21 +00:00
Eric Christopher
44ea43314a Whitespace.
llvm-svn: 174009
2013-01-31 00:50:48 +00:00
Eric Christopher
ae708feb79 Check and allow floating point registers to select the size of the
register for inline asm. This conforms to how gcc allows for effective
casting of inputs into gprs (fprs is already handled).

llvm-svn: 174008
2013-01-31 00:50:46 +00:00
Dan Gohman
157c7b338a Minor code simplification.
llvm-svn: 174005
2013-01-31 00:32:11 +00:00
Bill Wendling
b7a478403d Make sure that the Attribute object represents one attribute only.
Several places were still treating the Attribute object as respresenting
multiple attributes. Those places now use the AttributeSet to represent
multiple attributes.

llvm-svn: 174003
2013-01-31 00:29:54 +00:00
Dan Gohman
65adb5e00a stripAndComputeConstantOffsets is only called on pointers; check this
with an assert instead of failing and requiring callers to check for failure.

llvm-svn: 173998
2013-01-31 00:12:20 +00:00
Dan Gohman
e688173b6b Fix ConstantFold's folding of icmp instructions to recognize that,
for example, a one-past-the-end pointer from one global variable may
be equal to the base pointer of another global variable.

llvm-svn: 173995
2013-01-31 00:01:45 +00:00
Hal Finkel
32085870d7 PPC QPX requires a 32-byte aligned stack
On systems which support the QPX vector instructions, the stack must be
32-byte aligned.

llvm-svn: 173993
2013-01-30 23:43:27 +00:00
Bill Wendling
afbeb93c35 Remove addRetAttributes and addFnAttributes, which aren't useful abstractions.
llvm-svn: 173992
2013-01-30 23:40:31 +00:00
Bill Wendling
c926e2a691 Convert typeIncompatible to return an AttributeSet.
There are still places which treat the Attribute object as a collection of
attributes. I'm systematically removing them.

llvm-svn: 173990
2013-01-30 23:07:40 +00:00
Evan Cheng
4d1a496923 Restrict sin/cos optimization to 64-bit only for now. 32-bit is a bit messy and less critical.
llvm-svn: 173987
2013-01-30 22:56:35 +00:00
Hal Finkel
c18598b552 Initialize hasQPX in PPCSubtarget
This should have gone in with r173973.

llvm-svn: 173984
2013-01-30 22:43:44 +00:00
Bill Wendling
045f95da4a Remove redundant code.
It was creating a new AttrBuilder when we could just fill in the AttrBuilder
we're building.

llvm-svn: 173975
2013-01-30 21:22:59 +00:00
Hal Finkel
7969f87a01 Add definitions for the PPC a2q core marked as having QPX available
This is the first commit of a large series which will add support for the
QPX vector instruction set to the PowerPC backend. This instruction set is
used on the IBM Blue Gene/Q supercomputers.

llvm-svn: 173973
2013-01-30 21:17:42 +00:00
Eli Bendersky
128c58bab5 Clean up whitespace and indentation a bit
llvm-svn: 173960
2013-01-30 19:24:23 +00:00
Manman Ren
871181e2e0 Linker: correctly link in dbg.declare
Given source IR:
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !14), !dbg !15
we used to generate 
call void @llvm.dbg.declare(metadata !27, metadata !28), !dbg !29
!27 = metadata !{null}

With this patch, we will correctly generate
call void @llvm.dbg.declare(metadata !{i32* %argc.addr}, metadata !27), !dbg !28

Looking up %argc.addr in ValueMap will return null, since %argc.addr is already
correctly set up, we can use identity mapping.

llvm-svn: 173946
2013-01-30 17:42:15 +00:00
Eli Bendersky
54b69d95ac Add a special ARM trap encoding for NaCl.
More details in this thread: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130128/163783.html

Patch by JF Bastien

llvm-svn: 173943
2013-01-30 16:30:19 +00:00
Logan Chien
8155fc64e5 Add missing header and test cases for r173939.
llvm-svn: 173941
2013-01-30 15:48:50 +00:00
Logan Chien
88f66a1476 Override virtual function for ARM EH directives.
llvm-svn: 173939
2013-01-30 15:39:04 +00:00
Dmitri Gribenko
2eaa3b382c Move UTF conversion routines from clang/lib/Basic to llvm/lib/Support
This is required to use them in TableGen.

llvm-svn: 173923
2013-01-30 12:05:05 +00:00
Bill Wendling
67fe3298b1 Attempt to fix dragonegg. Use the number of slots to determine if the AttributeSet has attributes or not.
llvm-svn: 173902
2013-01-30 06:54:41 +00:00
Nadav Rotem
7b1c05a9b7 InstCombine: canonicalize sext-and --> select
sext-not-and --> select.

Patch by Muhammad Tauqir Ahmad.

llvm-svn: 173901
2013-01-30 06:35:22 +00:00
David Blaikie
23205ae0d0 Removing initializer for the field removed in r173887
llvm-svn: 173888
2013-01-30 03:04:07 +00:00
David Blaikie
db3dd167f9 Remove unused variable (introduced in r173884) to clear clang -Werror build
llvm-svn: 173887
2013-01-30 02:56:02 +00:00
Jack Carter
0d5645b2e3 Forgot to add new file to CMakeLists
llvm-svn: 173886
2013-01-30 02:32:36 +00:00
Jack Carter
7c25c2553c This patch implements runtime ARM specific
setting of ELF header e_flags.

Contributer: Jack Carter
 
llvm-svn: 173885
2013-01-30 02:24:33 +00:00
Jack Carter
9054213d30 This patch implements runtime Mips specific
setting of ELF header e_flags.

Contributer: Jack Carter
 
llvm-svn: 173884
2013-01-30 02:16:36 +00:00
Jack Carter
7cd7b1f749 This patch reworks how llvm targets set
and update ELF header e_flags.

Currently gathering information such as symbol, 
section and data is done by collecting it in an 
MCAssembler object. From MCAssembler and MCAsmLayout 
objects ELFObjectWriter::WriteObject() forms and 
streams out the ELF object file.

This patch just adds a few members to the MCAssember 
class to store and access the e_flag settings. It 
allows for runtime additions to the e_flag by 
assembler directives. The standalone assembler can 
get to MCAssembler from getParser().getStreamer().getAssembler().

This patch is the generic infrastructure and will be
followed by patches for ARM and Mips for their target 
specific use.

Contributer: Jack Carter
 
llvm-svn: 173882
2013-01-30 02:09:52 +00:00
Akira Hatanaka
553d261207 [mips] Lower EH_RETURN.
Patch by Sasa Stankovic.

llvm-svn: 173862
2013-01-30 00:26:49 +00:00
Renato Golin
c99da3a7f4 Adding simple cast cost to ARM
Changing ARMBaseTargetMachine to return ARMTargetLowering intead of
the generic one (similar to x86 code).

Tests showing which instructions were added to cast when necessary
or cost zero when not. Downcast to 16 bits are not lowered in NEON,
so costs are not there yet.

llvm-svn: 173849
2013-01-29 23:31:38 +00:00
Dmitri Gribenko
bbc618e0fa Remove unused variable (unused since r173839)
llvm-svn: 173847
2013-01-29 23:27:45 +00:00
Michael Gottesman
ab6ee5005b Made certain small functions in PtrState inlined.
llvm-svn: 173842
2013-01-29 22:29:59 +00:00
Michael J. Spencer
264c449666 [MC][COFF] Delay handling symbol aliases when writing
Fixes PR14447 and PR9034. Patch by Nico Rieck!

llvm-svn: 173839
2013-01-29 22:10:07 +00:00
Pekka Jaaskelainen
67cddcca8c LoopVectorize: convert TinyTripCountVectorThreshold constant
to a command line switch.

llvm-svn: 173837
2013-01-29 21:42:08 +00:00
Michael Gottesman
ab4288b56e Removed trailing comma in last element of enum declaration.
llvm-svn: 173836
2013-01-29 21:41:44 +00:00
Michael Gottesman
cbf143b3cd Moved S_Stop back to its previous position in the sequence order.
llvm-svn: 173834
2013-01-29 21:39:02 +00:00
Weiming Zhao
280e8fdbef Add a special handling case for untyped CopyFromReg node in GetCostForDef() of ScheduleDAGRRList
llvm-svn: 173833
2013-01-29 21:18:43 +00:00
Michael Gottesman
d28a7d5fc2 Fixed a few debug messages and some 80+ violations.
llvm-svn: 173832
2013-01-29 21:07:53 +00:00
Michael Gottesman
98e0318acb Added some periods to some comments and added an overload for operator<< for type Sequence so I can print out Sequences in debug statements.
llvm-svn: 173831
2013-01-29 21:07:51 +00:00
Michael Gottesman
1d2ca1ffd8 Changed DoesObjCBlockEscape => DoesRetainableObjPtrEscape so I can use it to perform escape analysis of other retainable object pointers in other locations.
llvm-svn: 173829
2013-01-29 21:00:52 +00:00
Bill Wendling
d6a0aeff10 Add a couple of accessor methods to get the kind and values of an attribute.
llvm-svn: 173828
2013-01-29 20:45:34 +00:00
Bill Wendling
06e3c96d61 s/Data/Kind/g. No functionality change.
llvm-svn: 173827
2013-01-29 20:37:10 +00:00
David Blaikie
168e35edd8 Support artificial parameters in function types.
Provides the functionality for Clang change r172911 - I just had this still
lying around.

llvm-svn: 173820
2013-01-29 19:35:24 +00:00
Jyotsna Verma
189807572e Use multiclass for post-increment store instructions.
llvm-svn: 173816
2013-01-29 18:42:41 +00:00
Jyotsna Verma
e8debd87f4 Add constant extender support for MInst type instructions.
llvm-svn: 173813
2013-01-29 18:18:50 +00:00
Evan Cheng
3d095b1549 Remove dead code.
llvm-svn: 173812
2013-01-29 18:08:22 +00:00
Edwin Vane
fafd787d1f Fixing warnings revealed by gcc release build
Fixed set-but-not-used warnings.

Reviewer: gribozavr
llvm-svn: 173810
2013-01-29 17:42:24 +00:00
Benjamin Kramer
5142e76f3a LoopVectorize: Clean up ValueMap a bit and avoid double lookups.
No intended functionality change.

llvm-svn: 173809
2013-01-29 17:31:33 +00:00
NAKAMURA Takumi
6f0f8e9c41 R600/AMDILPeepholeOptimizer.cpp: Tweak std::make_pair to satisfy C++11.
llvm-svn: 173807
2013-01-29 16:31:56 +00:00
NAKAMURA Takumi
f9f76dc502 AttributeSet::get(): Fix a valgrind error. It doesn't affect actual behavior, though.
Don't touch I->first on the end iterator, I == E!

llvm-svn: 173804
2013-01-29 15:18:16 +00:00
Hans Wennborg
4df1f32131 Fix typo in X86BaseInfo.h that I introduced in r157818.
llvm-svn: 173798
2013-01-29 14:05:57 +00:00
Timur Iskhodzhanov
8b40231d0a Hopefully fix the Windows build failure introduced in r173769
llvm-svn: 173781
2013-01-29 09:09:27 +00:00
Tim Northover
842599c977 Fix 64-bit atomic operations in Thumb mode.
The ARM and Thumb variants of LDREXD and STREXD have different constraints and
take different operands. Previously the code expanding atomic operations didn't
take this into account and asserted in Thumb mode.

llvm-svn: 173780
2013-01-29 09:06:13 +00:00
Craig Topper
a8c721bc88 Merge SSE and AVX shuffle instructions in the comment printer.
llvm-svn: 173777
2013-01-29 07:54:31 +00:00
Andrew Trick
c7578b11dd MIsched: cleanup code. Use isBoundaryNode().
llvm-svn: 173775
2013-01-29 06:26:35 +00:00
Michael Gottesman
2153efb5eb Fixed 2 more header comments...
llvm-svn: 173774
2013-01-29 05:07:18 +00:00
Michael Gottesman
e5970ea945 Fixed header comment.
llvm-svn: 173773
2013-01-29 05:05:17 +00:00
Michael Gottesman
28c4bb7fde Fixed some whitespace/80+ violations. Also added a space after a namespace declaration.
llvm-svn: 173772
2013-01-29 04:58:30 +00:00
Michael Gottesman
5dc197578c Added missing dashes from header declaration comment.
llvm-svn: 173770
2013-01-29 04:53:55 +00:00
Michael Gottesman
886be0c46c Juggled Debug.h from ObjCARC.h to only the including cpp files that
actually have DEBUG statements. Also changed raw_ostream in said header
to be a forward declaration (removing an include).

llvm-svn: 173769
2013-01-29 04:51:59 +00:00
Michael Gottesman
4a3c5c538f Sorted includes using utils/sort_includes.
llvm-svn: 173767
2013-01-29 04:20:52 +00:00
Michael Gottesman
46b43654b7 Added two missing headers from ObjCARCAliasAnalysis.h.
This was missed since whenever I was including ObjCARCAliasAnalysis.h, I
was including ObjCARC.h before it which included these includes
(resulting in no compilation breakage).

llvm-svn: 173764
2013-01-29 04:09:24 +00:00
Michael Gottesman
defa15e39e Removed InstCombine/Targets as library dependencies for libObjCARCOpts since they are unnecessary.
llvm-svn: 173763
2013-01-29 04:05:17 +00:00
Bill Wendling
0bbff6db82 Convert getAttributes() to return an AttributeSetNode.
The AttributeSetNode contains all of the attributes. This removes one (hopefully
last) use of the Attribute class as a container of multiple attributes.

llvm-svn: 173761
2013-01-29 03:20:31 +00:00
Michael Gottesman
c7246c9378 Extracted ObjCARCContract from ObjCARCOpts into its own file.
This also required adding 2x headers Dependency Analysis.h/Provenance Analysis.h
and a .cpp file DependencyAnalysis.cpp to unentangle the dependencies inbetween
ObjCARCContract and ObjCARCOpts.

llvm-svn: 173760
2013-01-29 03:03:03 +00:00
Michael Gottesman
35fc159087 Removed some cruft from ObjCARCAliasAnalysis.cpp.
llvm-svn: 173759
2013-01-29 03:02:59 +00:00
Evan Cheng
2e2cde560f Teach SDISel to combine fsin / fcos into a fsincos node if the following
conditions are met:
1. They share the same operand and are in the same BB.
2. Both outputs are used.
3. The target has a native instruction that maps to ISD::FSINCOS node or
   the target provides a sincos library call.

Implemented the generic optimization in sdisel and enabled it for
Mac OSX. Also added an additional optimization for x86_64 Mac OSX by
using an alternative entry point __sincos_stret which returns the two
results in xmm0 / xmm1.

rdar://13087969
PR13204

llvm-svn: 173755
2013-01-29 02:32:37 +00:00
Bill Wendling
dcd0d9c27f Use an AttrBuilder to generate the correct AttributeSet.
We no longer accept an encoded integer as representing all of the
attributes. Convert this via the AttrBuilder class into an AttributeSet with the
correct representation (an AttributeSetImpl that holds a list of Attribute
objects).

llvm-svn: 173750
2013-01-29 01:43:29 +00:00
Bill Wendling
4754ae5130 Convert the AttrBuilder into a list of Attributes instead of one Attribute object that holds all of its attributes.
llvm-svn: 173742
2013-01-29 01:02:03 +00:00
Andrew Kaylor
8ba153558d Formatting correction
llvm-svn: 173739
2013-01-29 00:50:18 +00:00
Bill Wendling
2c8641d0f2 S'more small non-functional changes in comments and #includes.
llvm-svn: 173738
2013-01-29 00:48:16 +00:00
Bill Wendling
ddceb848ff Reorder some functions and add comments. No functionality change.
llvm-svn: 173733
2013-01-29 00:34:06 +00:00
Hal Finkel
05e5836d48 Unroll again after running BBVectorize
Because BBVectorize may significantly shorten a loop body, unroll
again after vectorization. This is especially important when using
runtime or partial unrolling.

llvm-svn: 173730
2013-01-29 00:22:49 +00:00
Hal Finkel
16067bcbfd Add isBGQ method to PPCSubtarget
This function will be used in future commits.

llvm-svn: 173729
2013-01-29 00:22:47 +00:00
Bill Wendling
a15e00ef6c Try to appease some broken compilers by using 'unsigned' instead of 'uint64_t'.
llvm-svn: 173725
2013-01-28 22:33:39 +00:00
Bill Wendling
1d30e7f569 Remove the AttributeWithIndex class.
The AttributeWithIndex class exposed the interior structure of the AttributeSet
class. That was gross. Remove it and all of the code that relied upon it.

llvm-svn: 173722
2013-01-28 21:55:20 +00:00
Andrew Kaylor
50e524dec5 Add support for source and line information to IntelJITEventListener for object emitted by MCJIT.
llvm-svn: 173712
2013-01-28 19:52:37 +00:00
Edwin Vane
f5f16d3262 Fix gcc/printf/ISO C++ warning
Remove the use of the 't' length modifier to avoid a gcc warning. Based
on usage, 32 bits of precision is good enough for printing a stack
offset for a stack trace.

't' length modifier isn't in C++03 but it *is* in C++11. Added a FIXME
to reintroduce once LLVM makes the switch to C++11.

Reviewer: gribozavr
llvm-svn: 173711
2013-01-28 19:34:42 +00:00
Bill Schmidt
28daa2bbf4 This patch addresses bug 15031.
The common code in the post-RA scheduler to break anti-dependencies on the
critical path contained a flaw.  In the reported case, an anti-dependency
between the overlapping registers %X4 and %R4 exists:

	%X29<def> = OR8 %X4, %X4
	%R4<def>, %X3<def,dead,tied3> = LBZU 1, %X3<kill,tied1>

The unpatched code breaks the dependency by replacing %R4 and its uses
with %R3, the first register on the available list.  However, %R3 and
%X3 overlap, so this creates two overlapping definitions on the same
instruction.

The fix is straightforward, preventing selection of a register that
overlaps any other defined register on the same instruction.

The test case is reduced from the bug report, and verifies that we no
longer produce "lbzu 3, 1(3)" when breaking this anti-dependency.

llvm-svn: 173706
2013-01-28 18:36:58 +00:00
Eric Christopher
a8f811de13 Fix comment.
llvm-svn: 173698
2013-01-28 17:33:26 +00:00
Renato Golin
7fe847b274 Vectorization Factor clarification
llvm-svn: 173691
2013-01-28 16:02:45 +00:00
Evgeniy Stepanov
b2af9f793f [msan] Mostly disable msan-handle-icmp-exact.
It is way too slow. Change the default option value to 0.
Always do exact shadow propagation for unsigned ICmp with constants, it is
cheap (under 1% cpu time) and required for correctness.

llvm-svn: 173682
2013-01-28 11:42:28 +00:00
Evgeniy Stepanov
3008b317bf Revert r173678.
Broken tests.

llvm-svn: 173679
2013-01-28 09:18:40 +00:00
Evgeniy Stepanov
01bbba2ef8 [msan] Make msan-handle-icmp-exact=0 by default.
50% slowdown on one of the specs.

llvm-svn: 173678
2013-01-28 09:15:15 +00:00
Craig Topper
8c275cea97 Fix 256-bit PALIGNR comment decoding to understand that it works on independent 256-bit lanes.
llvm-svn: 173674
2013-01-28 07:41:18 +00:00
Nadav Rotem
0229e2b96e A bugfix for tblgen, in the function ‘emitSourceFileHeader’.
When the first parameter (‘Desc’) is more than 80 characters long, it will result the header line that contains the description to be more
Than (4GB!) long. Not only it takes forever to produce, the output file cannot be open, since its ginormous.

Patch by Elior Malul.

llvm-svn: 173672
2013-01-28 07:35:33 +00:00
Craig Topper
e60d6ab3f8 Add missing break in 256-bit palignr comment printing. No test case yet because the comment itself is still wrong.
llvm-svn: 173669
2013-01-28 07:19:11 +00:00
Craig Topper
97391f52d3 Fix inconsistent usage of PALIGN and PALIGNR when referring to the same instruction.
llvm-svn: 173667
2013-01-28 06:48:25 +00:00
Michael Gottesman
998e1da974 Created ObjCARCUtil.cpp for functions which in my humble opinion are too large to static inline and place in a header file such as ObjCARC.h.
llvm-svn: 173666
2013-01-28 06:39:31 +00:00
Craig Topper
493bcfb933 Remove addToNoHelperNeeded function that was left unused after r173649. Fixes a -Wunused warning.
llvm-svn: 173664
2013-01-28 06:09:24 +00:00
Michael Gottesman
ad3bed037a Cleaned up includes in various ObjCARC files and removed some whitespace violations.
llvm-svn: 173663
2013-01-28 05:51:58 +00:00
Michael Gottesman
86d4759cc7 Refactor ObjCARCAliasAnalysis into its own file.
llvm-svn: 173662
2013-01-28 05:51:54 +00:00
Bill Wendling
fbc4fffb48 Mid-air collision. reapply r173656.
llvm-svn: 173661
2013-01-28 05:51:40 +00:00
Bill Wendling
29a48a09e5 Rewrite the removeAttr() method.
This now uses the AttributeSet object instead of the Attribute /
AttributeWithIndex objects. It's fairly simple now. It goes through all of the
subsets before the one we're modifying, adds them to the new set. It then adds
the modified subset (with the requested attributes removed). And then adds the
rest of the subsets.

llvm-svn: 173660
2013-01-28 05:44:14 +00:00