Commit Graph

72413 Commits

Author SHA1 Message Date
Jeffrey Yasskin 0632b53bfe Revert the test from r88984. It relies on being able to mmap 16GB of
address space (though it only uses a small fraction of that), and the
buildbots disallow that.

Also add a comment to the Makefile's ulimit line warning future
developers that changing it won't work.

llvm-svn: 88994
2009-11-16 23:32:30 +00:00
Jim Grosbach 1deb0b9f53 Convert to FileCheck
llvm-svn: 88991
2009-11-16 23:19:29 +00:00
Eli Friedman 22683fef03 Simplify the AST a bit by skipping creating member initializers for members
with a trivial constructor.

llvm-svn: 88990
2009-11-16 23:07:59 +00:00
Eli Friedman c1daba3ec8 Make member initializers for union members work correctly.
llvm-svn: 88989
2009-11-16 22:58:01 +00:00
Mike Stump 6ca0e21de4 Implement dynamic_cast<void*>(E).
llvm-svn: 88988
2009-11-16 22:52:20 +00:00
Dan Gohman 9b5eea30f7 Initialize the new AsmPrinterFlags field to 0, fixing uses of
uninitialized memory.

llvm-svn: 88985
2009-11-16 22:49:38 +00:00
Jeffrey Yasskin 10d3604a9e Make X86-64 in the Large model always emit 64-bit calls.
The large code model is documented at
http://www.x86-64.org/documentation/abi.pdf and says that calls should
assume their target doesn't live within the 32-bit pc-relative offset
that fits in the call instruction.

To do this, we turn off the global-address->target-global-address
conversion in X86TargetLowering::LowerCall(). The first attempt at
this broke the lazy JIT because it can separate the movabs(imm->reg)
from the actual call instruction. The lazy JIT receives the address of
the movabs as a relocation and needs to record the return address from
the call; and then when that call happens, it needs to patch the
movabs with the newly-compiled target. We could thread the call
instruction into the relocation and record the movabs<->call mapping
explicitly, but that seems to require at least as much new
complication in the code generator as this change.

To fix this, we make lazy functions _always_ go through a call
stub. You'd think we'd only have to force lazy calls through a stub on
difficult platforms, but that turns out to break indirect calls
through a function pointer. The right fix for that is to distinguish
between calls and address-of operations on uncompiled functions, but
that's complex enough to leave for someone else to do.

Another attempt at this defined a new CALL64i pseudo-instruction,
which expanded to a 2-instruction sequence in the assembly output and
was special-cased in the X86CodeEmitter's emitInstruction()
function. That broke indirect calls in the same way as above.

This patch also removes a hack forcing Darwin to the small code model.
Without far-call-stubs, the small code model requires things of the
JITMemoryManager that the DefaultJITMemoryManager can't provide.

Thanks to echristo for lots of testing!

llvm-svn: 88984
2009-11-16 22:41:33 +00:00
Daniel Dunbar 5e1415156a Update test, I don't know why this changed but seems innocuous.
llvm-svn: 88983
2009-11-16 22:38:57 +00:00
Daniel Dunbar 2cbf4a7d6e Trim includes.
llvm-svn: 88982
2009-11-16 22:38:48 +00:00
Daniel Dunbar 24347f7cda Store more information in HeaderSearchOptions so that its initialization is not
language dependent.

llvm-svn: 88981
2009-11-16 22:38:40 +00:00
Daniel Dunbar 77a9d2b3ec clang-cc: Eliminate cyclic dependency in initializing CodeGenOptions.
llvm-svn: 88980
2009-11-16 22:38:14 +00:00
Daniel Dunbar 1aab2ded3a Don't build examples by default, use BUILD_EXAMPLES=1 to build them. The only utility of this is testing that we keep the examples up to date, I will just make the buildbots run with this flag.
llvm-svn: 88979
2009-11-16 22:38:00 +00:00
Daniel Dunbar 08d4ab9663 Add "Unoptimized" build (NO_DEBUG_SYMBOLS=1 ENABLE_OPTIMIZED=1), for reducing
disk space, and increasing battery lifetime. :)

