Commit Graph

70294 Commits

Author SHA1 Message Date
Oscar Fuentes
0b85d07d46 Put targets on folders, if the IDE supports the feature.
Requires CMake 2.8.3 or newer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126092 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 22:06:10 +00:00
Rafael Espindola
f7ad048f1e Add some limited support for labels in org directives. Hopefully enough to fix
PR9245.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126091 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 20:20:07 +00:00
Rafael Espindola
8e04fc3adf Dispose modules early and only create codegen when the plugin is being
used by the linker and not by nm or ar.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126089 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 18:28:29 +00:00
Nick Lewycky
eff5e69c82 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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126088 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 18:05:56 +00:00
Rafael Espindola
cd6c93ec48 Fix some memory leaks and avoid looking in the hash tables twice.
libxul links in 7m0.403s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126085 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 16:27:25 +00:00
Oscar Fuentes
89d31ec7d2 Remove the link to Projects.html. It is useless for people working on
Visual Studio.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126083 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 15:34:12 +00:00
Benjamin Kramer
38f7f66fcc Move "A | ~(A & ?) -> -1" from InstCombine to InstructionSimplify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126082 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 15:20:01 +00:00
Benjamin Kramer
91e37ef278 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126081 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 13:23:43 +00:00
Nadav Rotem
ed9b934f65 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126080 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 12:37:50 +00:00
Nick Lewycky
1a4021a2be Teach RecursivelyDeleteDeadPHINodes to handle multiple self-references. Patch
by Andrew Clinton!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126077 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 08:38:20 +00:00
Nick Lewycky
eafe863b6d 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!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126076 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 08:11:03 +00:00
Eric Christopher
893a882d09 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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126072 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 05:04:42 +00:00
Stephen Wilson
ebccf0891a 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.
 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126071 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 04:17:15 +00:00
Stephen Wilson
c156632c62 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126070 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 03:51:07 +00:00
Oscar Fuentes
00d78f1348 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126068 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 02:55:27 +00:00
Nick Lewycky
7ac0199287 Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126065 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20 02:03:04 +00:00
Eli Friedman
1347623aaf 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126058 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 22:42:40 +00:00
Eli Friedman
86b115c78b Minor x86 README updates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126054 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 21:54:28 +00:00
Rafael Espindola
37d42f8a50 Add modules to codegen as soon as possible. This reduces the link time
of libxul from 12m31.084s to 7m1.359s.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126052 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 21:49:57 +00:00
Cameron Zwarich
17dce36774 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126051 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 21:44:35 +00:00
Chris Lattner
824a9076ea implement PR9264: disambiguating 'bt mem, imm' as a btl.
This is reasonable to do since all bt-mem forms do the
same thing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126047 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 21:06:36 +00:00
Chris Lattner
80e8b506b8 rewrite the memset_pattern pattern generation stuff to accept any 2/4/8/16-byte
constant, including globals.  This makes us generate much more "pretty" pattern
globals as well because it doesn't break it down to an array of bytes all the
time.

This enables us to handle stores of relocatable globals.  This kicks in about
48 times in 254.gap, giving us stuff like this:

@.memset_pattern40 = internal constant [2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*] [%struct.TypHeader* (%struct.TypHeader*, %struct
.TypHeader*)* @IsFalse, %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)* @IsFalse], align 16

