Commit Graph

123038 Commits

Author SHA1 Message Date
Chad Rosier 233f147691 Remove references to llvm-gcc from overview and tutorial.
llvm-svn: 151502
2012-02-26 21:31:25 +00:00
Benjamin Kramer b73f76b642 Reorder members to save padding.
There's more potential here, but these Exprs aren't used that often so I don't feel like doing heroic bit packing right now.

-8 bytes on every class changed (x86_64).

llvm-svn: 151501
2012-02-26 20:37:14 +00:00
Benjamin Kramer 8d550863cb Move CharacterLiteral, FloatingLiteral and UnaryExprOrTypeTraitExpr flags over into Stmt.
Apply the inheritance-padding trick to FloatingLiteral.
Shrinks CharacterLiteral from 32 to 24 bytes and the other two from 40 to 32 bytes (x86_64).

llvm-svn: 151500
2012-02-26 19:47:25 +00:00
Benjamin Kramer 441607ddcb Make clever use of padding to shrink IntegerLiterals.
Inheritance allows us to use padding across classes.
40 -> 32 bytes on x86_64.

llvm-svn: 151499
2012-02-26 18:34:12 +00:00
Benjamin Kramer 74f011db76 Bit pack StringLiteral.
48 -> 40 bytes on x86_64.

llvm-svn: 151498
2012-02-26 18:34:07 +00:00
Benjamin Kramer 3f8e0ec333 Reduce padding in MemberExpr.
56 -> 48 bytes on x86_64.

llvm-svn: 151497
2012-02-26 18:34:02 +00:00
Benjamin Kramer 7e11d9c4c2 CompoundLiteralExpr: Pair a bool with a pointer.
48 -> 40 bytes on x86_64.

llvm-svn: 151496
2012-02-26 18:33:56 +00:00
Benjamin Kramer 14926606a4 Shuffle members of DesignatedInitExpr to avoid padding.
40 -> 32 bytes on x86_64.

llvm-svn: 151495
2012-02-26 17:31:32 +00:00
Benjamin Kramer 6864c519c2 Bit pack ExtProtoInfo.
llvm-svn: 151494
2012-02-26 16:55:55 +00:00
Benjamin Kramer e60db7b86a Move FullSourceLoc::dump into the .cpp file, the used attribute made us emit this into every TU that includes SourceLocation.h.
llvm-svn: 151493
2012-02-26 16:55:50 +00:00
Howard Hinnant 9ffe10106e vector::emplace_back was mistakenly requiring move assignable. Fixed that and did a little drive-by optimization at the same time. This fixes http://llvm.org/bugs/show_bug.cgi?id=12085.
llvm-svn: 151492
2012-02-26 15:30:12 +00:00
Benjamin Kramer 6b2dc73d48 Okay, makes sense to change all the occurences to match clang.EXE.
llvm-svn: 151491
2012-02-26 14:55:10 +00:00
Benjamin Kramer 1c45c9c8b0 Allow any file extension for the clang binary in the linux-header-search test.
Turns out this can be .exe or .EXE, depending on the build system.

llvm-svn: 151490
2012-02-26 14:50:31 +00:00
Nadav Rotem e4972ddea4 Add support for random constant vectors.
Patch by Joey Gouly.

llvm-svn: 151489
2012-02-26 13:56:18 +00:00
Nadav Rotem 115ec82ec7 Style fix: Remove unneeded parentheses.
llvm-svn: 151488
2012-02-26 12:34:17 +00:00
Nadav Rotem 63ff91d22a Fix a bug in the code that checks if a store value is a vector of i1s
llvm-svn: 151487
2012-02-26 12:00:22 +00:00
Richard Smith 8e1c932ffb Don't assert when trying to diagnose why a class with a constructor template is
non-trivial.

llvm-svn: 151486
2012-02-26 10:50:32 +00:00
Chandler Carruth df8ae4b949 Add the critical crtbegin.o files necessary for any of the tests in
r151482 and r151484 to work. Sorry about the fallout...

llvm-svn: 151485
2012-02-26 10:46:17 +00:00
Chandler Carruth 2e9d731761 A follow-up to r151482 which added support for powerpc and powerpc64
Debian multiarch libraries, this should in theory add support for those
platform's header search rules. I don't have a system to check this
with, so review appreciated. I've added the corresponding tests
referring to the debian multiarch tree.

