Commit Graph

82414 Commits

Author SHA1 Message Date
Bill Wendling c4adfa3467 Add a "PadTo" field to the emitULEB128Bytes method. This will pad out to the
indicated number of bytes.

llvm-svn: 101684
2010-04-18 00:51:49 +00:00
Anders Carlsson d5f27b0583 Simplify wide bit-field layout in CGRecordLayoutBuilder, and also fix a bug where assigning to a bit-field member would overwrite other parts of the struct.
llvm-svn: 101681
2010-04-17 22:54:57 +00:00
Douglas Gregor 5ab1165531 Improve our handling of user-defined conversions as part of overload
resolution. There are two sources of problems involving user-defined
conversions that this change eliminates, along with providing simpler
interfaces for checking implicit conversions:

  - It eliminates a case of infinite recursion found in Boost.

  - It eliminates the search for the constructor needed to copy a temporary
    generated by an implicit conversion from overload
    resolution. Overload resolution assumes that, if it gets a value
    of the parameter's class type (or a derived class thereof), there
    is a way to copy if... even if there isn't. We now model this
    properly.

llvm-svn: 101680
2010-04-17 22:01:05 +00:00
Anders Carlsson 8345a70c67 Fix an assert when assigning a boolean value to a bitfield of type _Bool.
llvm-svn: 101678
2010-04-17 21:52:22 +00:00
Nick Lewycky fbe8d2803d Fix declarations in a few more tests.
llvm-svn: 101676
2010-04-17 21:29:25 +00:00
Daniel Dunbar c459a0ff81 Revert "reject forward references to functions whose type don't match", because DJG told me to!
llvm-svn: 101675
2010-04-17 21:24:55 +00:00
Nick Lewycky d4c0f86a5e Fix intrinsic signature in this test.
llvm-svn: 101674
2010-04-17 21:12:55 +00:00
Anders Carlsson 2295f13bb0 Unnamed bit-fields in a union should be laid out with a type that doesn't affect alignment.
llvm-svn: 101673
2010-04-17 21:04:52 +00:00
Anders Carlsson 1de2f5710b Factor union field layout code out into a separate function. No functionality change.
llvm-svn: 101671
2010-04-17 20:49:27 +00:00
Chris Lattner 5a44950aae reject forward references to functions whose type don't match
up with the definition (and fix a broken testcase).  PR6491.

llvm-svn: 101670
2010-04-17 20:45:56 +00:00
Anders Carlsson aad5fa85d0 If a wide bit-field is inside a union its offset should always be 0.
llvm-svn: 101668
2010-04-17 20:21:41 +00:00
Chandler Carruth e03aa55bfd Add support for '-fgnu-keywords' and '-fasm' to Clang's driver. They are not
implemented precisely the same as GCC, but the distinction GCC makes isn't
useful to represent. This allows parsing code which uses GCC-specific keywords
('asm', etc.) without parsing in a fully GNU mode.

llvm-svn: 101667
2010-04-17 20:17:31 +00:00
Anders Carlsson 11e5140db9 Vtable -> VTable renames across the board.
llvm-svn: 101666
2010-04-17 20:15:18 +00:00
Chandler Carruth 13bca6cd5a Prevent accidental in-source builds with CMake, and detect when there are
generated files from a previous in-source builds.

llvm-svn: 101665
2010-04-17 20:12:02 +00:00
Dale Johannesen 0b685eb778 Add comment (lost when reverting and reapplying 101503).
llvm-svn: 101664
2010-04-17 19:56:46 +00:00
Chris Lattner 2b3a32f7a0 doh, didn't mean to check in my hackaround lit sucking. :)
llvm-svn: 101663
2010-04-17 19:04:03 +00:00
Chris Lattner 0a8d91a816 fix PR6332, allowing an index of zero into a zero sized array
even if the element of the array has no size.

llvm-svn: 101662
2010-04-17 19:02:33 +00:00
Chris Lattner b927073f2e teach the x86 asm parser how to handle segment prefixes
in memory operands.  rdar://7874844

llvm-svn: 101661
2010-04-17 18:56:34 +00:00
Chris Lattner a299f2c872 fix integrated assembler with i386 objc code.
llvm-svn: 101660
2010-04-17 18:26:20 +00:00
Chris Lattner 926885c090 refactor .if handling code a bit.
llvm-svn: 101659
2010-04-17 18:14:27 +00:00
Chris Lattner 67e70971cc fix PR6858: a dangling pointer use bug which was caused
by switching CachedFunctionInfo from a std::map to a 
ValueMap (which is implemented in terms of a DenseMap).

DenseMap has different iterator invalidation semantics
than std::map.

This should hopefully fix the dragonegg builder.

llvm-svn: 101658
2010-04-17 17:57:56 +00:00
Chris Lattner cea19a475b a bunch of cleanups and tweaks, no functionality changes.
llvm-svn: 101657
2010-04-17 17:55:00 +00:00
Dan Gohman 7a0fde90f5 Fix more -Wcast-qual warnings.
llvm-svn: 101656
2010-04-17 17:44:03 +00:00
Dan Gohman 1f0f2142cc Fix -Wcast-qual warnings.
llvm-svn: 101655
2010-04-17 17:42:52 +00:00
Chris Lattner 05f34394d9 remove a dead variable, PR6856
llvm-svn: 101648
2010-04-17 17:28:00 +00:00
Anders Carlsson c6db5ab8b2 Fix a bug where we would sometimes incorrectly mark an vtable function as unused.
llvm-svn: 101643
2010-04-17 17:24:33 +00:00
Chris Lattner 5495c8e415 testcase for r101538, patch by Nico Schmidt!
llvm-svn: 101642
2010-04-17 17:22:06 +00:00
Dan Gohman 53d4a08d2b Add const qualifiers to TargetLoweringObjectFile usage.
llvm-svn: 101640
2010-04-17 16:44:48 +00:00
Dan Gohman 88f7f6aeda Use const_cast instead of a C-style cast to cast away const.
llvm-svn: 101639
2010-04-17 16:43:55 +00:00
Dan Gohman 4fee6f3bdd Start function numbering at 0.
llvm-svn: 101638
2010-04-17 16:29:15 +00:00
Dan Gohman 8422e57baa Delete now-unnecessary const_casts.
llvm-svn: 101637
2010-04-17 15:32:28 +00:00
Dan Gohman 20e094c711 Use cast instead of dyn_cast when assuming success.
llvm-svn: 101636
2010-04-17 15:31:16 +00:00
Dan Gohman 21cea8ac2e Use const qualifiers with TargetLowering. This eliminates several
const_casts, and it reinforces the design of the Target classes being
immutable.

