Commit Graph

101584 Commits

Author SHA1 Message Date
Chris Lattner e9cba7bd34 add a missed loop deletion case.
llvm-svn: 126103
2011-02-21 02:13:39 +00:00
Chris Lattner bc661d6686 Add some (disabled code) to print out negative strides.
llvm-svn: 126102
2011-02-21 02:08:54 +00:00
Chris Lattner 659c793a4e add an idiom that loop idiom could theoretically catch.
llvm-svn: 126101
2011-02-21 01:33:38 +00:00
Cameron Zwarich 39314bdbc8 A lo/hi mul has higher latency than an imul r,ri, e.g. 5 cycles compared to 3
on Core 2 and Nehalem, so the code we generate is better than GCC's here.

llvm-svn: 126100
2011-02-21 01:29:32 +00:00
Joerg Sonnenberger eef2f9009d Use a vector of pairs to implement the section stack, not two
independent vectors.

llvm-svn: 126099
2011-02-21 01:07:42 +00:00
Chandler Carruth d05b352b0e Clean up the tests for warning about unused function results given the
appropriate attribute. Add a bit more testing that finds a pretty bad
regression (since ~forever) in this warning. Fix it with a nice 2 line
change. =]

llvm-svn: 126098
2011-02-21 00:56:56 +00:00
Cameron Zwarich 8731d0cc83 The signed version of our "magic number" computation for the integer approximation
of a constant had a minor typo introduced when copying it from the book, which
caused it to favor negative approximations over positive approximations in many
cases. Positive approximations require fewer operations beyond the multiplication.

In the case of division by 3, we still generate code that is a single instruction
larger than GCC's code.

llvm-svn: 126097
2011-02-21 00:22:02 +00:00
Chandler Carruth 468b5cbd40 Allow -Wformat to be enabled without -Wformat-security. GCC gates
-Wformat-security on -Wformat, not vice-versa.

Fixes PR8486. Patch by Oleg Slezberg.

llvm-svn: 126096
2011-02-21 00:07:51 +00:00
Oscar Fuentes 15fe190027 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

llvm-svn: 126094
2011-02-20 22:06:44 +00:00
Oscar Fuentes 6f72540e46 New function for tablegenning: clang_tablegen.
llvm-svn: 126093
2011-02-20 22:06:32 +00:00
Oscar Fuentes 3145e923c1 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

llvm-svn: 126092
2011-02-20 22:06:10 +00:00
Rafael Espindola f849bf81bd Add some limited support for labels in org directives. Hopefully enough to fix
PR9245.

llvm-svn: 126091
2011-02-20 20:20:07 +00:00
Oscar Fuentes e9c7994669 Correct name of dependent target.
CMake complained about this while generating VS project files but was
okay with it while generating makefiles on Linux.

llvm-svn: 126090
2011-02-20 19:41:34 +00:00
Rafael Espindola 9ef90d5b35 Dispose modules early and only create codegen when the plugin is being
used by the linker and not by nm or ar.

llvm-svn: 126089
2011-02-20 18:28:29 +00:00
Nick Lewycky 183c24c51b Make RecursivelyDeleteDeadPHINode delete a phi node that has no users and add a
test for that. With this change, test/CodeGen/X86/codegen-dce.ll no longer finds
any instructions to DCE, so delete the test.

Also renamed J and JP to I and IP in RecursivelyDeleteDeadPHINode.

llvm-svn: 126088
2011-02-20 18:05:56 +00:00
Daniel Dunbar bd466d404a tests: Fix test on Win32.
llvm-svn: 126087
2011-02-20 17:41:24 +00:00
Rafael Espindola 477d11f9a0 Fix some memory leaks and avoid looking in the hash tables twice.
libxul links in 7m0.403s.

llvm-svn: 126085
2011-02-20 16:27:25 +00:00
Benjamin Kramer ae1e5c250c Remove unused function.
llvm-svn: 126084
2011-02-20 16:04:14 +00:00
Oscar Fuentes 31717d18e9 Remove the link to Projects.html. It is useless for people working on
Visual Studio.