We are starting to have a relatively completely tested Linux platform
for header search and library search, with several interesting
peculiarities. We should point people at the debian_multiarch_tree when
suggesting new tests. Folks with Debian systems that can check this for
correctness, it would be much appreciated. The missing chunks I know of
are testing bi-arch peudo-cross-compiling toolchains betwen 32-bit and
64-bit variants of platforms, and the MIPS and ARM Debian toolchains.

llvm-svn: 151484
2012-02-26 09:21:43 +00:00
Richard Smith 921bd20ddd Ensure that we delete destructors in the right cases. Specifically:
- variant members with nontrivial destructors make the containing class's
   destructor deleted
 - check for a virtual destructor after checking for overridden methods in the
   base class(es)
 - check for an inaccessible operator delete for a class with a virtual
   destructor.

Do not try to call an anonymous union field's destructor from the destructor of
the containing class.

llvm-svn: 151483
2012-02-26 09:11:52 +00:00
Chandler Carruth af3c2090b4 Add support for PPC and PPC64 multiarch toolchains on Debain.
Patch from Michel Dänzer, sent our way via Jeremy Huddleston who added
64-bit support. I just added one other place where powerpc64-linux-gnu
was missing (we only had powerpc64-unknown-linux-gnu).

I've also added a tree to test out the debian multiarch stuff. I don't
use debian regularly, so I'm not certain this is entirely accurate. If
anyone wants to check it against a debian system and fix any
inaccuracies, fire away. This way at least folks can see how this is
*supposed* to be tested.

It'd be particularly good to get the Debian MIPS toolchains tested in
this way.

llvm-svn: 151482
2012-02-26 09:03:21 +00:00
Nadav Rotem dc497b6c1c Fix compilation on MSVC. Rename "_BB" to "Block"
Thanks zygoloid.

llvm-svn: 151481
2012-02-26 08:59:25 +00:00
Nadav Rotem 089cf4211c fix a copy-and-paste error in the docs
llvm-svn: 151480
2012-02-26 08:43:43 +00:00
Nadav Rotem 78bda89412 Add a random .LL file generator to stress-test different llvm components.
llvm-svn: 151479
2012-02-26 08:35:53 +00:00
Richard Smith 273c4e9d82 Make sure we don't try to produce a definition of an implicitly-deleted function
llvm-svn: 151478
2012-02-26 07:51:39 +00:00
Richard Smith 2dc867f4e3 Update release notes and language extensions pages to note that support for
generalized initializers is available.

llvm-svn: 151477
2012-02-26 07:09:21 +00:00
Greg Clayton b9a01b3990 Made a ModuleSpec class in Module.h which can specify a module using one or
more of the local path, platform path, associated symbol file, UUID, arch,
object name and object offset. This allows many of the calls that were
GetSharedModule to reduce the number of arguments that were used in a call
to these functions. It also allows a module to be created with a ModuleSpec
which allows many things to be specified prior to any accessors being called
on the Module class itself. 

I was running into problems when adding support for "target symbol add"
where you can specify a stand alone debug info file after debugging has started
where I needed to specify the associated symbol file path and if I waited until
after construction, the wrong  symbol file had already been located. By using
the ModuleSpec it allows us to construct a module with as little or as much
information as needed and not have to change the parameter list.

llvm-svn: 151476
2012-02-26 05:51:37 +00:00
Rafael Espindola a640db900a Add testcase for the previous commit.
llvm-svn: 151475
2012-02-26 05:49:57 +00:00
Rafael Espindola b660977c67 Don't call dominates on unreachable instructions. Should fix the dragonegg
build. Testcase is still reducing.

llvm-svn: 151474
2012-02-26 05:30:08 +00:00
Hal Finkel a1d6afeddf Default TargetData alignment information for 128-bit floating-point types.
llvm-svn: 151473
2012-02-26 04:13:31 +00:00
Rafael Espindola ae725715ef And update the comment...
llvm-svn: 151472
2012-02-26 02:36:56 +00:00
Rafael Espindola fa75542078 Enable the assert that got all this dominator work started.
llvm-svn: 151471
2012-02-26 02:29:18 +00:00
Rafael Espindola 654320a0bb Use the DT dominates function in the verifier.
llvm-svn: 151470
2012-02-26 02:23:37 +00:00
Rafael Espindola 94df267db3 Change the implementation of dominates(inst, inst) to one based on what the
verifier does. This correctly handles invoke.
Thanks to Duncan, Andrew and Chris for the comments.
Thanks to Joerg for the early testing.

