Commit Graph

94865 Commits

Author SHA1 Message Date
Douglas Gregor b37c9af75d When producing overload candidates for binary built-in operators, keep
the sets of available conversions for the first and second arguments
separate. This is apparently the indent of C++ [over.built], and
reduces the number of overload candidates generated, eliminating some
ambiguities. Fixes PR8477.

llvm-svn: 118178
2010-11-03 17:00:07 +00:00
Bob Wilson 7d0ac84abd Add codegen patterns for VST1-lane instructions. Radar 8599955.
llvm-svn: 118176
2010-11-03 16:24:53 +00:00
Bob Wilson ceb49296ef Check for extractelement with a variable operand for the element number.
For NEON we had been assuming this was always an immediate constant.

llvm-svn: 118175
2010-11-03 16:24:50 +00:00
Mikhail Glushenkov b8211b80bc Rename FindExecutable to PrependMainExecutablePath.
Makes it more clear that it is just a path manipulation function.

llvm-svn: 118174
2010-11-03 16:14:16 +00:00
Mikhail Glushenkov 189c6c687c 80-col violations, trailing whitespace.
llvm-svn: 118173
2010-11-03 16:14:07 +00:00
David Chisnall e8431a7766 Some fixes for synthesized ivar metadata (GNU runtime).
llvm-svn: 118172
2010-11-03 16:12:44 +00:00
Duncan Sands 9d1fe4c40d Rename PointsToLocalMemory to PointsToLocalOrConstantMemory to make
the code more self-documenting.

llvm-svn: 118171
2010-11-03 14:45:05 +00:00
David Chisnall b2aa0ef310 Added cursor visitor that takes a block as an argument. Tested compiling
libclang with both clang -fblocks and gcc (no blocks support).  Only exposed in
the header to compilers that do have blocks support.

llvm-svn: 118170
2010-11-03 14:12:26 +00:00
Duncan Sands 1462777017 Simplify uses of MVT and EVT. An MVT can be compared directly
with a SimpleValueType, while an EVT supports equality and
inequality comparisons with SimpleValueType.

llvm-svn: 118169
2010-11-03 12:17:33 +00:00
Duncan Sands 900edd4b54 Fix a comment typo.
llvm-svn: 118168
2010-11-03 11:55:03 +00:00
Duncan Sands f5dda01f33 Inside the calling convention logic LocVT is always a simple
value type, so there is no point in passing it around using
an EVT.  Use the simpler MVT everywhere.  Rather than trying
to propagate this information maximally in all the code that
using the calling convention stuff, I chose to do a mainly
low impact change instead.

llvm-svn: 118167
2010-11-03 11:35:31 +00:00
Zhongxing Xu 0806da8f28 fix test case.
llvm-svn: 118166
2010-11-03 11:24:56 +00:00
Zhongxing Xu fb2f8164ae Do not add elidable CXXConstructExpr as block-level expr.
llvm-svn: 118165
2010-11-03 11:14:06 +00:00
Eric Christopher fcc9e6848a If we have an undef mask our Elt will be -1 for our access, handle
this by using an undef as a pointer.

Fixes rdar://8625016

llvm-svn: 118164
2010-11-03 09:36:40 +00:00
Duncan Sands 8eb254aed6 Fix typo, pointed out by Trevor Harmon.
llvm-svn: 118163
2010-11-03 08:16:50 +00:00
Evan Cheng 8740ee3637 Fix preload instruction isel. Only v7 supports pli, and only v7 with mp extension supports pldw. Add subtarget attribute to denote mp extension support and legalize illegal ones to nothing.
llvm-svn: 118160
2010-11-03 06:34:55 +00:00
Marcin Swiderski 3ab17ad8ec Added generating destructors for temporary objects. Two cases I know of, that are not handled properly:
1. For statement: const C& c = C(0) ?: C(1) destructors generated for condition will not differ from those generated for case without prolonged lifetime of temporary,
2. There will be no destructor for constant reference member bound to temporary at the exit from constructor.