llvm-svn: 126083
2011-02-20 15:34:12 +00:00
Benjamin Kramer 5b7a4e0195 Move "A | ~(A & ?) -> -1" from InstCombine to InstructionSimplify.
llvm-svn: 126082
2011-02-20 15:20:01 +00:00
Benjamin Kramer d5d7f37beb InstCombine: Add a bunch of combines of the form x | (y ^ z).
We usually catch this kind of optimization through InstSimplify's distributive
magic, but or doesn't distribute over xor in general.

"A | ~(A | B) -> A | ~B" hits 24 times on gcc.c.

llvm-svn: 126081
2011-02-20 13:23:43 +00:00
Nadav Rotem 25f2ac948b Fix 9267; Add vector zext support.
The DAGCombiner folds the zext into complex load instructions. This patch
prevents this optimization on vectors since none of the supported targets
knows how to perform load+vector_zext in one instruction.

llvm-svn: 126080
2011-02-20 12:37:50 +00:00
Richard Smith 7ee0d5664e Turn on __has_feature(cxx_auto_type). The feature is now fully implemented.
llvm-svn: 126078
2011-02-20 12:13:05 +00:00
Nick Lewycky c8a1569950 Teach RecursivelyDeleteDeadPHINodes to handle multiple self-references. Patch
by Andrew Clinton!

llvm-svn: 126077
2011-02-20 08:38:20 +00:00
Nick Lewycky 080ea93779 Instead of keeping two Value*->id# mappings, keep one Value->Value mapping and
one Value set. This is faster because we only need to use the set when there
isn't already an entry in the map. No functionality change!

llvm-svn: 126076
2011-02-20 08:11:03 +00:00
Daniel Dunbar 67e556249c Remove a dead variable.
llvm-svn: 126073
2011-02-20 06:15:13 +00:00
Eric Christopher ac6b001f56 If both operands are loads from stores in memory we can't use movlpd/movlps
since one needs to be a register operand. Just use movss instead of forcing
an operand into a register.

Fixes PR9239

llvm-svn: 126072
2011-02-20 05:04:42 +00:00
Stephen Wilson a32b8d7801 This patch lets LLDB build as an LLVM subproject. LLDB is not built in
parallel with the rest of the tools directory as it depends on Clang.

This patch was first applied in r125956 and subsequently reverted in
r125964 as it broke in-tree builds.  Makefile.rules was fixed up in 
r126070 to handle missing optional directories for the in-tree case,
so it should be safe now to bring this patch back in.
 

llvm-svn: 126071
2011-02-20 04:17:15 +00:00
Stephen Wilson a16825106c Do not try to descend into optional build directories if they do not
exist.  This makes the build logic symmetric for both the in tree and
out of tree cases.

llvm-svn: 126070
2011-02-20 03:51:07 +00:00
Richard Smith 30482bc786 Implement the C++0x deduced 'auto' feature.
This fixes PR 8738, 9060 and 9132.

llvm-svn: 126069
2011-02-20 03:19:35 +00:00
Oscar Fuentes ba1186c23e Use explicit add_subdirectory's for LLVM target sublibraries instead
of testing for its presence at cmake time.

This way the build automatically regenerates the makefiles when a svn
update brings in a new sublibrary.

llvm-svn: 126068
2011-02-20 02:55:27 +00:00
Greg Clayton 9d0402b1eb Don't limit StreamTee to just two streams. It now can contain
N streams by making the stream a vector of stream shared pointers
that is protected by a mutex. Streams can be get/set by index which
allows indexes to be defined as stream indentifiers. If a stream is
set at index 3 and there are now streams in the collection, then
empty stream objects are inserted to ensure that stream at index 3
has a valid stream. There is also an append method that allows a stream
to be pushed onto the stack. This will allow our streams to be very
flexible in where the output goes.

Modified the CommandReturnObject to use the new StreamTee functionality.
This class now defines two StreamTee indexes: 0 for the stream string
stream, and 1 for the immediate stream. This is used both on the output
and error streams.

