Commit Graph

74578 Commits

Author SHA1 Message Date
Bill Wendling 919b7aab2e Add more plumbing. This time in the LowerArguments and "get" functions which
return partial registers. This affected the back-end lowering code some.

Also patch up some places I missed before in the "get" functions.

llvm-svn: 91880
2009-12-22 02:10:19 +00:00
Sean Callanan 2f9443f422 Changed REG_* to MODRM_REG_* to avoid conflicts
with symbols in AuroraUX's global namespace.

llvm-svn: 91879
2009-12-22 02:07:42 +00:00
Daniel Dunbar 8b532de418 Fix some may-be-uninitialized var warnings.
llvm-svn: 91878
2009-12-22 01:41:37 +00:00
Chris Lattner 3d1205b3a8 fix unit test that I broke.
llvm-svn: 91877
2009-12-22 01:38:23 +00:00
Bill Wendling ac08758b71 Add SDNode ordering to inlined asm and VA functions.
llvm-svn: 91876
2009-12-22 01:25:10 +00:00
Eric Christopher ab6a0d60d5 Whitespace fixes.
llvm-svn: 91875
2009-12-22 01:23:51 +00:00
Daniel Dunbar 3780f0b680 x86_64: Structures with no fields but which have padding should be classified as
integer.
 - This is consistent, but may not be correct. I will revisit x86_64 ABI handling for C++ as a whole at some point.
 - PR5831.

llvm-svn: 91874
2009-12-22 01:19:25 +00:00
Chris Lattner 18d8b7575e types don't need atomic inc/dec, they are local to an llvmcontext.
llvm-svn: 91873
2009-12-22 01:17:43 +00:00
Bill Wendling f376c40d0e Adding more assignment of ordering to SDNodes. This time in the "call" and
generic copy functions.

llvm-svn: 91872
2009-12-22 01:11:43 +00:00
Sean Callanan 5c8f4cd396 Fixed library dependencies between the X86 disassembler and
X86 codegen that were causing circular symbol dependencies.

llvm-svn: 91871
2009-12-22 01:11:26 +00:00
Douglas Gregor da8cdbce35 Centralize the emission/suppression/delay of diagnostics describing runtime before in the new function Sema::DiagRuntimeBehavior, addressing one of Chris' comments.
llvm-svn: 91870
2009-12-22 01:01:55 +00:00
Chris Lattner 2ee6787c1b avoid calling extractMallocCall when it's obvious we don't have
a call.  This speeds up memdep ~1.5%

llvm-svn: 91869
2009-12-22 01:00:32 +00:00
John McCall 463e10cbd5 Stop diagnosing the use of inner classes as friends. ddunbar asked whether
this was useful, and on review Doug and I decided it was probably on the level
of a bug in the standard and therefore not worth a warning even in -pedantic.
If someone disagrees and urgently wants clang++ to warn about this in strict
c++98 mode, we can talk about it.

llvm-svn: 91868
2009-12-22 00:59:39 +00:00
Chris Lattner 84463813a1 comment fix: weakvh -> tracking vh
llvm-svn: 91867
2009-12-22 00:51:57 +00:00
Bill Wendling a4d7df7a37 Add ordering of SDNodes to LowerCallTo.
llvm-svn: 91866
2009-12-22 00:50:32 +00:00
Fariborz Jahanian 8120346c57 Template code for rewrite of __block variables - wip.
llvm-svn: 91865
2009-12-22 00:48:54 +00:00
Chris Lattner 6211d7ba4b print pcrel immediates as signed values instead of unsigned so that we
get things like this out of the disassembler:

0x100000ecb: callq	-96

instead of:

0x100000ecb: callq	4294967200

rdar://7491123

llvm-svn: 91864
2009-12-22 00:44:05 +00:00
Bill Wendling b99b2693f3 Now add ordering to SDNodes created by the massive intrinsic lowering function.
llvm-svn: 91863
2009-12-22 00:40:51 +00:00
Douglas Gregor 507eb87f05 Eliminate the ASTContext argument to CXXConstructorDecl::isCopyConstructor, since the context is available in the Decl
llvm-svn: 91862
2009-12-22 00:34:07 +00:00
Douglas Gregor 4141d5bea2 When converting from a type to itself or one of its base classes via a
constructor call, the conversion is only a standard conversion
sequence if that constructor is a copy constructor. This fixes PR5834
in a semi-lame way, because the "real" fix will be to move over to
InitializationSequence. That will happen "soonish", but not now.