llvm-svn: 88978
2009-11-16 22:37:52 +00:00
Eric Christopher dc679f88c8 Fix unused variables warnings.
llvm-svn: 88977
2009-11-16 22:34:32 +00:00
Evan Cheng f25ef4ffb0 - Check memoperand alignment instead of checking stack alignment. Most load / store folding instructions are not referencing spill stack slots.
- Mark MOVUPSrm re-materializable.

llvm-svn: 88974
2009-11-16 21:56:03 +00:00
Devang Patel f3d7c08e34 Revert r88939.
llvm-svn: 88973
2009-11-16 21:53:40 +00:00
David Greene a3ce7828b2 Fix an expensive-checks error.
The Mask and LHSMask may not be of the same size, so don't do the
transformation if they're different.

llvm-svn: 88972
2009-11-16 21:52:23 +00:00
Eli Friedman c2ef215bda Implement a few more cases for copy constructor synthesis.
llvm-svn: 88971
2009-11-16 21:47:41 +00:00
Douglas Gregor 1b8fe5b716 First part of changes to eliminate problems with cv-qualifiers and
sugared types. The basic problem is that our qualifier accessors
(getQualifiers, getCVRQualifiers, isConstQualified, etc.) only look at
the current QualType and not at any qualifiers that come from sugared
types, meaning that we won't see these qualifiers through, e.g.,
typedefs:

  typedef const int CInt;
  typedef CInt Self;

Self.isConstQualified() currently returns false!

Various bugs (e.g., PR5383) have cropped up all over the front end due
to such problems. I'm addressing this problem by splitting each
qualifier accessor into two versions: 

  - the "local" version only returns qualifiers on this particular
    QualType instance
  - the "normal" version that will eventually combine qualifiers from this
    QualType instance with the qualifiers on the canonical type to
    produce the full set of qualifiers.

This commit adds the local versions and switches a few callers from
the "normal" version (e.g., isConstQualified) over to the "local"
version (e.g., isLocalConstQualified) when that is the right thing to
do, e.g., because we're printing or serializing the qualifiers. Also,
switch a bunch of
  
  Context.getCanonicalType(T1).getUnqualifiedType() == Context.getCanonicalType(T2).getQualifiedType()

expressions over to 

  Context.hasSameUnqualifiedType(T1, T2)

llvm-svn: 88969
2009-11-16 21:35:15 +00:00
Eli Friedman c08bdea63d Clean up scalar cast kind handling; make cast kind handling explicitly handle
more cases.  No intended visible change.

llvm-svn: 88968
2009-11-16 21:33:53 +00:00
Mike Stump bf44533846 Audit done, all the required casts are already done.
llvm-svn: 88966
2009-11-16 21:22:19 +00:00
Devang Patel 37b4b8b1da revert r88963.
llvm-svn: 88965
2009-11-16 21:17:07 +00:00
Jim Grosbach 56ee15c162 Make the pass class name more explicit.
llvm-svn: 88964
2009-11-16 21:13:22 +00:00
Devang Patel b71c28db22 Use TrackingVH to hold forward decl. This one is for RecordType.
llvm-svn: 88963
2009-11-16 21:06:35 +00:00
Eli Friedman 00dbf4c3c6 Parallel fix to r88951: use TrackingVH to hold forward decl.
llvm-svn: 88962
2009-11-16 21:04:30 +00:00
Jim Grosbach 544b15cbc3 make pass name a bit more clear
llvm-svn: 88961
2009-11-16 21:03:58 +00:00
Sebastian Redl 658262fd26 Repair broken FindCompositePointerType. Correct early termination condition. Get CVR qualifiers from canonical types. Traverse collected qualifiers in reverse order on rebuilding the pointer, so that we don't swap inner and outer qualifiers. That last one fixes PR5509.
llvm-svn: 88960
2009-11-16 21:03:45 +00:00
Dan Gohman f76945ff14 Revert 88957. This file uses CodeGenOpt, which is defined in TargetMachine.h.
llvm-svn: 88959
2009-11-16 20:45:50 +00:00
Dan Gohman 0bcda0d5bd Remove an unnecessary #include.
llvm-svn: 88957
2009-11-16 20:41:12 +00:00
Dan Gohman 93f529d514 Sink a #include <map> to where it's actually needed.
llvm-svn: 88956
2009-11-16 20:40:47 +00:00
Dan Gohman 4617f3e893 Make PseudoSourceValue's classof recognize
FixedStackPseudoSourceValueVal, to respect this isa relationship.

