Cameron Zwarich [Mon, 21 Feb 2011 00:22:02 +0000 (00:22 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126097
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Sun, 20 Feb 2011 22:06:10 +0000 (22:06 +0000)]
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
Rafael Espindola [Sun, 20 Feb 2011 20:20:07 +0000 (20:20 +0000)]
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
Rafael Espindola [Sun, 20 Feb 2011 18:28:29 +0000 (18:28 +0000)]
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
Nick Lewycky [Sun, 20 Feb 2011 18:05:56 +0000 (18:05 +0000)]
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
Rafael Espindola [Sun, 20 Feb 2011 16:27:25 +0000 (16:27 +0000)]
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
Oscar Fuentes [Sun, 20 Feb 2011 15:34:12 +0000 (15:34 +0000)]
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
Benjamin Kramer [Sun, 20 Feb 2011 15:20:01 +0000 (15:20 +0000)]
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
Benjamin Kramer [Sun, 20 Feb 2011 13:23:43 +0000 (13:23 +0000)]
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
Nadav Rotem [Sun, 20 Feb 2011 12:37:50 +0000 (12:37 +0000)]
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
Nick Lewycky [Sun, 20 Feb 2011 08:38:20 +0000 (08:38 +0000)]
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
Nick Lewycky [Sun, 20 Feb 2011 08:11:03 +0000 (08:11 +0000)]
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
Eric Christopher [Sun, 20 Feb 2011 05:04:42 +0000 (05:04 +0000)]
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
Stephen Wilson [Sun, 20 Feb 2011 04:17:15 +0000 (04:17 +0000)]
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
Stephen Wilson [Sun, 20 Feb 2011 03:51:07 +0000 (03:51 +0000)]
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
Oscar Fuentes [Sun, 20 Feb 2011 02:55:27 +0000 (02:55 +0000)]
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
Nick Lewycky [Sun, 20 Feb 2011 02:03:04 +0000 (02:03 +0000)]
Fix typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126065
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Sat, 19 Feb 2011 22:42:40 +0000 (22:42 +0000)]
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
Eli Friedman [Sat, 19 Feb 2011 21:54:28 +0000 (21:54 +0000)]
Minor x86 README updates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126054
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 19 Feb 2011 21:49:57 +0000 (21:49 +0000)]
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
Cameron Zwarich [Sat, 19 Feb 2011 21:44:35 +0000 (21:44 +0000)]
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
Chris Lattner [Sat, 19 Feb 2011 21:06:36 +0000 (21:06 +0000)]
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
Chris Lattner [Sat, 19 Feb 2011 19:56:44 +0000 (19:56 +0000)]
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
Chris Lattner [Sat, 19 Feb 2011 19:35:49 +0000 (19:35 +0000)]
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
Chris Lattner [Sat, 19 Feb 2011 19:31:39 +0000 (19:31 +0000)]
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
Jeffrey Yasskin [Sat, 19 Feb 2011 18:01:15 +0000 (18:01 +0000)]
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
Argyrios Kyrtzidis [Sat, 19 Feb 2011 03:55:58 +0000 (03:55 +0000)]
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
Eric Christopher [Sat, 19 Feb 2011 03:19:09 +0000 (03:19 +0000)]
Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126018
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Sat, 19 Feb 2011 01:59:21 +0000 (01:59 +0000)]
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
Devang Patel [Sat, 19 Feb 2011 01:31:27 +0000 (01:31 +0000)]
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
Devang Patel [Sat, 19 Feb 2011 01:28:37 +0000 (01:28 +0000)]
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
Jakob Stoklund Olesen [Sat, 19 Feb 2011 00:53:42 +0000 (00:53 +0000)]
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
Joerg Sonnenberger [Sat, 19 Feb 2011 00:43:45 +0000 (00:43 +0000)]
Avoid dangling else warnings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126004
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 19 Feb 2011 00:42:33 +0000 (00:42 +0000)]
Missed member rename for naming convention.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126003
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 19 Feb 2011 00:38:43 +0000 (00:38 +0000)]
This method belonged in VirtRegMap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126002
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 19 Feb 2011 00:38:40 +0000 (00:38 +0000)]
Separate timers for local and global splitting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126001
91177308-0d34-0410-b5e6-
96231b3b80d8
Mikhail Glushenkov [Sat, 19 Feb 2011 00:33:27 +0000 (00:33 +0000)]
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
Devang Patel [Fri, 18 Feb 2011 23:28:53 +0000 (23:28 +0000)]
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
Devang Patel [Fri, 18 Feb 2011 23:23:09 +0000 (23:23 +0000)]
Remove unused tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125988
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 18 Feb 2011 23:13:40 +0000 (23:13 +0000)]
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
Devang Patel [Fri, 18 Feb 2011 23:06:29 +0000 (23:06 +0000)]
Provide tag strings for llvm specific tags.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125986
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 18 Feb 2011 22:43:42 +0000 (22:43 +0000)]
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
Chris Lattner [Fri, 18 Feb 2011 22:36:36 +0000 (22:36 +0000)]
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
Jakob Stoklund Olesen [Fri, 18 Feb 2011 22:35:20 +0000 (22:35 +0000)]
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
Chris Lattner [Fri, 18 Feb 2011 22:34:03 +0000 (22:34 +0000)]
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
Chris Lattner [Fri, 18 Feb 2011 22:22:15 +0000 (22:22 +0000)]
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
Chris Lattner [Fri, 18 Feb 2011 22:21:24 +0000 (22:21 +0000)]
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
Chris Lattner [Fri, 18 Feb 2011 22:21:07 +0000 (22:21 +0000)]
rearrange some comments, no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Feb 2011 22:13:01 +0000 (22:13 +0000)]
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
Oscar Fuentes [Fri, 18 Feb 2011 22:06:23 +0000 (22:06 +0000)]
CMake: updated list of tblgen source files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125969
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Fri, 18 Feb 2011 22:06:14 +0000 (22:06 +0000)]
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
Jakob Stoklund Olesen [Fri, 18 Feb 2011 22:03:18 +0000 (22:03 +0000)]
Add VirtRegMap::rewrite() and use it in the new register allocators.
The rewriter works almost identically to -rewriter=trivial, except it also
eliminates any identity copies.
This makes the new register allocators independent of VirtRegRewriter.cpp which
will be going away at the same time as RegAllocLinearScan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125967
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 18 Feb 2011 21:51:29 +0000 (21:51 +0000)]
Add FixedLenDecoderEmitter, the skeleton of a new disassembler emitter for fixed-length instruction encodings.
A major part of its (eventual) goal is to support a much cleaner separation between disassembly callbacks
provided by the target and the disassembler emitter itself, i.e. not requiring hardcoding of knowledge in tblgen
like the existing disassembly emitters do.
The hope is that some day this will allow us to replace the existing non-Thumb ARM disassembler and remove
some of the hacks the old one introduced to tblgen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125966
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Feb 2011 21:50:34 +0000 (21:50 +0000)]
introduce a new TargetLibraryInfo pass, which transformations can use to
query about available library functions. For now this just has
memset_pattern16, which exists on darwin, but it can be extended for a
bunch of other things in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125965
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 18 Feb 2011 21:33:23 +0000 (21:33 +0000)]
Revert r125956, which broke the build if you _don't_ have lldb checked out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125964
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 18 Feb 2011 21:12:58 +0000 (21:12 +0000)]
Reapply r114997 now that the buildbots have been updated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125960
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Wilson [Fri, 18 Feb 2011 20:50:33 +0000 (20:50 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125956
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 18 Feb 2011 19:49:06 +0000 (19:49 +0000)]
Fix style and a typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125949
91177308-0d34-0410-b5e6-
96231b3b80d8
Bruno Cardoso Lopes [Fri, 18 Feb 2011 19:45:59 +0000 (19:45 +0000)]
Add assembly parsing support for "msr" and also fix its encoding. Also add
testcases for the disassembler to make sure it still works for "msr".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125948
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Feb 2011 17:04:56 +0000 (17:04 +0000)]
improve support for OpenBSD, patch by Amit Kulkarni!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125943
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 18 Feb 2011 16:35:37 +0000 (16:35 +0000)]
Expose getTypeName to the C API. Patch by Patrick Walton.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125845
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Fri, 18 Feb 2011 16:25:37 +0000 (16:25 +0000)]
Add some transforms of the kind X-Y>X -> 0>Y which are valid when there is no
overflow. These subsume some existing equality transforms, so zap those.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125843
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 18 Feb 2011 16:11:40 +0000 (16:11 +0000)]
The objectsize intrinsic doesn't access any memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125842
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Feb 2011 05:35:49 +0000 (05:35 +0000)]
add a poor division by constant case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125832
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Feb 2011 05:05:01 +0000 (05:05 +0000)]
add a testcase for r125827
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125831
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Fri, 18 Feb 2011 04:58:10 +0000 (04:58 +0000)]
Roll out r125794 to help diagnose the llvm-gcc-i386-linux-selfhost failure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125830
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Feb 2011 04:43:06 +0000 (04:43 +0000)]
prevent jump threading from merging blocks when their address is
taken (and used!). This prevents merging the blocks (invalidating
the block addresses) in a case like this:
#define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; })
void foo() {
printf("%p\n", _THIS_IP_);
printf("%p\n", _THIS_IP_);
printf("%p\n", _THIS_IP_);
}
which fixes PR4151.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125829
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Feb 2011 04:41:42 +0000 (04:41 +0000)]
hoist GlobalValue::removeDeadConstantUsers up to being a method on Constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125828
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 18 Feb 2011 04:25:21 +0000 (04:25 +0000)]
Don't unroll loops whose header block's address is taken.
This is part of a futile attempt to not "break" bizzaro
code like this:
l1:
printf("l1: %p\n", &&l1);
++x;
if( x < 3 ) goto l1;
Previously we'd fold &&l1 to 1, which is fine per our semantics
but not helpful to the user.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125827
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Fri, 18 Feb 2011 02:59:21 +0000 (02:59 +0000)]
Make -disable-simplify-libcalls work with -std-compile-opts
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125824
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 18 Feb 2011 00:48:11 +0000 (00:48 +0000)]
Recognize monitor/mwait with explicit register arguments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125805
91177308-0d34-0410-b5e6-
96231b3b80d8
Argyrios Kyrtzidis [Fri, 18 Feb 2011 00:47:07 +0000 (00:47 +0000)]
Check the errorcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125804
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 18 Feb 2011 00:32:47 +0000 (00:32 +0000)]
Trim debugging output.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125802
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 17 Feb 2011 23:36:39 +0000 (23:36 +0000)]
Recognize leavel and leaveq aliases for leave.
Validate encoding of leave in 64bit mode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125795
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 17 Feb 2011 23:33:27 +0000 (23:33 +0000)]
Do not lose debug info of an inlined function argument even if the argument is only used through GEPs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125794
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Thu, 17 Feb 2011 23:22:19 +0000 (23:22 +0000)]
Check that MnemonicAlias doesn't map back to the same string.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125792
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Feb 2011 23:01:49 +0000 (23:01 +0000)]
have instcombine preserve nsw/nuw/exact when sinking
common operations through a phi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125790
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 17 Feb 2011 22:53:48 +0000 (22:53 +0000)]
Add basic register allocator statistics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125789
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Feb 2011 22:32:54 +0000 (22:32 +0000)]
fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125787
91177308-0d34-0410-b5e6-
96231b3b80d8
Oscar Fuentes [Thu, 17 Feb 2011 22:26:11 +0000 (22:26 +0000)]
New library: LLVMX86Utils.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125786
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Feb 2011 22:21:26 +0000 (22:21 +0000)]
fix instcombine merging GEPs through a PHI to only make the
result inbounds if all of the inputs are inbounds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125785
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Thu, 17 Feb 2011 21:22:27 +0000 (21:22 +0000)]
Enhance constant folding of bitcast operations on vectors of floats.
Add getAllOnesValue of FP numbers to Constants and APFloat.
Add more tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125776
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Feb 2011 20:55:29 +0000 (20:55 +0000)]
add is always integer, thanks to Frits for noticing this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125774
91177308-0d34-0410-b5e6-
96231b3b80d8
David Greene [Thu, 17 Feb 2011 19:18:59 +0000 (19:18 +0000)]
[AVX] Recorganize X86ShuffleDecode into its own library
(LLVMX86Utils.a) to break cyclic library dependencies between
LLVMX86CodeGen.a and LLVMX86AsmParser.a. Previously this code was in
a header file and marked static but AVX requires some additional
functionality here that won't be used by all clients. Since including
unused static functions causes a gcc compiler warning, keeping it as a
header would break builds that use -Werror. Putting this in its own
library solves both problems at once.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125765
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 17 Feb 2011 19:13:53 +0000 (19:13 +0000)]
Split local live ranges.
A local live range is live in a single basic block. If such a range fails to
allocate, try to find a sub-range that would get a larger spill weight than its
interference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125764
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Thu, 17 Feb 2011 18:50:19 +0000 (18:50 +0000)]
The labyrinthine X86 backend no longer appears to require
these patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125759
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 17 Feb 2011 12:42:48 +0000 (12:42 +0000)]
Fix wrong logic in promotion of signed mul-with-overflow (I pointed this out at
the time but presumably my email got lost). Examples where the previous logic
got it wrong: (1) a signed i8 multiply of 64 by 2 overflows, but the high part is
zero; (2) a signed i8 multiple of -128 by 2 overflows, but the high part is all
ones.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125748
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 17 Feb 2011 12:24:17 +0000 (12:24 +0000)]
Triple::MinGW64 is deprecated and removed. We can use Triple::MinGW32 generally.
No one uses *-mingw64. mingw-w64 is represented as {i686|x86_64}-w64-mingw32. In llvm side, i686 and x64 can be treated as similar way.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125747
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 17 Feb 2011 12:23:50 +0000 (12:23 +0000)]
Fix whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125746
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 17 Feb 2011 08:16:56 +0000 (08:16 +0000)]
This has been implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125738
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Thu, 17 Feb 2011 07:46:37 +0000 (07:46 +0000)]
Transform "A + B >= A + C" into "B >= C" if the adds do not wrap. Likewise for some
variations (some of these were already present so I unified the code). Spotted by my
auto-simplifier as occurring a lot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125734
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 17 Feb 2011 06:52:07 +0000 (06:52 +0000)]
Switch to SmallVector in SimpleRegisterCoalescing for a 3.5% speedup on 403.gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125728
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 17 Feb 2011 06:13:46 +0000 (06:13 +0000)]
Adjust indenting of arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125727
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Thu, 17 Feb 2011 06:13:43 +0000 (06:13 +0000)]
Return Changed from SplitPHIEdges rather than always returning true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125726
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Thu, 17 Feb 2011 05:56:41 +0000 (05:56 +0000)]
lit/TestingConfig.py: Add the environment variable PRINTF_EXPONENT_DIGITS as workaround [PR6745] for mingw's tests. Danil Malyshev suggested this.
FIXME: It does not improve MSVC's issue.
[Danil Malyshev] Defining PRINTF_EXPONENT_DIGITS env is the suggested way to make MinGW ANSI/POSIX compatible. This is not only about the case we are discussing, but in general, I'd like to have explicitly defined compatibility mode for all the tests running on MinGW.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125725
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Hunt [Thu, 17 Feb 2011 03:30:09 +0000 (03:30 +0000)]
Add serialization for Expr* arguments for attributes to clang tablegen files.
Patch thanks to Zach Anderson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125721
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Feb 2011 02:23:02 +0000 (02:23 +0000)]
preserve NUW/NSW when transforming add x,x
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125711
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Feb 2011 02:21:03 +0000 (02:21 +0000)]
filecheckize
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125710
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Thu, 17 Feb 2011 02:19:22 +0000 (02:19 +0000)]
Fix thinko, basic blocks are SESE. The exits may have many edges though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125709
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 17 Feb 2011 01:43:46 +0000 (01:43 +0000)]
add some notes on compares + binops. Remove redundant entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125702
91177308-0d34-0410-b5e6-
96231b3b80d8