llvm-svn: 91861
2009-12-22 00:21:20 +00:00
Bill Wendling ea3e73e596 To make things interesting, I added MORE code to set the ordering of
SDNodes. This time in the load/store and limited-precision code.

llvm-svn: 91860
2009-12-22 00:12:37 +00:00
Lang Hames 4c052261de Changed slot index ranges for MachineBasicBlocks to be exclusive of endpoint.
This fixes an in-place update bug where code inserted at the end of basic blocks may not be covered by existing intervals which were live across the entire block. It is also consistent with the way ranges are specified for live intervals.

llvm-svn: 91859
2009-12-22 00:11:50 +00:00
Douglas Gregor 2bb0765bb4 When filling in value initializations within an initializer list, be
sure to fill in the initialized member of a union when a member was
explicitly designated. Fixes PR5843.

llvm-svn: 91858
2009-12-22 00:05:34 +00:00
Bill Wendling c6b473433b Add more plumbing to assign ordering to SDNodes. Have the "getValue" method
assign the ordering when called. Combine some of the ordering assignments to
keep things simple.

llvm-svn: 91857
2009-12-21 23:47:40 +00:00
Fariborz Jahanian e175eeb117 Providing support for rewriting of block copy/dispose of
imported block variables. WIP.

llvm-svn: 91856
2009-12-21 23:31:42 +00:00
Daniel Dunbar 0def3d17cb ARM: Honor -mfpu= and set __VFP_FP__ and __ARM_NEON__ "correctly".
- Correctly is in quotes, because we are following what I interpreted as GCC's
   intent (which diverges from practice, naturally).
 - Also, fix the arch define for arm1136jf-s.

llvm-svn: 91855
2009-12-21 23:28:17 +00:00
Daniel Dunbar 01ba2a765b Improve updating of test/Makefile for out-of-dir builds.
llvm-svn: 91854
2009-12-21 23:28:06 +00:00
Daniel Dunbar c661a2d4d8 Add suggested parentheses.
llvm-svn: 91853
2009-12-21 23:27:57 +00:00
Douglas Gregor 8364e6b568 When a template-id refers to a single function template, and the
explicitly-specified template arguments are enough to determine the
instantiation, and either template argument deduction fails or is not
performed in that context, we can resolve the template-id down to a
function template specialization (so sayeth C++0x
[temp.arg.explicit]p3). Fixes PR5811.

llvm-svn: 91852
2009-12-21 23:17:24 +00:00
Chris Lattner bf20018423 Add a fastpath to Load GVN to special case when we have exactly one dominating
load to avoid even messing around with SSAUpdate at all.  In this case (which
is very common, we can just use the input value directly).

This speeds up GVN time on gcc.c-torture/20001226-1.c from 36.4s to 16.3s,
which still isn't great, but substantially better and this is a simple speedup
that applies to lots of different cases.

llvm-svn: 91851
2009-12-21 23:15:48 +00:00
Bill Wendling e79105b591 More ordering plumbing. This time for GEP. I need to remember to assign
orderings to values returned by getValue().

llvm-svn: 91850
2009-12-21 23:10:19 +00:00
Chris Lattner 927b0ac4b2 refactor some code out to a new helper method.
llvm-svn: 91849
2009-12-21 23:04:33 +00:00
Chris Lattner eaa25da8bb improve indentation avoid a pointless conversion from weakvh to trackingvh,
no functionality change.

llvm-svn: 91848
2009-12-21 22:43:03 +00:00
Bill Wendling fff99f066b Another incremental check-in for assigning ordering to SDNodes. This time for
shuffle and insert vector.

llvm-svn: 91847
2009-12-21 22:42:14 +00:00
Bill Wendling 443d0722b0 Assign ordering to more instructions. Incremental check-in.
llvm-svn: 91846
2009-12-21 22:30:11 +00:00
Bill Wendling 28727f3785 - Add a bit more plumbing assigning an order to SDNodes.
- Modify the "dump" method to emit the order of an SDNode.