llvm-svn: 88954
2009-11-16 20:40:06 +00:00
Dan Gohman 6b3f32e6d7 Fix a typo in a comment.
llvm-svn: 88953
2009-11-16 20:35:59 +00:00
Eli Friedman b05d0824c6 Fix valgrind uninitialized error.
llvm-svn: 88952
2009-11-16 20:33:31 +00:00
Devang Patel 10909d5faf Use TrackingVH to hold forward decl.
llvm-svn: 88951
2009-11-16 20:09:38 +00:00
Ted Kremenek 9dc2d26fdc Fix condition in LocationCheck::classof(). Thanks to Marius Wachtler for pointing this out!
llvm-svn: 88949
2009-11-16 20:06:54 +00:00
Jim Grosbach 9b32e22ad1 Convert to FileCheck
llvm-svn: 88947
2009-11-16 20:04:15 +00:00
Lang Hames 16f6b3e607 Added a testcase for PR5495.
llvm-svn: 88946
2009-11-16 20:03:13 +00:00
Rafael Espindola abab87936e Use configure options for searching for libstdc++.
llvm-svn: 88945
2009-11-16 19:49:37 +00:00
Mike Stump 4cdedd9d44 Fix members to be public.
llvm-svn: 88944
2009-11-16 19:48:50 +00:00
Rafael Espindola 65e9be6dc2 Add configure options for specifying where to look for libstdc++.
llvm-svn: 88943
2009-11-16 19:46:55 +00:00
Jim Grosbach 980d94164d Convert to FileCheck
llvm-svn: 88942
2009-11-16 19:46:46 +00:00
Mike Stump 3d47c2b3c2 Make bots happy.
llvm-svn: 88941
2009-11-16 19:34:15 +00:00
Bob Wilson 44724c4122 Fix a comment.
llvm-svn: 88940
2009-11-16 19:33:27 +00:00
Devang Patel 2ffd9935a1 Add VISIBILITY_HIDDEN marker.
llvm-svn: 88939
2009-11-16 19:20:48 +00:00
Eli Friedman f2f534d12a Fix PR5488: special-case the overloaded arrow operator so that we don't try to
treat it as a unary operator.

llvm-svn: 88938
2009-11-16 19:13:03 +00:00
David Chisnall b3b44ce433 Fixed two minor differences between clang and GCC-generated runtime structures for the GNU runtime.
llvm-svn: 88937
2009-11-16 19:05:54 +00:00
Jim Grosbach 9785e5914f Simplify thumb2 jump table adjustments. Remove unnecessary calculation and
usage of block sizes and offsets.

llvm-svn: 88935
2009-11-16 18:58:52 +00:00
Fariborz Jahanian 9290ede494 Handle case of missing '@end' in implementation context
gracefully, on par with gcc, by: Issuing a warning,
doing final sematinc check of its definitions and generating
its meta-data.

llvm-svn: 88934
2009-11-16 18:57:01 +00:00
Jim Grosbach 87b0f0d95c clarify comment
llvm-svn: 88933
2009-11-16 18:55:47 +00:00
Bob Wilson 1a8ea98b76 Fix some comments.
llvm-svn: 88932
2009-11-16 18:54:08 +00:00