llvm-svn: 151469
2012-02-26 02:19:19 +00:00
Rafael Espindola bfa7579801 Don't call dominates on unreachable instructions.
llvm-svn: 151468
2012-02-26 02:14:25 +00:00
Nick Lewycky 3db143ea8c Reinstate the optimization from r151449 with a fix to not turn 'gep %x' into
'gep null' when the icmp predicate is unsigned (or is signed without inbounds).

llvm-svn: 151467
2012-02-26 02:09:49 +00:00
Rafael Espindola c8c2b06a90 Don't call dominates on unreachable instructions.
llvm-svn: 151466
2012-02-26 01:50:14 +00:00
Richard Smith 0d1f3cb1b5 Special members which are defaulted or deleted on their first declaration are
trivial if the implicit declaration would be. Don't forget to set the Trivial
flag on the special member as well as on the class. It doesn't seem ideal that
we have two separate mechanisms for storing this information, but this patch
does not attempt to address that.

This leaves us in an interesting position where the has_trivial_X trait for a
class says 'yes' for a deleted but trivial X, but is_trivially_Xable says 'no'.
This seems to be what the standard requires.

llvm-svn: 151465
2012-02-26 00:31:33 +00:00
Argyrios Kyrtzidis 8d4677ad26 Revert r151460 as it is not enough to address the issue.
Original log:
When evaluating integer expressions handle logical operators outside
VisitBinaryOperator() to reduce stack pressure for source with huge number
of logical operators.

Fixes rdar://10913206.

llvm-svn: 151464
2012-02-25 23:21:37 +00:00
Nick Lewycky 7bbd72da46 Roll these back to r151448 until I figure out how they're breaking
MultiSource/Applications/lua.

llvm-svn: 151463
2012-02-25 23:01:19 +00:00
Sebastian Redl aeac3ff82a Richard Smith pointed out that there already is a proposal for init list mangling.
llvm-svn: 151462
2012-02-25 22:59:28 +00:00
Howard Hinnant 26bba442ac update test for explicit bool operator.
llvm-svn: 151461
2012-02-25 21:43:14 +00:00
Argyrios Kyrtzidis 70f9eb571e When evaluating integer expressions handle logical operators outside
VisitBinaryOperator() to reduce stack pressure for source with huge number
of logical operators.

Fixes rdar://10913206.

llvm-svn: 151460
2012-02-25 21:38:16 +00:00
Howard Hinnant 908d2bebaf At least temporarily move operator new/delete from the abi back to here. I'm having trouble reexporting it as a weak symbol.
llvm-svn: 151459
2012-02-25 21:36:01 +00:00
Sebastian Redl d89c218a2b Initializer lists are now supported.
llvm-svn: 151458
2012-02-25 20:51:27 +00:00
Sebastian Redl 4a7eab2545 CodeGen support for global variables of type std::initializer_list<X>.
This emits a backing array with internal linkage and fills it with data,
then has the initializer_list point at the array. Dynamic initialization
and global destructors are correctly supported.

What doesn't work is nested initializer_lists. I have no idea how to
get them to work, either. However, these should be very rare, and so
I'll just call it a known bug and declare generalized initializers
DONE!

llvm-svn: 151457
2012-02-25 20:51:20 +00:00
Sebastian Redl f2e0a3077c Fix crashers on unexpected std::initializer_list layouts. Found by inspection.
llvm-svn: 151456
2012-02-25 20:51:13 +00:00
Sebastian Redl dadc06494d Better mangling for new-expressions. Also, although we can't mangle arbitrary initializer lists yet (we will need this), turn the crash into a controlled error.
llvm-svn: 151455
2012-02-25 20:51:07 +00:00
Chad Rosier 4c5c8ccf40 Temporarily revert r151288:
ARM: enable the integrated assembler by default for Darwin. 

llvm-svn: 151454
2012-02-25 20:32:43 +00:00
Howard Hinnant 25326f060d ReExport some mor symbols from libc++abi.
llvm-svn: 151453
2012-02-25 20:25:07 +00:00