llvm-svn: 91845
2009-12-21 21:59:52 +00:00
Douglas Gregor 3985791d62 Introduce an assertion to ensure that template argument deduction does
not deduce an "overload" type. Such a deduction indicates a failure in
semantic analysis  (e.g., PR5811) that currently isn't caught until
code-generation time. This assertions makes it clearer that this
particular issue is a semantic-analysis problem, not a code-gen problem.

llvm-svn: 91844
2009-12-21 21:27:38 +00:00
David Greene dbf7074296 Fix a bug in !subst where TableGen would go and resubstitute text it had
just substituted.  This could cause infinite looping in certain
pathological cases.

llvm-svn: 91843
2009-12-21 21:21:34 +00:00
Anton Korobeynikov 131420c5d7 Remove uber-gross hack. The define _snprintf to snprintf is invalid due to two reasons: 1. Accroding to C++ standard snprintf should be available in std namespace (and __gnu_cxx in case of GCC to). Such ifdef will change all snprintf's to _snprintf's, but won't bring snprintf to all necessary namespaces. Thus e.g. any locale-using code on mingw will yield an error (include this file + string to see the result) 2. MSVCRT's _snprintf does not comply with C99 standard. Standard one is snprintf.
llvm-svn: 91842
2009-12-21 20:19:37 +00:00
Anton Korobeynikov 3e9e87a9cb Mark FPW as allocable when frame address is taken.
llvm-svn: 91841
2009-12-21 20:18:49 +00:00
Douglas Gregor 0f139a1df1 Improve on my previous fix for debug information. Rather than
recursing in CGDebugInfo::CreateTypeNode, teach
CanonicalizeTypeForDebugInfo---now called UnwrapTypeForDebugInfo---to
keep unwrapping the type until we hit something that can be
represented by debug information. Thanks to Anders for pointing this out!

llvm-svn: 91840
2009-12-21 20:18:30 +00:00
Bill Wendling 7f5eb53ce2 First wave of plumbing for assigning an ordering to SDNodes. This takes care of
a lot of the branching instructions.

llvm-svn: 91838
2009-12-21 19:59:38 +00:00
Douglas Gregor 0915b43ac2 Teach debug info generation to handle TemplateSpecializationType,
ElaboratedType, QualifiedNameType, and SubstTemplateTypeParmType type
nodes. Also, produce an "unsupported" diagnostic for C++0x type nodes
and "typeof" nodes, rather than asserting nondescriptly.

llvm-svn: 91837
2009-12-21 19:57:21 +00:00
Evan Cheng db4d798619 Delete the instruction just before the function terminates for consistency sake.
llvm-svn: 91836
2009-12-21 19:53:39 +00:00
Bill Wendling 6de55a0efd Place SDNodeOrdering.h in the directory it's used.
llvm-svn: 91834
2009-12-21 19:34:59 +00:00
Daniel Dunbar 083edf70a5 Add ToolChain::getDriver() and use it instead of going through the HostInfo
object.

llvm-svn: 91830
2009-12-21 18:54:17 +00:00
Bob Wilson 88a0598fe8 Remove special-case SROA optimization of variable indexes to one-element and
two-element arrays.  After restructuring the SROA code, it was not safe to
do this without adding more checking.  It is not clear that this special-case
has really been useful, and removing this simplifies the code quite a bit.

llvm-svn: 91828
2009-12-21 18:39:47 +00:00
Fariborz Jahanian ffc420cb51 Allow comparison of 'void *' with function pointer
as a g++ extension (fixes radar 7481987).

llvm-svn: 91827
2009-12-21 18:19:17 +00:00
Daniel Dunbar 0fc1f6c595 XFAIL these tests on powerpc, under the assumption that no one cares. If you care, feel free to fix.
llvm-svn: 91826
2009-12-21 17:31:59 +00:00
John McCall b5a0d316dc Reorganize the base-lookup bits of ActOnMemInitializer in order to better
support diagnostics and error recovery.

llvm-svn: 91825
2009-12-21 10:41:20 +00:00