llvm-svn: 118158
2010-11-03 06:19:35 +00:00
Evan Cheng 6f36042557 Add support to match @llvm.prefetch to pld / pldw / pli. rdar://8601536.
llvm-svn: 118152
2010-11-03 05:14:24 +00:00
Bill Wendling 6552a109bb Put the PC encoding in the correct bit position.
llvm-svn: 118151
2010-11-03 04:57:44 +00:00
Rafael Espindola b2cbd85be8 Revert while I debug test failures :-(
llvm-svn: 118150
2010-11-03 04:43:56 +00:00
Rafael Espindola c5dfb607f5 Switch clang to run ld directly on linux. I tested this on all the linux
distros listed by running

gcc main.o -o main
g++ main.o -o main
gcc main.o -o main -static
g++ main.o -o main -static
gcc f.o -o f.so -shared
g++ f.o -o f.so -shared

and comparing the ld line with the one created by clang. I also added
-m32/m64 in distros that support it.

While I tested many distros, there will always be more. If you are hit by this
it should be somewhat easy to add your distro. If you are in a hurry, do
revert this, but please inform how to detect you distro and the ld command
lines produced by the above gcc invocations. Most distros have some patches
on gcc :-(

llvm-svn: 118149
2010-11-03 04:37:51 +00:00
Eric Christopher c63d846ad6 Invert these branches by default, it makes assembly comparisons a little
easier to read.

llvm-svn: 118148
2010-11-03 04:29:11 +00:00
Greg Clayton 6ba508507e Fixed shared library unloads when the unloaded library doesn't come off
the end of the list. We had an issue in the MacOSX dynamic loader where if
we had shlibs:
1 - a.out
2 - a.dylib
3 - b.dylib

And then a.dylib got unloaded, we would unload b.dylib due to the assumption
that only shared libraries could come off the end of the list. We now properly
search and find which ones get loaded.

Added a new internal logging category for the "lldb" log channel named "dyld".
This should allow all dynamic loaders to use this as a generic log channel so
we can track shared library loads and unloads in the logs without having to 
have each plug-in make up its own logging channel.

llvm-svn: 118147
2010-11-03 04:08:06 +00:00
Anders Carlsson 2d5f8b4201 When setting a tied check if it's already tied. If it's tied to another constraint it's invalid. Fixes PR3905.
llvm-svn: 118146
2010-11-03 02:54:51 +00:00
Anders Carlsson da1f5fc881 A number in an input constraint can't point to a read-write ('+') constraint. Fixes PR3904.
llvm-svn: 118145
2010-11-03 02:22:29 +00:00
Bill Wendling e84eb99cbb The MC code couldn't handle ARM LDR instructions with negative offsets:
vldr.64 d1, [r0, #-32]

The problem was with how the addressing mode 5 encodes the offsets. This change
makes sure that the way offsets are handled in addressing mode 5 is consistent
throughout the MC code. It involves re-refactoring the "getAddrModeImmOpValue"
method into an "Imm12" and "addressing mode 5" version. But not to worry! The
majority of the duplicated code has been unified.

llvm-svn: 118144
2010-11-03 01:49:29 +00:00
Dan Gohman 68fb004616 Fix DAGCombiner to avoid going into an infinite loop when it
encounters (and:i64 (shl:i64 (load:i64), 1), 0xffffffff).
This fixes rdar://8606584.

llvm-svn: 118143
2010-11-03 01:47:46 +00:00
Sean Callanan 6db73ca5e2 Modified the thread plan that calls functions to
set breakpoints at the different locations where
an exception could be thrown, so that exceptions
thrown by expressions are properly caught.

llvm-svn: 118142
2010-11-03 01:37:52 +00:00
Jim Grosbach fd96701456 Remove unused function.
llvm-svn: 118141
2010-11-03 01:35:15 +00:00
Jim Grosbach e7f7de95e0 Remove the no longer used 'Modifier' optional operand to the ARM
printOperand() asm printer helper functions. rdar://8425198

llvm-svn: 118140
2010-11-03 01:11:15 +00:00
Jim Grosbach 50ba3c09bf Remove unused function.
llvm-svn: 118139
2010-11-03 01:07:48 +00:00
Alexis Hunt a56cbccfc4 Provide an error when a non-identifier name (such as an operator) is used as a
parameter name.

Fixes PR8012.

llvm-svn: 118138
2010-11-03 01:07:06 +00:00
Jim Grosbach c6af2b4066 Break ARM addrmode4 (load/store multiple base address) into its constituent
parts. Represent the operation mode as an optional operand instead.
rdar://8614429

llvm-svn: 118137
2010-11-03 01:01:43 +00:00
Evan Cheng debf9c502a Two sets of changes. Sorry they are intermingled.
1. Fix pre-ra scheduler so it doesn't try to push instructions above calls to
   "optimize for latency". Call instructions don't have the right latency and
   this is more likely to use introduce spills.
2. Fix if-converter cost function. For ARM, it should use instruction latencies,
   not # of micro-ops since multi-latency instructions is completely executed
   even when the predicate is false. Also, some instruction will be "slower"
   when they are predicated due to the register def becoming implicit input.
   rdar://8598427

llvm-svn: 118135
2010-11-03 00:45:17 +00:00
Evan Cheng 634ab6c2b7 Modify scheduling itineraries to correct instruction latencies (not operand
latencies) of loads.

llvm-svn: 118134
2010-11-03 00:40:22 +00:00
Dan Gohman edc76749b3 Factor code out of APInt to form a isUIntN helper function.
llvm-svn: 118133
2010-11-03 00:38:40 +00:00
Douglas Gregor 15417cfa56 Improve source-location information for CXXConstructExpr nodes, by
ensuring that they cover all of their child nodes. There's still a
clang_getCursor()-related issue with CXXFunctionalCastExprs with
CXXConstructExprs as children (see FIXME in the test case); I'll look
at that separately.

llvm-svn: 118132
2010-11-03 00:35:38 +00:00
Chris Lattner 3e6c919469 fix typo, patch by Trevor Harmon (PR8537)
llvm-svn: 118131
2010-11-03 00:30:29 +00:00
Dan Gohman 0baea2aa1b Print an error as one big string instead of breaking it up.
llvm-svn: 118130
2010-11-03 00:24:33 +00:00
Johnny Chen b2d4f7f20e Add more comment for dumpSessionInfo(self) method.
llvm-svn: 118129
2010-11-03 00:09:38 +00:00
Dan Gohman a3bb142db6 Delete unused variables.
llvm-svn: 118128
2010-11-03 00:09:12 +00:00
Dan Gohman ecc4d73498 Remove several unhelpful checks for isValid from sys::Path.
llvm-svn: 118127
2010-11-03 00:01:23 +00:00
Eric Christopher 1e43892e4b Make sure we're only storing a single bit here.
llvm-svn: 118126
2010-11-02 23:59:09 +00:00
Chris Lattner 9c9bfb6870 per a suggestion by Frits van Bommel, mark all MBlaze Pseudo
instructions as isCodeGenOnly in the parent class instead of
sprinkling it throughout the .td files.

llvm-svn: 118125
2010-11-02 23:57:05 +00:00
Chris Lattner 11d21e8e78 chase owen.
llvm-svn: 118124
2010-11-02 23:55:24 +00:00
Sean Callanan 951f6ce903 Fixed a bug where we left a definition hanging
for a global variable that we had replaced with
a reference to a slot in the input array.

llvm-svn: 118123
2010-11-02 23:51:17 +00:00
Chris Lattner d0502c1777 tweak this to pass.
llvm-svn: 118122
2010-11-02 23:50:17 +00:00
Owen Anderson 0ebd1fd594 Revert r118097 to fix buildbots.
llvm-svn: 118121
2010-11-02 23:47:29 +00:00
Chris Lattner daf7a2a7de temporarily xfail this.
llvm-svn: 118120
2010-11-02 23:44:50 +00:00
Chris Lattner cc5dce89d4 Completely reject instructions that have an operand in their
ins/outs list that isn't specified by their asmstring.  Previously
the asmmatcher would just force a 0 register into it, which clearly
isn't right.  Mark a bunch of ARM instructions that use this as 
isCodeGenOnly.  Some of them are clearly pseudo instructions (like
t2TBB) others use a weird hasExtraSrcRegAllocReq thing that will
either need to be removed or the asmmatcher will need to be taught
about it (someday).

llvm-svn: 118119
2010-11-02 23:40:41 +00:00