Commit Graph

106462 Commits

Author SHA1 Message Date
Andrew Trick 812276eed4 scev: Better sign-extend removal. Normalize postincrement recurrences
so that their sign extended forms are congruent when no overflow occurs.

llvm-svn: 132360
2011-05-31 21:17:47 +00:00
Howard Hinnant 8f0cd597f1 noexcept for <array>.
llvm-svn: 132359
2011-05-31 21:06:33 +00:00
Jakob Stoklund Olesen 73e18b7aea Simplify the eviction policy by making the failsafe explicit.
When assigned ranges are evicted, they are put in the RS_Evicted stage and are
not allowed to evict anything else. That prevents looping automatically.

When evicting ranges just to get a cheaper register, use only spill weights to
find the possible candidates. Avoid breaking hints for this purpose, it is not
worth it.

Start implementing more complex eviction heuristics, guarded by the temporary
-complex-eviction flag. The initial version permits a heavier range to be
evicted if it doesn't have any uses where the evicting range is live. This makes
it a good candidate for live ranfge splitting.

llvm-svn: 132358
2011-05-31 21:02:44 +00:00
Devang Patel 2780e4545a List c++ class type as public type in dwarf debug info output.
llvm-svn: 132357
2011-05-31 20:46:46 +00:00
Eli Friedman 7a5fc693f9 llvm.memcpy.* has two distinct associated address spaces; the source address space, and the destination address space. Fix up the interface on MemIntrinsic and MemTransferInst to make this clear, and fix InstructionDereferencesPointer in LazyValueInfo.cpp to use the interface properly.
llvm-svn: 132356
2011-05-31 20:40:16 +00:00
Bruno Cardoso Lopes f771a0f490 Fix uninitialized variables and silence warnings
llvm-svn: 132355
2011-05-31 20:25:26 +00:00
Greg Clayton 5ad639415f Fix dynamic value objects to do the right thing when the
value fails to evaluate.

llvm-svn: 132354
2011-05-31 20:18:39 +00:00
Eli Friedman af5a89587e Add a minor missing -verify check. Found by inspection.
llvm-svn: 132353
2011-05-31 20:12:07 +00:00
Nick Lewycky 42bdfc0708 Also remove -lLTO which should have been in r132349. I failed to apply this
from David Meyer's patch!

llvm-svn: 132352
2011-05-31 20:00:45 +00:00
Stuart Hastings 9d6a06d536 Revert to pacify a buildbot. rdar://problem/6501862
llvm-svn: 132351
2011-05-31 19:56:35 +00:00
Alexis Hunt 414e3e3c2d Ensure we enter an unevaluated context when instantiating a noexcept
expression. Fixes bug raised by hhinnant to cfe-dev

llvm-svn: 132350
2011-05-31 19:54:49 +00:00
Nick Lewycky a0484fcef1 Make the gold plugin build on Cygwin as well as Linux. Patch by David Meyer!
llvm-svn: 132349
2011-05-31 19:53:26 +00:00
Stuart Hastings 780f723309 Followup to 132316; accept arbitrary constants, add with a constant,
sub with a non-constant.  Fix comments, enlarge test case.
rdar://problem/6501862

llvm-svn: 132348
2011-05-31 19:29:55 +00:00
Devang Patel 1d81ea81cd Fix html formatting.
llvm-svn: 132345
2011-05-31 18:06:14 +00:00
Devang Patel 5c26a85d1d Clarify documentation and remove guarantees that are not fulfilled.
llvm-svn: 132344
2011-05-31 17:45:27 +00:00
Howard Hinnant e3c6708439 Upgrade <ratio> to use template aliases when available.
llvm-svn: 132342
2011-05-31 16:55:36 +00:00
Richard Osborne 4dae7379ef Fix 80 column violations.
llvm-svn: 132341
2011-05-31 16:30:33 +00:00
Richard Osborne 2f14b0bb1d Add XCore intrinsic for crc8.
llvm-svn: 132340
2011-05-31 16:24:49 +00:00
Daniel Dunbar 116b305d31 Driver/Clang: Simplify code to use arch enumerations.
llvm-svn: 132338
2011-05-31 15:58:55 +00:00
Howard Hinnant b5d866d4a3 noexcept for Chapter 22 [localization].
llvm-svn: 132337
2011-05-31 15:34:58 +00:00
Richard Osborne 542f9a2bcf Add XCore intrinsic for crc32.
llvm-svn: 132336
2011-05-31 14:47:36 +00:00
Richard Osborne 36d027f7f6 Convert test to FileCheck.
llvm-svn: 132335
2011-05-31 14:00:05 +00:00
Howard Hinnant f5c91471a4 Add _ATTRIBUTE macro for gcc: Justin Hibbits
llvm-svn: 132334
2011-05-31 13:13:49 +00:00
Francois Pichet bcaf0816a5 Recreate the DeclContext before adding the implicit friend forward declaration. This should fix the asserting buildbot.
llvm-svn: 132333
2011-05-31 12:44:46 +00:00
Francois Pichet 3fd47df366 For compatibility with MSVC, a friend declaration also act as a forward declaration if the tag name is not already declared. The tag name is declared in the next outermost non record scope.
Example:

class A {
  friend class B;
  B* b;
};
B* global_b;

llvm-svn: 132332
2011-05-31 11:44:00 +00:00
Nick Lewycky 67c4d0f336 Whenever we instantiate a static data member, make sure to define any new
vtables! Fixes PR10020

This also allows us to revert the part of r130023 which added a big loop around
the template instantiation.

