Commit Graph

86302 Commits

Author SHA1 Message Date
Howard Hinnant cdefdeee28 two steps forward, one step back...
llvm-svn: 107230
2010-06-30 00:21:42 +00:00
Douglas Gregor 4799d03ce8 Implement C++ DR299, which allows an implicit conversion from a class
type to an integral or enumeration type in the size of an array new
expression, e.g.,

  new int[ConvertibleToInt(10)];

This is a GNU and C++0x extension.

llvm-svn: 107229
2010-06-30 00:20:43 +00:00
Devang Patel 648df7bf64 Add variables into a scope before constructing scope DIE otherwise variables won't be included DIE tree.
llvm-svn: 107228
2010-06-30 00:11:08 +00:00
Jakob Stoklund Olesen f888911932 Begin implementation of an inline spiller.
InlineSpiller inserts loads and spills immediately instead of deferring to
VirtRegMap. This is possible now because SlotIndexes allows instructions to be
inserted and renumbered.

This is work in progress, and is mostly a copy of TrivialSpiller so far. It
works very well for functions that don't require spilling.

llvm-svn: 107227
2010-06-29 23:58:39 +00:00
Chandler Carruth 9c9286b531 Retain the source location of the constructor when building an implicit member
initialization. I tried several ideas but couldn't come up with a test case for
this that didn't rely on a Clang bug to report a diagnostic after template
instantiation of the constructor due to the implicit initializers. Suggestions
welcome. This fixes the source location aspect of PR7402.

llvm-svn: 107226
2010-06-29 23:50:44 +00:00
Bruno Cardoso Lopes 3f71ddfaad Add *several* AVX integer packed binop instructions
llvm-svn: 107225
2010-06-29 23:47:49 +00:00
Dan Gohman ae36b1ed42 Fix ScalarEvolution's tripcount computation for chains of loops
where each loop's induction variable's start value is the exit
value of a preceding loop.

llvm-svn: 107224
2010-06-29 23:43:06 +00:00
Douglas Gregor 5823da3ab0 Re-improve recovery when the condition of a switch statement does not
have integral or enumeration type, so that we still check the contents
of the switch body. My previous patch made this worse; now we're back
to where we were previously.

llvm-svn: 107223
2010-06-29 23:25:20 +00:00
Douglas Gregor f4ea725d38 Factor the conversion from a switch condition to an integral or
enumeration type out into a separate, reusable routine. The only
functionality change here is that we recover a little more
aggressively from ill-formed switch conditions.

llvm-svn: 107222
2010-06-29 23:17:37 +00:00
Johnny Chen 94a6899e23 Add some delay before calling SBDebugger.Terminate().
llvm-svn: 107221
2010-06-29 23:17:15 +00:00
Johnny Chen cb9b857959 Added TestArrayTypes.py for test/array_types directory.
Also modified dotest.py so that it sets the LLDB_TEST environment variable
so that individual test cases can locate their supporting files correctly.

llvm-svn: 107220
2010-06-29 23:10:39 +00:00
Argyrios Kyrtzidis 74d28bd084 Support C++ friend declarations for PCH.
This commit 'introduces' a slightly different way to restore the state of the AST object.
It makes PCHDeclReader/PCHDeclWriter friends and gives them access to the private members of the object.
The rationale is to avoid using/modifying the AST interfaces for PCH read/write so that to:

-Avoid complications with objects that have side-effects during creation or when using some setters.
-Not 'pollute' the AST interface with methods only used by the PCH reader/writer
-Allow AST objects to be read-only.

llvm-svn: 107219
2010-06-29 22:47:00 +00:00
Argyrios Kyrtzidis 26d7201d5d When we know that we are at sub-statement reading (which is all of PCHStmtReader) use the "faster" ReadSubStmt. No functionality change.
llvm-svn: 107218
2010-06-29 22:46:25 +00:00
Daniel Dunbar 8c94ffe776 IRgen: Assignment to Objective-C properties shouldn't reload the value, for
complex values either. Previously we did this properly for regular assignment,
but not for compound assignment.
 - Also, tidy up assignment code a bit to look more like the scalar path.

llvm-svn: 107217
2010-06-29 22:44:21 +00:00
Chris Lattner 466b1419c6 fix PR7523, which was caused by the ABI code calling ConvertType instead
of ConvertTypeRecursive when it needed to in a few cases, causing pointer
types to get resolved at the wrong time.

