Commit Graph

108459 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 780db902f7 Oops, didn't mean to commit that.
Spills should be hoisted out of loops, but we don't want to hoist them
to dominating blocks at the same loop depth. That could cause the spills
to be executed more often.

llvm-svn: 134782
2011-07-09 01:02:44 +00:00
Alexis Hunt 3f60bca9e9 Implement generalized table lookups for upper, lower, and character
traits.

To the best of my knowledge, this will not break the ABI for Apple.
However, it does introduce three publicly visible (although with
reserved name) functions that will fail to link against the just-shipped
Apple version of libc++. Since they are not used in any inline
functions, no actual breakage should occur.

If Howard doesn't want to put undefined functions (even internal ones)
into a header, they could be surrounded by additional conditional
compilation.

llvm-svn: 134781
2011-07-09 00:56:23 +00:00
Jim Ingham b8e8a5f3ee Allow reading memory from files before the target has been run.
llvm-svn: 134780
2011-07-09 00:55:34 +00:00
Greg Clayton 9e00b6a654 Added the ability to get an abstract file type (executable, object file,
shared library, etc) and strata (user/kernel) from an object file. This will
help with plug-in and platform selection when given a new binary with the
"target create <file>" command.

llvm-svn: 134779
2011-07-09 00:41:34 +00:00
Lang Hames c5c191b0a4 Added test cases for GVN signed intrinsics recognition, r134777.
llvm-svn: 134778
2011-07-09 00:36:54 +00:00
Lang Hames 266dab7bab Added recognition for signed add/sub/mul with overflow intrinsics to GVN as per Chris and Frits suggestion.
llvm-svn: 134777
2011-07-09 00:25:11 +00:00
Jakob Stoklund Olesen bf6afec312 Hoist spills within a basic block.
Try to move spills as early as possible in their basic block. This can
help eliminate interferences by shortening the live range being
spilled.

This fixes PR10221.

llvm-svn: 134776
2011-07-09 00:25:03 +00:00
Johnny Chen 02a07299b7 Missed the char_to_str_xform on the docstrings for the module level function definitions.
llvm-svn: 134775
2011-07-08 23:57:20 +00:00
Eli Friedman a7c9411818 Silly typo in test for r134770.
llvm-svn: 134774
2011-07-08 23:57:18 +00:00
Eli Friedman fe2088bb1f Really force on 64bit for 64-bit targets. Should fix remaining failures on unknown x86/non-x86 targets.
llvm-svn: 134773
2011-07-08 23:43:01 +00:00
Johnny Chen 628d84005a Add rdar://problem/9747668 info for "target variable g_marked_spot.y" command.
llvm-svn: 134772
2011-07-08 23:38:39 +00:00
Johnny Chen 98a5ddd006 Add test scenarios for 'target variable' command into TestGlobalVariables.py file.
llvm-svn: 134771
2011-07-08 23:33:36 +00:00
Eli Friedman 3346582bca Change -mno-mmx to be more compatible with gcc. Specifically, -mno-mmx should not imply -mno-sse.
Note that because we don't usually touch the MMX registers anyway, all -mno-mmx needs to do is tweak the x86-32 calling convention a little for vectors that look like MMX vectors, and prevent the definition of __MMX__.

clang doesn't actually stop the user from using MMX inline asm operands or MMX builtins in -mno-mmx mode; as a QOI issue, it would be nice to diagnose, but I doubt it really matters much.

<rdar://problem/9694837>

llvm-svn: 134770
2011-07-08 23:31:17 +00:00
Johnny Chen 07398b5d48 Add some comment.
llvm-svn: 134769
2011-07-08 23:07:53 +00:00
Eli Friedman 5286833f4a Revert earlier unnecessary hack. Make sure we correctly force on 64bit and cmov for 64-bit targets.
llvm-svn: 134768
2011-07-08 23:07:42 +00:00
Johnny Chen 3a709ac7bf o TestEvents.py:
Add a usage example of SBEvent APIs.