Added the ability to get argument types as strings or as descriptions.
This is exported through the SBCommandInterpreter API to allow external
access.

Modified the Driver class to use the newly exported argument names from
SBCommandInterpreter::GetArgumentTypeAsCString().

llvm-svn: 126067
2011-02-20 02:15:07 +00:00
Ken Dyck 6d90e8937c Expand use of CharUnits in LayoutField(). No change in functionality
intended.

llvm-svn: 126066
2011-02-20 02:06:09 +00:00
Nick Lewycky 9d0e8b6e80 Fix typo.
llvm-svn: 126065
2011-02-20 02:03:04 +00:00
Ken Dyck d24099de04 Add const qualifier to getTypeInfoInChars().
llvm-svn: 126064
2011-02-20 01:55:18 +00:00
Richard Smith 1daeacbda8 Test commit.
llvm-svn: 126063
2011-02-20 00:59:54 +00:00
Anders Carlsson 08ce5ed1b1 Add a LangOptions::areExceptionsEnabled and start using it.
llvm-svn: 126062
2011-02-20 00:20:27 +00:00
Anders Carlsson ce8dd3a5d4 Add a new ObjCExceptions member variable to LangOptions. This controls whether Objective-C exceptions are enabled or not (they are by default).
llvm-svn: 126061
2011-02-19 23:53:54 +00:00
Peter Collingbourne 8f5cf74c77 Re-instate r125819 and r125820 with no functionality change
llvm-svn: 126060
2011-02-19 23:03:58 +00:00
Chris Lattner 29eb47bd68 Fix PR9253, allowing attribute(aligned) to reduce the alignment of
a typedef.

llvm-svn: 126059
2011-02-19 22:55:41 +00:00
Eli Friedman ef200db4fd PR9218: SimplifyDemandedVectorElts can return a non-null value that is not
the instruction passed in.  Make sure to account for this correctly, instead
of looping infinitely.

llvm-svn: 126058
2011-02-19 22:42:40 +00:00
Douglas Gregor 5b05454f24 Don't produce "comparison is always (true|false)" warnings when the
comparison itself is a constant expression. Fixes PR7536.

llvm-svn: 126057
2011-02-19 22:34:59 +00:00
Chris Lattner b0ed51da10 implement a tiny amount of codegen support for gnu array range
designators: allowing codegen when the element initializer is a
constant or something else without a side effect.  This unblocks
enough to let process.c in the linux kernel build, PR9257.

llvm-svn: 126056
2011-02-19 22:28:58 +00:00
Douglas Gregor d66828daf6 In addition to in-class member functions marked with the "used"
attribute, we also care about those with the "constructor"
attribute. Fixes PR6521.

llvm-svn: 126055
2011-02-19 21:54:50 +00:00
Eli Friedman 78b9851a3a Minor x86 README updates.
llvm-svn: 126054
2011-02-19 21:54:28 +00:00
Anders Carlsson b94ad3ec22 There's no need to return early if we encounter a try/throw and exceptions are disabled.
llvm-svn: 126053
2011-02-19 21:53:09 +00:00
Rafael Espindola d4f34d840e Add modules to codegen as soon as possible. This reduces the link time
of libxul from 12m31.084s to 7m1.359s.

llvm-svn: 126052
2011-02-19 21:49:57 +00:00
Cameron Zwarich 2d43ea968f Try to fix the MC/AsmParser/section.s failure on the llvm-x86_64-linux-vg_leak
bot. I am not sure if this is valid Valgrind exclusion file syntax, but the
Internet seems to think so.

llvm-svn: 126051
2011-02-19 21:44:35 +00:00
Rafael Espindola a6d2bff0c5 Revert 125820 and 125819 to fix PR9266.
llvm-svn: 126050
2011-02-19 21:39:31 +00:00
Oscar Fuentes f7fa56f25f Fix some add_dependencies.
The syntax is (add_dependencies target-name depend-target1 ...).

llvm-svn: 126049
2011-02-19 21:38:48 +00:00