llvm-svn: 107216
2010-06-29 22:39:04 +00:00
Bill Wendling 3632171750 Revert r107205 and r107207.
llvm-svn: 107215
2010-06-29 22:34:52 +00:00
Devang Patel be30551600 Print InlinedAt location.
llvm-svn: 107214
2010-06-29 22:29:15 +00:00
Eric Christopher e34471bb31 Add another bswap idiom that isn't matched.
llvm-svn: 107213
2010-06-29 22:22:22 +00:00
Bill Wendling 7839c493e8 Use -l option to remove symbols from i386.
llvm-svn: 107212
2010-06-29 22:17:37 +00:00
Bruno Cardoso Lopes 7fee95a38e Move SSE2 Packed Integer instructions around, and create specific sections for each of them
llvm-svn: 107211
2010-06-29 22:12:16 +00:00
Daniel Dunbar c85ea8e175 IRgen: Assignment to Objective-C properties shouldn't reload the value (which
would trigger an extra method call).
 - While in the area, I also changed Clang to not emit an unnecessary load from
   'x' in cases like 'y = (x = 1)'.

llvm-svn: 107210
2010-06-29 22:00:45 +00:00
Ted Kremenek 090d62e7cc Tweaker Checker::VisitEndAnalysis to have 'hasWorkRemaining' also
be true if some paths were aborted because they exceeded
the maximum loop unrolling count.

llvm-svn: 107209
2010-06-29 21:58:54 +00:00
Devang Patel c728518bfe Print InlinedAt location.
llvm-svn: 107208
2010-06-29 21:51:32 +00:00
Bill Wendling 7d7a50a0ae Improve explanation.
llvm-svn: 107207
2010-06-29 21:41:58 +00:00
Bruno Cardoso Lopes ba21eb8054 Add AVX Move Aligned/Unaligned packed integers
llvm-svn: 107206
2010-06-29 21:25:12 +00:00
Bill Wendling 1767723dbe Introducing the "linker_weak" linkage type. This will be used for Objective-C
metadata types which should be marked as "weak", but which the linker will
remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is
defined like this:

       .globl l_objc_msgSend_fixup_alloc
       .weak_definition l_objc_msgSend_fixup_alloc
       .section __DATA, __objc_msgrefs, coalesced
       .align 3
l_objc_msgSend_fixup_alloc:
        .quad   _objc_msgSend_fixup
        .quad   L_OBJC_METH_VAR_NAME_1

This is different from the "linker_private" linkage type, because it can't have
the metadata defined with ".weak_definition".

llvm-svn: 107205
2010-06-29 21:24:00 +00:00
Bruno Cardoso Lopes 30689a3a7f Add AVX ld/st XCSR register.
Add VEX encoding bits for MRMXm x86 form

llvm-svn: 107204
2010-06-29 20:35:48 +00:00
Ted Kremenek 3f1240b614 Add test case for <rdar://problem/4289832>. Clang actuallys gets
the test case right (for the noreturn warning) because the CFG
doesn't support @try yet, but the test case is now present when
we do properly implement CFG support for @try...@catch.

llvm-svn: 107203
2010-06-29 20:25:42 +00:00
Devang Patel 24bc1b5b2f Do not hardcode DW_AT_stmt_list value.
Inspired by Artur Pietrek.

llvm-svn: 107202
2010-06-29 20:17:53 +00:00
Bob Wilson be157b0ea8 Add support for encoding VDUP (ARM core register) instructions.
llvm-svn: 107201
2010-06-29 20:13:29 +00:00
Duncan Sands 29933505b6 Fix a buffer overflow noticed by gcc-4.6: zero is written into
SmallArray[SmallSize] in the SmallPtrSetIteratorImpl, and this is
one off the end of the array.  For those who care, right now gcc
warns about writing off the end because it is confused about the
declaration of SmallArray as having length 1 in the parent class
SmallPtrSetIteratorImpl.  However if you tweak code to unconfuse
it, then it still warns about writing off the end of the array,
because of this buffer overflow.  In short, even with this fix
gcc-4.6 will warn about writing off the end of the array, but now
that is only because it is confused.

llvm-svn: 107200
2010-06-29 20:12:02 +00:00
Duncan Sands 585c38e776 NextPowerOfTwo was already used to ensure that SmallSizePowTwo is a power
of two, no need to do it a second time (NextPowerOfTwo is idempotent).