...
  call void @memset_pattern16(i8* %scevgep5859, i8* bitcast ([2 x %struct.TypHeader* (%struct.TypHeader*, %struct.TypHeader*)*]* @.memset_pattern40 to i8*
), i64 %tmp75) nounwind



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126044 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 19:56:44 +00:00
Chris Lattner
41bfbb0a87 Stores of null pointers should turn into memset, we weren't recognizing
them as splat values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126041 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 19:35:49 +00:00
Chris Lattner
3a393728a6 Implement rdar://9009151, transforming strided loop stores of
unsplatable values into memset_pattern16 when it is available
(recent darwins).  This transforms lots of strided loop stores
of ints for example, like 5 in vpr:

  Formed memset:   call void @memset_pattern16(i8* %4, i8* getelementptr inbounds ([16 x i8]* @.memset_pattern9, i32 0, i32 0), i64 %tmp25)
    from store to: {%3,+,4}<%11> at:   store i32 3, i32* %scevgep, align 4, !tbaa !4




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126040 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 19:31:39 +00:00
Jeffrey Yasskin
9bb83e4f48 Add the PARSE_ARGUMENTS CMake macro to LLVM so I can use it to clean
up add_clang_unittest's calling convention.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126031 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 18:01:15 +00:00
Argyrios Kyrtzidis
38297f5f76 Allow getting the address of the value in a PointerUnion or PointerIntPair if one is
confident enough that he knows what he is doing.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126019 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 03:55:58 +00:00
Eric Christopher
dd6e40a4f4 Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126018 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 03:19:09 +00:00
Ted Kremenek
3f912adeae Add ImmutableMap methods 'manualRetain()', 'manualRelease()', and 'getRootWithoutRetain()' to help more aggressively reclaim memory in the static analyzer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126011 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 01:59:21 +00:00
Devang Patel
5bc9fec7ec Do not emit empty DW_TAG_lexical_block DIEs. In one test case, size of debug info reduced by almost 7%.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126009 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 01:31:27 +00:00
Devang Patel
fe19e3f74c DIE numbers do not add any value in this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126008 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 01:28:37 +00:00
Jakob Stoklund Olesen
1b847deb26 Give SplitAnalysis a VRM member to access VirtRegMap::getOriginal().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126005 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 00:53:42 +00:00
Joerg Sonnenberger
4b19c9865e Avoid dangling else warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126004 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 00:43:45 +00:00
Jakob Stoklund Olesen
0eeca44046 Missed member rename for naming convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126003 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 00:42:33 +00:00
Jakob Stoklund Olesen
fd38917d4d This method belonged in VirtRegMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126002 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 00:38:43 +00:00
Jakob Stoklund Olesen
a2ebf60ef2 Separate timers for local and global splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126001 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 00:38:40 +00:00
Mikhail Glushenkov
75dab009eb Make "-opt [-emit-llvm]" work for .ll files.
Patch by Kaelyn Uhrain!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126000 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-19 00:33:27 +00:00
Devang Patel
dc8c3fdcf1 Provide enums to build complex address calucation expressions.
(This is infact direct copy from DIFactory, which is disappearing soon.)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125989 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 23:28:53 +00:00
Devang Patel
f3a3214049 Remove unused tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125988 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 23:23:09 +00:00
Devang Patel
29020a3b45 These tags are now covered by dwarf::TagString().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125987 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 23:13:40 +00:00
Devang Patel
98d9f5d90d Provide tag strings for llvm specific tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125986 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 23:06:29 +00:00
Devang Patel
a778f5c798 Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
This time with a fix that avoids using invalidated DenseMap iterator.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125984 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:43:42 +00:00
Chris Lattner
0160c8a8bc Now that -loop-idiom uses TargetLibraryInfo properly, it doesn't
need to be pulled out of the pass manager when the user specifies 
-fno-builtin.  It can intelligently determine which libcalls to
optimize based on what is enabled in TargetLibraryInfo.  This 
allows -fno-builtin-foo to work someday.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125981 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:36:36 +00:00
Jakob Stoklund Olesen
e324f6e05f Use VirtRegMap's Virt2SplitMap to keep track of the original live range before splitting.
All new virtual registers created for spilling or splitting point back to their original.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125980 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:35:20 +00:00
Chris Lattner
188a7e00e7 add a way to disable all builtins, wire it up to opt's -disable-simplifylibcalls flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125978 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:34:03 +00:00
Chris Lattner
c19175c9d8 Make loop-idiom use TargetLibraryInfo to determine whether it is allowed
to hack on memset, memcpy etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125974 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:22:15 +00:00
Chris Lattner
398c0d8b74 add memset and memcpy, though they are always available for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125973 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:21:24 +00:00
Chris Lattner
a84b2ffac5 rearrange some comments, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125972 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:21:07 +00:00
Chris Lattner
2a66acafaf Have opt set up a specific TargetLibraryInfo for modules
with a triple.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125970 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:13:01 +00:00
Oscar Fuentes
9a89894537 CMake: updated list of tblgen source files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125969 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:06:23 +00:00
Oscar Fuentes
6d857ca4d7 Move library stuff out of the toplevel CMakeLists.txt file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125968 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-18 22:06:14 +00:00