Commit Graph

104440 Commits

Author SHA1 Message Date
Jakob Stoklund Olesen 0e34c1dfac Prefer cheap registers for busy live ranges.
On the x86-64 and thumb2 targets, some registers are more expensive to encode
than others in the same register class.

Add a CostPerUse field to the TableGen register description, and make it
available from TRI->getCostPerUse. This represents the cost of a REX prefix or a
32-bit instruction encoding required by choosing a high register.

Teach the greedy register allocator to prefer cheap registers for busy live
ranges (as indicated by spill weight).

llvm-svn: 129864
2011-04-20 18:19:48 +00:00
Greg Clayton d828f316af Added the ability for arrays and dictionaries to contain only specific
types of values.

llvm-svn: 129863
2011-04-20 18:16:33 +00:00
Stuart Hastings 7850af6ea0 Excise unintended hunk in 129858. <rdar://problem/7662569>
llvm-svn: 129862
2011-04-20 18:09:26 +00:00
Douglas Gregor 7f97189b53 Give invalid tag types 8-bit size and alignment, rather than 1-bit
alignment, which causes traps further down the line. Fixes
<rdar://problem/9109755>, which contains a test case far too large to
commit :(

llvm-svn: 129861
2011-04-20 17:29:44 +00:00
Douglas Gregor 57477675ef Eliminate an uninteresting assertion; invalid code involving
out-of-line destructors can result in the addition of redundant
destructors to a class. It's not harmful to the AST. Fixes
<rdar://problem/9158632>.

llvm-svn: 129860
2011-04-20 17:22:00 +00:00
Caroline Tice 061defd63d Fix typo (accidental second 'const' qualifier).
llvm-svn: 129859
2011-04-20 17:14:12 +00:00
Stuart Hastings 45fe3c38c5 ARM byval support. Will be enabled by another patch to the FE. <rdar://problem/7662569>
llvm-svn: 129858
2011-04-20 16:47:52 +00:00
Ted Kremenek 23324124e4 Rename 'CXTUMemoryUsage…' to 'CXTUResourceUsage…'.
llvm-svn: 129857
2011-04-20 16:41:07 +00:00
Fariborz Jahanian 5b72ed9798 Use S.str() to force a flush.
llvm-svn: 129856
2011-04-20 16:38:37 +00:00
Greg Clayton de164aaa09 Added the ability for users to create new regex commands.
To do this currently, it must be done in multi-line mode:

(lldb) commands regex --help "Help text for command" --syntax "syntax for command" <cmd-name>

Any example that would use "f" for "finish" when there are no arguments,
and "f <num>" to do a "frame select <num>" would be:
(lldb) commands regex f
Enter multiple regular expressions in the form s/find/replace/ then terminate with an empty line:
s/^$/finish/
s/([0-9]+)/frame select %1/

(lldb) f 11
frame select 12
...
(lldb) f
finish
...

Also added the string version of the OptionValue as OptionValueString.

llvm-svn: 129855
2011-04-20 16:37:46 +00:00
Daniel Dunbar 2db3e73c38 Driver: Suppress some additional warnings with -Qunused-arguments.
llvm-svn: 129853
2011-04-20 15:44:48 +00:00
Daniel Dunbar 8991d611fd sys/Host: Change getHostTriple() to return the full Darwin version on OS X.
llvm-svn: 129852
2011-04-20 15:44:33 +00:00
Justin Holewinski 7d8895e767 PTX: Add intrinsics to list of built-in intrinsics, which allows them to be
used by Clang.  To help Clang integration, the PTX target has been split
     into two targets: ptx32 and ptx64, depending on the desired pointer size.

- Add GCCBuiltin class to all intrinsics
- Split PTX target into ptx32 and ptx64

llvm-svn: 129851
2011-04-20 15:37:17 +00:00
Rafael Espindola ed16477cb9 Behave like gnu as when a relocation crosses sections.
llvm-svn: 129850
2011-04-20 14:01:45 +00:00
Douglas Gregor 3719d3455a Be sure to flush raw_string_ostream objects in the Objective-C
rewriter, from Eric Niebler!

llvm-svn: 129849
2011-04-20 13:35:54 +00:00
Che-Liang Chiou 6586f84685 ptx: add integer div and rem instruction
Patched by Dan Bailey

llvm-svn: 129848
2011-04-20 09:28:55 +00:00
Che-Liang Chiou 5a952b3c67 ptx: add floating-point comparison to setp
Patched by Dan Bailey

llvm-svn: 129847
2011-04-20 09:28:20 +00:00
Che-Liang Chiou 49160f9a71 ptx: fix parameter ordering
Patched by Dan Bailey

llvm-svn: 129846
2011-04-20 09:27:19 +00:00
Nick Lewycky 4dae63e35b This should always be signed chars, so use int8_t. This fixes a miscompile when
llvm is built with unsigned chars where an immediate such as 0xff would be zero
extended to 64-bits, turning "cmp $0xff,%eax" into
"cmp $0xffffffffffffffff,%eax".

llvm-svn: 129845
2011-04-20 03:19:42 +00:00
Rafael Espindola e473aaf540 Remove unused arguments.
llvm-svn: 129844
2011-04-20 03:08:09 +00:00
Greg Clayton 45fa8b36d5 Added the start of a new option value system that we can use for many things
around the debugger. The class isn't hooked into anything yet, but it will be
soon. 

llvm-svn: 129843
2011-04-20 01:33:38 +00:00
Eric Christopher bcaedb5ce0 Rewrite the expander for umulo/smulo to remember to sign extend the input
manually and pass all (now) 4 arguments to the mul libcall. Add a new
ExpandLibCall for just this (copied gratuitously from type legalization).

Fixes rdar://9292577

llvm-svn: 129842
2011-04-20 01:19:45 +00:00
Daniel Dunbar c7f2f14478 llc: Fix a refacto, .loc support didn't work before 10.6.
llvm-svn: 129841
2011-04-20 00:47:19 +00:00
Sean Callanan d897f39797 Made the MC disassembler check before accessing
MCInst operands for ARM.  This allows it to be
more tolerant of malformed MCInsts or incorrect
instruction metadata.

llvm-svn: 129840
2011-04-20 00:43:34 +00:00
Douglas Gregor 49f754f423 Teach SourceManager::getSLocEntry() that it can fail due to problems
during deserialization from  a precompiled header, and update all of
its callers to note when this problem occurs and recover (more)
gracefully. Fixes <rdar://problem/9119249>.

llvm-svn: 129839
2011-04-20 00:21:03 +00:00
Daniel Dunbar cd01ed5bd6 ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OS
triple component.

llvm-svn: 129838
2011-04-20 00:14:25 +00:00
Johnny Chen dc62e59776 Fix typo in the comment.
llvm-svn: 129837
2011-04-19 23:58:52 +00:00
Daniel Dunbar 924699845a ADT/Triple: Drop support for -osx style triples, we are going with -macosx
instead.

llvm-svn: 129836
2011-04-19 23:55:20 +00:00
Daniel Dunbar fcd2389b7a TWEAK
llvm-svn: 129835
2011-04-19 23:34:21 +00:00
Daniel Dunbar 308cfd045f Driver/Darwin: Switch to using -macosx for OS name in triples.
llvm-svn: 129834
2011-04-19 23:34:17 +00:00
Daniel Dunbar 0854f347d2 ADT/Triple: Add support for Triple::MacOSX per feedback from Chris, will remove
Triple::OSX once Clang has moved.

llvm-svn: 129833
2011-04-19 23:34:12 +00:00
Caroline Tice 3ac6711aec Add the infrastructure to test instruction emulations automatically.
The idea is that the instruction to be emulated is actually executed
on the hardware to be emulated, with the before and after state of the
hardware being captured and 'freeze-dried' into .dat files.  The
emulation testing code then loads the before & after state from the
.dat file, emulates the instruction using the before state, and
compares the resulting state to the 'after' state.  If they match, the
emulation is accurate, otherwise there is a problem.

The final format of the .dat files needs a bit more work; the plan is
to generalize them a bit and to convert the plain values to key-value pairs. 
But I wanted to get this first pass committed.

This commit adds arm instruction emulation testing to the testsuite, along with
many initial .dat files.

It also fixes a bug in the llvm disassembler, where 32-bit thumb opcodes
were getting their upper & lower 16-bits reversed.

There is a new Instruction sub-class, that is intended to be loaded
from a .dat file rather than read from an executable.  There is also a
new EmulationStateARM class, for handling the before & after states.
EmulationStates for other architetures can be added later when we
emulate their instructions.

llvm-svn: 129832
2011-04-19 23:30:03 +00:00
Daniel Dunbar 914bc4106c IRgen/ARM: Fix a think-o in conversion-to-null for member function pointers, we
were computing the conversion as (ptr != 0 && non-virtual), when it should be
(ptr != 0 || is-virtual).
 - Test to follow in LLVM test-suite.

llvm-svn: 129830
2011-04-19 23:10:47 +00:00
Chris Lattner 2531eb421f some cleanups to use IRBuilder methods instead of llvm:: foo methods.
llvm-svn: 129829
2011-04-19 22:55:03 +00:00
Johnny Chen 0b8fd43397 Rename test/threads to python_api/lldbutil; it uses lldbutil functions to print stack traces.
llvm-svn: 129828
2011-04-19 22:44:20 +00:00
Johnny Chen 85866ba033 Use self.TraceOn() API.
llvm-svn: 129827
2011-04-19 22:32:57 +00:00
Greg Clayton 4c20717a8f General cleanup on the UserSettingsController stuff. There were 5 different
places that were dumping values for the settings. Centralized all of the
value dumping into a single place. When dumping values that aren't strings
we no longer surround the value with single quotes. When dumping values that
are strings, surround the string value with double quotes. When dumping array
values, assume they are always string values, and don't put quotes around
dictionary values.

llvm-svn: 129826
2011-04-19 22:32:36 +00:00
Johnny Chen 742668144e Use self.TraceOn() API.
llvm-svn: 129825
2011-04-19 22:11:23 +00:00
Daniel Dunbar 5c56828d91 Driver/Darwin: Switch to using new style triples.
llvm-svn: 129824
2011-04-19 21:45:47 +00:00
Daniel Dunbar 14ad22f09d ADT/Triple: Switch to using .isOSDarwin() predicate.
llvm-svn: 129823
2011-04-19 21:43:27 +00:00
Fariborz Jahanian 2b059998f7 Avoid superfluous warning after an error is detcted and reported.
// rdar://9132143

llvm-svn: 129822
2011-04-19 21:42:37 +00:00
Daniel Dunbar ecf1356057 Basic/Darwin: Add support for new -osx and -ios style triples (not yet used).
llvm-svn: 129820
2011-04-19 21:40:34 +00:00
Anton Korobeynikov 3c5199042a Add some macro magic: user __USER_LABEL_PREFIX__ instead of hardcoding it for each platform
llvm-svn: 129818
2011-04-19 21:22:14 +00:00
Daniel Dunbar 2b9b0e3748 ADT/Triple: Move a variety of clients to using isOSDarwin() and isOSWindows()
predicates.

llvm-svn: 129816
2011-04-19 21:14:45 +00:00
Daniel Dunbar 163a0966a9 ADT/Triple: Add isOSDarwin() and isOSWindows() helper functions.
llvm-svn: 129815
2011-04-19 21:12:05 +00:00
Daniel Dunbar 3c0fbce10b ADT/Triple: Fix Triple::getArchNameForAssembler to support OSX and iOS
enumeration values.

llvm-svn: 129814
2011-04-19 21:07:03 +00:00
Daniel Dunbar 100455a3c8 Target/X86: Eliminate uses of getDarwinVers().
llvm-svn: 129813
2011-04-19 21:04:12 +00:00
Daniel Dunbar 44b530369d Target/X86: Add getTargetTriple() accessor.
llvm-svn: 129812
2011-04-19 21:01:47 +00:00
Daniel Dunbar e3de896b5e Target/PPC: Kill off DarwinVers, which is now dead.
llvm-svn: 129811
2011-04-19 20:59:24 +00:00
Daniel Dunbar f954a0f028 Target/PPC: Eliminate a use of getDarwinVers().
llvm-svn: 129810
2011-04-19 20:57:03 +00:00