llvm-svn: 107199
2010-06-29 20:05:34 +00:00
Johnny Chen 4657be6e63 For the time being, let's bracket the test runner within the
lldb.SBDebugger.Initialize()/Terminate() pair.

Change TestHelp.py to use synchronous debugging, which is easier to work with.

llvm-svn: 107198
2010-06-29 19:44:16 +00:00
Douglas Gregor c048c52734 When typo correction produces a result that is not of the kind we're
looking for, reset the name within the LookupResult structure in
addition to clearing out the results. Fixes PR7508.

llvm-svn: 107197
2010-06-29 19:27:42 +00:00
Chris Lattner cccaad9584 change ABIArgInfo to hold its llvm type with PATypeHolder so that
it doesn't dangle as types get refined.  This fixes Shootout-C++/lists1
and probably also PR7522.

llvm-svn: 107196
2010-06-29 19:21:36 +00:00
Chris Lattner 3f617c1125 give PATypeHolder an explicit copy ctor which initializes the type pointer,
and make PATypeHolder work with null pointers.

The implicitly generated one didn't work on numerous levels, but was still
accepted, allowing all sorts of bugs with default constructed pa type holders.

Previously, they "sort of" worked if they were default constructed and then
destructed.  Now they really work, and you can even default construct one,
then assign to it, amazing.

llvm-svn: 107195
2010-06-29 19:20:38 +00:00
Douglas Gregor 6969fb73ca Fix broken testcase
llvm-svn: 107194
2010-06-29 19:17:14 +00:00
Jakob Stoklund Olesen dadea5b178 Fix the handling of partial redefines in the fast register allocator.
A partial redefine needs to be treated like a tied operand, and the register
must be reloaded while processing use operands.

This fixes a bug where partially redefined registers were processed as normal
defs with a reload added. The reload could clobber another use operand if it was
a kill that allowed register reuse.

llvm-svn: 107193
2010-06-29 19:15:30 +00:00
Douglas Gregor 9629e9ac3e Typo correction for namespace alias definitions
llvm-svn: 107191
2010-06-29 18:55:19 +00:00
Bob Wilson d91d5bfc95 Fix a register scavenger crash when dealing with undefined subregs.
The LowerSubregs pass needs to preserve implicit def operands attached to
EXTRACT_SUBREG instructions when it replaces those instructions with copies.

llvm-svn: 107189
2010-06-29 18:42:49 +00:00
Howard Hinnant e5561b04e4 [re.submatch]
llvm-svn: 107187
2010-06-29 18:37:43 +00:00
Daniel Dunbar 99e13101b2 tests: Fix test to not depend on instruction names.
llvm-svn: 107186
2010-06-29 18:34:40 +00:00
Daniel Dunbar f35e76552f Sema: Fix a subtle i64 -> i32 truncation which broke layout of large structures
with bit-fields.

llvm-svn: 107185
2010-06-29 18:34:35 +00:00
Bruno Cardoso Lopes a4575f5b31 Add AVX non-temporal stores
llvm-svn: 107178
2010-06-29 18:22:01 +00:00
Dan Gohman 9bbd007f15 Add a few more interesting testcases.
llvm-svn: 107177
2010-06-29 18:17:11 +00:00
Chris Lattner 34d6281ae5 relax the CGFunctionInfo::CGFunctionInfo ctor to allow any sequence
of CanQualTypes to be passed in.

llvm-svn: 107176
2010-06-29 18:13:52 +00:00
Dan Gohman 1be9e7c0b6 Fix whitespace style.
llvm-svn: 107175
2010-06-29 18:12:34 +00:00
Fariborz Jahanian 66f9a6560e This patch fixes a bug whereby, clang skipped
unimplemented property warning for properties 
coming from class's conformin protocol. It also
simplifies the algorithm in the process.
Fixes radar 8035776.

llvm-svn: 107174
2010-06-29 18:12:32 +00:00
Chris Lattner ab1e65e2ea fix PR7519: after thrashing around and remembering how all this stuff
works, the fix is quite simple: just make sure to call ConvertTypeRecursive
when the function type being lowered is in the midst of ConvertType.

llvm-svn: 107173
2010-06-29 17:56:33 +00:00
Douglas Gregor cdf87024ed Allow a using directive to refer to the implicitly-defined namespace
"std", with a warning, to improve GCC compatibility. Fixes PR7517.

As a drive-by, add typo correction for using directives.

llvm-svn: 107172
2010-06-29 17:53:46 +00:00