SelectionDAGISel::IsLegalToFold is now a static member function, because
PIC16 uses it in an unconventional way. There is more room for API
cleanup here.

And PIC16's AsmPrinter no longer uses TargetLowering.

llvm-svn: 101635
2010-04-17 15:26:15 +00:00
Dan Gohman 31ae586c74 Move per-function state out of TargetLowering subclasses and into
MachineFunctionInfo subclasses.

llvm-svn: 101634
2010-04-17 14:41:14 +00:00
Benjamin Kramer 95c7c427aa Add printName to DeclarationName which prints the human-readable name on a
raw_ostream. Use it in getAsString and NamedDecl's raw_ostream operator.

llvm-svn: 101633
2010-04-17 09:56:45 +00:00
Benjamin Kramer b11416d061 Add raw_ostream operators to NamedDecl for convenience. Switch over all users of getNameAsString on a stream.
The next step is to print the name directly into the stream, avoiding a temporary std::string copy.

llvm-svn: 101632
2010-04-17 09:33:03 +00:00
Chandler Carruth ca0a53ac52 Name these stub files consistently with the SPU and PPC targets' conventions.
Also rename the classes appropriately. The CMake build already used these
names.

llvm-svn: 101631
2010-04-17 08:50:29 +00:00
Chris Lattner 7f5088e6de a bunch of ssse3 instructions are misencoded to think they have an
i8 field when they really do not.  This fixes rdar://7840289

llvm-svn: 101629
2010-04-17 07:38:24 +00:00
Chris Lattner 7c4f14bf90 reenable r101565, removing a problematic assertion.
CGSCC can delete nodes in regions of the callgraph that
have already been visited.  If new CG nodes are allocated
to the same pointer, we shouldn't abort, just handle it
correctly by assigning a new number.  This should restore
stability by removing invalidated pointers that *will* be
reused from the densemap in the iterator.

llvm-svn: 101628
2010-04-17 07:17:19 +00:00
Evan Cheng 5fdb57cc10 Postra machine licm must add registers defined by loop invariants to *all* of
the live-in sets of BBs in the loop. Otherwise later pass may end up using the
registers and override the invariant. rdar://7852937
No reasonablly sized test case possible.

llvm-svn: 101626
2010-04-17 07:07:11 +00:00
Nick Lewycky 04b8eec241 Refresh this documentation. Things have changed a bit in the mean time:
- LLVMgold.so --> libLLVMgold.so
 - the GCC LTO project is no longer 'upcoming'
 - document the plugin support for 'ar' and 'nm'

llvm-svn: 101624
2010-04-17 07:00:24 +00:00
Chris Lattner b714a4b4a0 revert r101568, which miscompiles this testcase, distilled from ldecod:
void exit_picture()
{
  char yuv_types[4][6]= {"4:0:0","4:2:0","4:2:2","4:4:4"};
  foo(yuv_types);
}

llvm-svn: 101623
2010-04-17 06:53:44 +00:00
Evan Cheng 4f3aba431e Fix codegen passes. -disable-ssc shouldn't disable postra machine licm.
llvm-svn: 101622
2010-04-17 06:47:47 +00:00
Evan Cheng f1bd5fcdb4 More work to allow dag combiner to promote 16-bit ops to 32-bit.
llvm-svn: 101621
2010-04-17 06:13:15 +00:00
Evan Cheng 829c300ce0 Another 80 col violation.
llvm-svn: 101620
2010-04-17 06:12:32 +00:00
Daniel Dunbar 88534f4201 Driver: Add missing claim() for -mllvm options.
llvm-svn: 101618
2010-04-17 06:10:00 +00:00
Bob Wilson 59b70eacad Revise my previous change to ExpandBIT_CONVERT. I hadn't realized that this
may be called when either the source or destination type is i64, and my
change also hadn't fixed the most obvious problem -- assuming that i64 will
only be bitconverted to f64, ignoring the various vector types.
Radar 7873160.

llvm-svn: 101615
2010-04-17 05:30:19 +00:00
Evan Cheng 3af19e80c9 Add nounwind.
llvm-svn: 101613
2010-04-17 03:43:36 +00:00
Bob Wilson ca51425d94 Re-commit my previous SSAUpdater changes. The previous version naively tried
to determine where to place PHIs by iteratively comparing reaching definitions
at each block.  That was just plain wrong.  This version now computes the
dominator tree within the subset of the CFG where PHIs may need to be placed,
and then places the PHIs in the iterated dominance frontier of each definition.
The rest of the patch is mostly the same, with a few more performance
improvements added in.

llvm-svn: 101612
2010-04-17 03:08:24 +00:00
Eric Christopher 0dd32fe068 New test to verify that we see constant integers here.
llvm-svn: 101611
2010-04-17 02:36:08 +00:00