llvm-svn: 132331
2011-05-31 07:58:42 +00:00
Galina Kistanova 920f852759 Now with the right line endings.
llvm-svn: 132330
2011-05-31 07:19:08 +00:00
Zhongxing Xu e6a2028fe1 Fix linking of clang-wpa.
llvm-svn: 132329
2011-05-31 07:13:36 +00:00
Chandler Carruth e54ff6cc3e Expand the coverage of the warning for constants on the RHS of logical operands:
return f() || -1;

where the user meant to write '|'.

This bootstraps without any additional warnings.

Patch by Richard Trieu.

llvm-svn: 132327
2011-05-31 05:41:42 +00:00
Argyrios Kyrtzidis b3483b3d91 Utilize PackedVector, introduced with llvm commit r132325.
llvm-svn: 132326
2011-05-31 03:56:09 +00:00
Argyrios Kyrtzidis 30c532e0b0 Introduce PackedVector, useful for storing a vector of values using a specific number of bits for each
value. Both signed and unsigned types can be used, e.g

   PackedVector<signed, 2> vec;

will create a vector accepting values -2, -1, 0, 1. Any other value will hit an assertion.

llvm-svn: 132325
2011-05-31 03:53:41 +00:00
Bruno Cardoso Lopes 394f516d16 Fix ssat and ssat16 encodings for ARM and Thumb. The bit position value
must be encoded decremented by one. Only add encoding tests for ssat16
because ssat can't be parsed yet.

llvm-svn: 132324
2011-05-31 03:33:27 +00:00
Bruno Cardoso Lopes 98fc4c8bbc This patch implements atomic intrinsics atomic.load.add (sub,and,or,xor,
nand), atomic.swap and atomic.cmp.swap, all in i8, i16 and i32 versions.
The intrinsics are implemented by creating pseudo-instructions, which are
then expanded in the method MipsTargetLowering::EmitInstrWithCustomInserter.

Patch by Sasa Stankovic.

llvm-svn: 132323
2011-05-31 02:54:07 +00:00
Bruno Cardoso Lopes bf3c1251e0 This patch implements the thread local storage. Implemented are General
Dynamic, Initial Exec and Local Exec TLS models.

Patch by Sasa Stankovic

llvm-svn: 132322
2011-05-31 02:53:58 +00:00
Galina Kistanova 4503e20ae6 Just one for now to see how it will fly.
llvm-svn: 132321
2011-05-31 00:34:37 +00:00
Galina Kistanova e5ea7eb007 For X86 specific tests.
llvm-svn: 132320
2011-05-31 00:32:43 +00:00
Galina Kistanova ded0b598b6 Preparations for separating target-specific clang tests.
llvm-svn: 132319
2011-05-31 00:29:49 +00:00
Rafael Espindola 08600bcf65 Use the dwarf->llvm mapping to print register names in the cfi
directives.

Fixes PR9826.

llvm-svn: 132317
2011-05-30 20:20:15 +00:00
Stuart Hastings 8284374b07 (1 - X) * (-2) -> (x - 1) * 2, for all positive nonzero powers of 2
rdar://problem/6501862

llvm-svn: 132316
2011-05-30 20:00:33 +00:00
Rafael Espindola cd0d2fd21f Split ppc dwarf regnums into ppc64 and ppc32 flavours.
llvm-svn: 132315
2011-05-30 18:24:44 +00:00
Rafael Espindola ddffa0e160 Introduce the DwarfRegAlias class for declaring that two registers have the
same dwarf number. This will be used for creating a dwarf number to register
mapping.

The only case that needs this so far is the XMM/YMM registers that unfortunately
do have the same numbers.

llvm-svn: 132314
2011-05-30 17:49:59 +00:00
Rafael Espindola ea8ca34e3a Mark the 32 bit registers as invalid in 64 bit mode. In 64 bit mode they are
subregisters of the 64 bit ones.

llvm-svn: 132313
2011-05-30 16:04:54 +00:00
Rafael Espindola 595fd7a058 Remove the DwarfNumbers from the subregisters. They should use DW_OP_bit_piece
and for now the generic dwarf emission will automatically use the superregister
numbers.

llvm-svn: 132312
2011-05-30 15:56:04 +00:00
David Chisnall fcb37e944f Fix another incorrect type bug.
llvm-svn: 132311
2011-05-30 12:00:26 +00:00
Chris Lattner 0ec0649bc2 replace the intro tutorial from 2004 with a more recent work.
llvm-svn: 132310
2011-05-30 03:36:58 +00:00
Jakob Stoklund Olesen ec43d5d780 Reapply r132245 with a fix for the bug that broke the darwin9/i386 build.
llvm-svn: 132309
2011-05-30 01:33:26 +00:00
Greg Clayton 21e69cef08 Revert previous changes.
llvm-svn: 132308
2011-05-30 01:18:45 +00:00
John McCall f19cf99097 Add the test case for phis in the outer landing pad during the inliner's
forwarding of eh.resume that I promised yesterday.

llvm-svn: 132307
2011-05-30 01:08:04 +00:00
Greg Clayton 007d5be653 lldb-59.
llvm-svn: 132304
2011-05-30 00:49:24 +00:00
Greg Clayton 5d2fbfed4d Disable dynamic types being on by default until kinks get worked out when
they don't update correctly. Currently if a variable is unavailable due to
a register not being available in a higher frame or due to the PC value
not being a valid location list value, "<unknown type>" will get displayed
as the variable type. I am not sure what other things will fail, so I am 
disabling it for now just by letting the default enumeration value default
to it being disabled.

llvm-svn: 132303
2011-05-30 00:39:48 +00:00