o SBEvent.h and SBListener.h:

Add method docstrings for SBEvent.h and SBListener.h, and example usage of SBEvent into
the class docstring of SBEvent.

o lldb.swig:

Add typemap for SBEvent::SBEvent (uint32_t event, const char *cstr, uint32_t cstr_len)
so that we can use, in Python, obj2 = lldb.SBEvent(0, "abc") to create an SBEvent.

llvm-svn: 134766
2011-07-08 23:02:33 +00:00
Bruno Cardoso Lopes 129b4cc9ec Revert x86_64 ABI changes until I have time to check the items raised by Eli.
llvm-svn: 134765
2011-07-08 22:57:35 +00:00
Evan Cheng 45543ba4e8 Fix indentation.
llvm-svn: 134764
2011-07-08 22:49:55 +00:00
Evan Cheng 15bc70f765 Fix comment.
llvm-svn: 134763
2011-07-08 22:49:42 +00:00
Cameron Zwarich a8ce35e07c Add an fma TableGen node.
llvm-svn: 134762
2011-07-08 22:49:34 +00:00
Jakub Staszak d2cf2cbae9 Introduce __builtin_expect() intrinsic support.
llvm-svn: 134761
2011-07-08 22:45:14 +00:00
Evan Cheng 284b467d9f Add support for ARM / Thumb mode switching with .code 16 and .code 32.
llvm-svn: 134760
2011-07-08 22:36:29 +00:00
Bob Wilson d0f0600b49 Update comments for SandyBridge CPU identifiers.
llvm-svn: 134759
2011-07-08 22:33:59 +00:00
Jim Grosbach 39c67b5e08 Mark tBRIND as predicable.
llvm-svn: 134758
2011-07-08 22:33:49 +00:00
Evan Cheng 60fc0fca5c Restore old behavior. Always auto-detect features unless cpu or features are specified.
llvm-svn: 134757
2011-07-08 22:30:25 +00:00
Evan Cheng fd7e3fcad3 Fix broken x86_64 tests which specify non-64-bit cpu's.
llvm-svn: 134756
2011-07-08 22:29:33 +00:00
Jim Grosbach 59a3ab6e46 Pseudo-ize tBRIND.
llvm-svn: 134755
2011-07-08 22:25:23 +00:00
Bruno Cardoso Lopes 308d7423a9 Add support for AVX 256-bit in the x86_64 ABI (as in the 0.99.5 draft)
llvm-svn: 134754
2011-07-08 22:18:40 +00:00
Eli Friedman e2f76c4ade Default 64-bit target features and SSE2 on when a triple specifies x86-64. Clean up all the other hacks which are now unnecessary.
llvm-svn: 134753
2011-07-08 22:16:47 +00:00
Cameron Zwarich a32fd210c1 Use add instead of accumulate.
llvm-svn: 134752
2011-07-08 22:13:55 +00:00
Bob Wilson eff24111b9 Recognize Intel CPUs with Family=6 and Model=44.
According to Intel Application Note 485, this value is used for
"Intel Core i7 and Intel Xeon processor".  Just include it with the other
"corei7-avx" entries.

llvm-svn: 134750
2011-07-08 22:09:35 +00:00
Bob Wilson 3c68b626e7 Reapply a fixed version of r133285.
This tightens up checking for overflow in alloca sizes, based on feedback
from Duncan and John about the change in r132926.

llvm-svn: 134749
2011-07-08 22:09:33 +00:00
Jim Grosbach 7471937ad7 Make tBX_RET and tBX_RET_vararg predicable.
The normal tBX instruction is predicable, so there's no reason the
pseudos for using it as a return shouldn't be. Gives us some nice code-gen
improvements as can be seen by the test changes. In particular, several
tests now have to disable if-conversion because it works too well and defeats
the test.

llvm-svn: 134746
2011-07-08 21:50:04 +00:00
Greg Clayton 884fb69460 Added the ability to see global variables with a variable expression path so
you can do things like:

(lldb) target variable g_global.a
(lldb) target variable *g_global.ptr
(lldb) target variable g_global.ptr[1]

llvm-svn: 134745
2011-07-08 21:46:14 +00:00
Julien Lerouge 112fcc164a Add _allrem, _aullrem and _allmul to the runtime for MSVC.
http://llvm.org/bugs/show_bug.cgi?id=10305

llvm-svn: 134744
2011-07-08 21:40:25 +00:00
Cameron Zwarich ae7bc98710 Add codegen support for the fma/fmal/fmaf builtins.
llvm-svn: 134743
2011-07-08 21:39:34 +00:00
Cameron Zwarich f03fa189ca Add an intrinsic and codegen support for fused multiply-accumulate. The intent
is to use this for architectures that have a native FMA instruction.

llvm-svn: 134742
2011-07-08 21:39:21 +00:00
Evan Cheng 964cb5feb0 For non-x86 host, used generic as CPU name.
llvm-svn: 134741
2011-07-08 21:14:14 +00:00
Jim Grosbach d61ae786bd Pseudo-ize tBX_RET and tBX_RET_vararg.
llvm-svn: 134739
2011-07-08 21:10:35 +00:00
Benjamin Kramer debe69fb37 Plug a leak by giving the AsmParser ownership of the MCSubtargetInfo.
Found by valgrind.

llvm-svn: 134738
2011-07-08 21:06:23 +00:00
Jim Grosbach cb1b0b7130 Shuffle productions around a bit.
No functional change.

llvm-svn: 134737
2011-07-08 21:04:05 +00:00
Jim Ingham 576e96e0dc New test to check that we can call functions in static methods in ObjC.
llvm-svn: 134736
2011-07-08 20:48:47 +00:00
Jakob Stoklund Olesen 4931bbc671 Be more aggressive about following hints.
RAGreedy::tryAssign will now evict interference from the preferred
register even when another register is free.

To support this, add the EvictionCost struct that counts how many hints
are broken by an eviction. We don't want to break one hint just to
satisfy another.

Rename canEvict to shouldEvict, and add the first bit of eviction policy
that doesn't depend on spill weights: Always make room in the preferred
register as long as the evictees can be split and aren't already
assigned to their preferred register.

Also make the CSR avoidance more accurate. When looking for a cheaper
register it is OK to use a new volatile register. Only CSR aliases that
have never been used before should be avoided.

llvm-svn: 134735
2011-07-08 20:46:18 +00:00
Jim Grosbach 204c128f66 Use tPseudoExpand for tTAILJMPrND and tTAILJMPr.
llvm-svn: 134734
2011-07-08 20:39:19 +00:00
Benjamin Kramer 581f48f583 Initialize all the AnalysisBasedWarnings statistics to zero.
Found by valgrind.

llvm-svn: 134733
2011-07-08 20:38:53 +00:00
Jim Grosbach 4af8647e17 Use tPseudoExpand for tTAILJMPd and tTAILJMPdND.
llvm-svn: 134732
2011-07-08 20:32:21 +00:00
Benjamin Kramer 65cc1074f3 Remove unused variable.
llvm-svn: 134731
2011-07-08 20:20:17 +00:00
Benjamin Kramer dbdff47cb3 Silence compiler warning.
llvm-svn: 134730
2011-07-08 20:18:13 +00:00
Jim Grosbach 3840c90f73 Add more info to FIXME.
llvm-svn: 134729
2011-07-08 20:18:11 +00:00
Eli Friedman f7ca26a077 Fix up dependency file name printing to more closely match that of gcc, including fixing a nasty recent regression that could make us print "/foo.h" with a command-line including "-I ./".
rdar://problem/9734352

llvm-svn: 134728
2011-07-08 20:17:28 +00:00