Commit Graph

38504 Commits

Author SHA1 Message Date
Daniel Dunbar
651804c3d6 MC/Mach-O x86_64: Switch to using fragment atom symbol.
- This eliminates getAtomForAddress() (which was a linear search) and
   simplifies getAtom().
 - This also fixes some correctness problems where local labels at the same
   address as non-local labels could be assigned to the wrong atom.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103480 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 17:22:50 +00:00
Dan Gohman
419e4f9263 Remove the TargetLowering::getSubtarget() virtual function, which
was unused. TargetMachine::getSubtarget() is used instead.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103474 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 16:21:03 +00:00
Kalle Raiskila
2320a44b90 Make SPU backend not assert on jump tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103466 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 11:00:02 +00:00
Evan Cheng
fb3611daad Select @llvm.trap to the special B with 1111 condition (i.e. trap) instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103459 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 07:26:32 +00:00
Douglas Gregor
7d9663c70b Fixes for Microsoft Visual Studio 2010, from Steven Watanabe!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103457 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 06:17:44 +00:00
Bill Wendling
3cbae239bb Don't create a StringRef with a NULL value.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103455 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 01:33:39 +00:00
Evan Cheng
0ce537a9db Model some vst3 and vst4 with reg_sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103453 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 01:19:40 +00:00
Bill Wendling
81043ee5dc The getDefaultSubtargetFeatures method of SubtargetFeature did actually return a
string of features for that target. However LTO was using that string to pass
into the "create target machine" stuff. That stuff needed the feature string to
be in a particular form. In particular, it needed the CPU specified first and
then the attributes. If there isn't a CPU specified, it required it to be blank
-- e.g., ",+altivec". Yuck.

Modify the getDefaultSubtargetFeatures method to be a non-static member
function. For all attributes for a specific subtarget, it will add them in like
normal. It will also take a CPU string so that it can satisfy this horrible
syntax.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103451 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 00:30:02 +00:00
Evan Cheng
31b9c44cc1 It's not safe eliminate copies where src and dst have different sub-register indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103450 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 00:20:03 +00:00
Evan Cheng
0bcccac504 Ensure REG_SEQUENCE source operands are unique.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103449 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-11 00:04:31 +00:00
Daniel Dunbar
a8251fac10 MC/Mach-O: Fix another mismatch with .weak_definition, we shouldn't use a
scattered relocation entry with a .weak_definition.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103443 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 23:15:20 +00:00
Daniel Dunbar
e9460ec057 MC/Mach-O: Factor out doesSymbolRequireExternRelocation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103442 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 23:15:13 +00:00
Evan Cheng
60ffa9467b Indentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103441 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 23:08:19 +00:00
Devang Patel
163a9f7c5f Enable multiple Compile Units in one module.
This means now 'llvm-ld a.bc b.bc' will preserve debug info appropriately.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103439 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 22:49:55 +00:00
Daniel Dunbar
071f73db4a MC/Mach-O: Explicitly track atoms, as represented by their defining symbol, for each fragment (not yet used).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103438 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 22:45:09 +00:00
Evan Cheng
e9e2ba05de Model some vld3 instructions with REG_SEQUENCE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103437 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 21:26:24 +00:00
Evan Cheng
9cc9bfaf86 It's not safe to propagate implicit_def that defines part of a register.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103436 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 21:25:30 +00:00
Evan Cheng
fc6e6a9b3b Clear RegSequences vector after eliminating REG_SEQUENCE instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103435 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 21:24:55 +00:00
Chris Lattner
601e768845 simplify more.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103431 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:59:18 +00:00
Chris Lattner
775aba2495 Simplify by using startswith instead of substr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103430 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:58:42 +00:00
Chris Lattner
fd450c026a fix PR7105 by enumerating MDNodes on all @llvm.foo
function calls, not just recognized intrinsics.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103428 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:53:17 +00:00
David Greene
e89f1c4ee7 Fix PR6875:
This includes a patch by Roman Divacky to fix the initial crash.

Move the actual addition of passes from *PassManager::add to
*PassManager::addImpl.  That way, when adding printer passes we won't
recurse infinitely.

Finally, check to make sure that we are actually adding a FunctionPass
to a FunctionPassManager before doing a print before or after it.
Immutable passes are strange in this way because they aren't
FunctionPasses yet they can be and are added to the FunctionPassManager.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103425 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:24:27 +00:00
Daniel Dunbar
dd464df687 Add new configure option, --disable-timestamps, intended to turn off anything which would mess up binary/object comparisons. Currently:
- Disables 'Built on ...' in 'foo --version'.
 - Disables timestamps from being embedded into .dir files.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103423 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:11:56 +00:00
Dan Gohman
faa19c32a2 Fix whitespace in debug output to be consistent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103422 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 20:07:44 +00:00
Evan Cheng
aad753bbbd Be careful with operand promotion. For a binary operation, the source operands may be the same. PR7018. rdar://7939869.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103419 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 19:03:57 +00:00
Evan Cheng
603afbfe2a Model vld2 / vst2 with reg_sequence.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103411 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 17:34:18 +00:00
Evan Cheng
623d3c10e1 Re-defined valno is always valno even for partial re-def's.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103410 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 17:33:49 +00:00
Bob Wilson
fde18e5eff Fix PR7096. When a block containing multiple defs is tail duplicated, the
SSAUpdater for the value from the first def may see uses of undefined values,
because the later defs will not have been updated yet.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103407 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 17:14:26 +00:00
Kalle Raiskila
26c4cf4c6f Fix encoding of 'sf' and 'sfh' instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103399 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 08:13:49 +00:00
Duncan Sands
ad017dcb3a Add an assertion to catch attempts to access off the end of the array.
Based on a patch by Javier Martinez.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103391 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-10 04:54:28 +00:00
Nathan Jeffords
bb59732d18 updated handling dllexport in X86AsmPrinter
changed dllexport code to use EmitBytes instead of EmitRawText, and changed the export option to use /EXPORT: instead of -export: on the windows platform

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103377 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-09 08:40:06 +00:00
Nathan Jeffords
071de920a0 made COFF target dllexport logic apply to all subtargets
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103373 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-09 05:52:28 +00:00
Nathan Jeffords
72e57f9441 test commit, added a comment to MCSectionCOFF::PrintSwitchToSection function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103372 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-09 05:49:00 +00:00
Chris Lattner
c7d7e0cbe0 make simplifycfg insert an llvm.trap before the 'unreachable' it introduces
when it detects undefined behavior.  llvm.trap generally codegens into some
thing really small (e.g. a 2 byte ud2 instruction on x86) and debugging this
sort of thing is "nontrivial".  For example, we now compile:

void foo() { *(int*)0 = 42; }

into:

_foo:
	pushl	%ebp
	movl	%esp, %ebp
	ud2

Some may even claim that this is a security hole, though that seems dubious
to me.  This addresses rdar://7958343 - Optimizing away null dereference 
potentially allows arbitrary code execution


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103356 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 22:15:59 +00:00
Chris Lattner
6745191070 Teach instcombine to transform a bitcast/(zext|trunc)/bitcast sequence
with a vector input and output into a shuffle vector.  This sort of 
sequence happens when the input code stores with one type and reloads
with another type and then SROA promotes to i96 integers, which make
everyone sad.

This fixes rdar://7896024



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103354 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 21:50:26 +00:00
Chris Lattner
7944c21cae Fix PR7052, patch by Jakub Staszak!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103347 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 20:01:44 +00:00
Chris Lattner
b54b9ddaaf break coff symbol definition stuff out into proper MCStreamer callbacks,
patch by Nathan Jeffords!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103346 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 19:54:22 +00:00
Daniel Dunbar
d547708976 Run interrupt routines as part of report_fatal_error, since we are failing
ungracefully.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103334 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 02:10:36 +00:00
Daniel Dunbar
fb89e08413 Add llvm::sys::RunInterruptHandlers(), which runs the registered SIGINT cleanup
stuff.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103333 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-08 02:10:34 +00:00
Dan Gohman
59dc60337f When pruning candidate formulae out of an LSRUse, update the
LSRUse's Regs set after all pruning is done, rather than trying
to do it on the fly, which can produce an incomplete result.

This fixes a case where heuristic pruning was stripping all
formulae from a use, which led the solver to enter an infinite
loop.

Also, add a few asserts to diagnose this kind of situation.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103328 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:36:59 +00:00
Devang Patel
c665a5146d Instead of just verifying compile unit, verify entire type, variable, namespace etc..
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103327 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:33:41 +00:00
Devang Patel
a49d877290 Remove DIGlobal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103325 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:19:07 +00:00
Devang Patel
47e2265a30 Add DINameSpace::Verify().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103318 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 23:04:32 +00:00
Dan Gohman
4ce86f459c SDDbgValues are apparently not being legalized. Fix a symptom of the problem,
and not the real problem itself, by dropping debug info for i128 values.
rdar://7958162.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103310 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:19:08 +00:00
Dan Gohman
66797ff2e1 Minimally fix this code to not abort on mdnodes with integer data
wider than 64 bits.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103309 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:15:24 +00:00
Devang Patel
02f0dbd97a Verify variable directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103305 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 22:04:20 +00:00
Chris Lattner
6e5ce287b0 add COFF support for COMDAT sections, patch by Nathan Jeffords!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103304 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:49:09 +00:00
Devang Patel
9c00487dc3 Verify entire type descriptor not just tag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103303 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:45:47 +00:00
Kevin Enderby
a6eeb6e226 Fix i386 relocations to Weak Definitions. The relocation entries should be
external and the item to be relocated should not have the address of the
symbol added in.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103302 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:44:23 +00:00
Devang Patel
62077af40e Verify compile unit also.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103300 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:42:24 +00:00
Dale Johannesen
0a406ae0d9 Fix PR 7087, and probably other things, by extending
getConstantFP to accept the two supported long double
target types.  This was not the original intent, but
there are other places that assume this works and it's
easy enough to do.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103299 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 21:35:53 +00:00
Devang Patel
e9f8f5e600 Wrap const MDNode * inside DIDescriptor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103295 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 20:54:48 +00:00
Jim Grosbach
4b77f6a85a Clean up the conditional for handling of sign_extend_inreg based on
whether the extract instructions are available.

rdar://7956878



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103277 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:34:55 +00:00
Devang Patel
ed66bf5125 Use overloaded operators instead of DIDescriptor::getNode()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103276 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:19:32 +00:00
Devang Patel
2db49d797b Avoid DIDescriptor::getNode(). Use overloaded operators instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103272 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:11:54 +00:00
Kalle Raiskila
021b5ef903 Testing svn access with a note added to documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103271 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 18:06:28 +00:00
Ted Kremenek
d51409ae9e Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103269 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 17:29:48 +00:00
Chris Lattner
eb40a0fd98 switch MCSectionCOFF from a syntactic to semantic representation,
patch by Peter Housel!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103267 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 17:17:41 +00:00
Ted Kremenek
5fa680d397 Update CMake build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103266 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 17:13:20 +00:00
Dan Gohman
9a7063e7ee Add some words to this output to indicate what the numbers mean.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103264 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 16:39:27 +00:00
Dan Gohman
ef0b14593b Add a simple module-level debug info printer. It just sets up a
DebugInfoFinder and iterates over all the contents calling print.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103262 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 16:22:32 +00:00
Dan Gohman
c014d0963e Fix the new print functions to call print instead of dump.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103261 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 16:17:22 +00:00
Dan Gohman
28a193ed8b Add an LLVM IR version of code sinking. This uses the same simple algorithm
as MachineSink, but it isn't constrained by MachineInstr-level details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103257 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 15:40:13 +00:00
Dan Gohman
504043662c Convert the DebugInfo classes dump() methods into print(raw_ostream &)
methods, and add dump functions implemented in terms of the print.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103254 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 15:30:29 +00:00
Evan Cheng
435d499177 Use VLD2q32 / VST2q32 to reload / spill QQ (pair of Q) registers when stack slot is sufficiently aligned. Use VLDMD / VSTMD otherwise.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103235 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 02:04:02 +00:00
Evan Cheng
07a6d9391c Use VSTMD / VLDMD for spills and reloads of Q registers instead of VSTMQ / VLDQ. The later are aliases which ought to be eliminated but we can't because they are used for storing and loading v2f64 values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103234 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:54:08 +00:00
Nick Lewycky
403d312c0f Revert r103133 and add testcase from PR7066.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103233 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:45:38 +00:00
Dan Gohman
0d881042c0 When rematerializing, use the debug location of the original
instruction, rather than a location near where the new instruction
is being inserted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103232 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:28:10 +00:00
Dan Gohman
fb95f89e8e Transfer debug location information from PHI nodes to resulting
lowered copies.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103228 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:10:20 +00:00
Dan Gohman
cc751bb99c Print debug information for SDNodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103227 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:09:21 +00:00
Dan Gohman
281d65d004 Disable the new unknown-location code for now. It causes a major
increase in the debug line info section, and it's causing
regressions in a gdb testsuite.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103226 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 01:08:53 +00:00
Evan Cheng
c10b5afbe8 Remove VLD1q and VST1q for reloading and spilling Q registers. Just use VLD1q64 / VST1q64 and reference sub-registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103218 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-07 00:24:52 +00:00
Daniel Dunbar
c26ae5ab7e MC/X86: X86AbsMemAsmOperand is subclass of X86NoSegMemAsmOperand.
- This fixes "leal 0, %eax", for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103205 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 22:39:14 +00:00
Chris Lattner
e1611f26e3 fix rdar://7947167 - llvm-mc doesn't match movsq
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103199 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 21:48:14 +00:00
Sean Callanan
1a8b789a4b Eliminated the classification of control registers into %ecr_
and %rcr_, leaving just %cr_ which is what people expect.
Updated the disassembler to support this unified register set.
Added a testcase to verify that the registers continue to be
decoded correctly.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103196 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 20:59:00 +00:00
Daniel Dunbar
a5d0b54ec1 MC/X86: Error out if we see a non-constant FK_Data_1 or FK_Data_2 fixup, since
we don't currently support relaxing them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103195 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 20:34:01 +00:00
Dan Gohman
34dcc6fadc Add a DebugLoc argument to TargetInstrInfo::copyRegToReg, so that it
doesn't have to guess.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103194 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 20:33:48 +00:00
Evan Cheng
746ad69e08 Add argument TargetRegisterInfo to loadRegFromStackSlot and storeRegToStackSlot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103193 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 19:06:44 +00:00
Evan Cheng
e9b3ac27dd 80 col violation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103185 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 16:33:12 +00:00
Bob Wilson
429009b0f1 Add a missing break statement to fix unintentional fall-through
(replacing the previous patch for the same issue).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103183 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 16:05:26 +00:00
Jim Grosbach
d31f00b7f7 Fix unintentional fallthrough. Patch by Edmund Grimley-Evans <Edmund.Grimley-Evans@arm.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103181 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 15:32:49 +00:00
Shantonu Sen
eae216c6d3 Fix "warning: extra ';' inside a struct or union" when building llvm with clang
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103179 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 14:57:47 +00:00
Daniel Dunbar
5fe03c023c Revert r103137, fix for $ in labels. It looks like we can't actually handle this
at the token level. Consider the following horrible test case:

  a = 1
  .globl $a
  movl ($a), %eax
  movl $a, %eax
  movl $$a, %eax

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103178 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 14:46:38 +00:00
Evan Cheng
b63387afc6 Re-apply 103156 and 103157. 103156 didn't break anything. 10315 exposed a coalescer bug that's fixed by 103170.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103172 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 06:36:08 +00:00
Evan Cheng
62bb2f63f9 Fixes a coalescer bug that caused llc to crash on 2009-11-30-LiveVariablesBug.ll
with the fix in 103157.

%reg1039:1<def> = VMOVS %S1<kill>, pred:14, pred:%reg0
is not coalescable since none of the super-registers of S1 are in reg1039's
register class: DPR_VFP2. But it is still a legal copy instruction so it should
not assert.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103170 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 06:23:31 +00:00
Dan Gohman
1ef7c82128 Revert r103157, which broke test/CodeGen/ARM/2009-11-30-LiveVariablesBug.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103163 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 05:08:57 +00:00
Eric Christopher
f865cb5c1f Revert r103156 since it was breaking the build bots.
Reverse-merging r103156 into '.':
U    lib/Target/ARM/ARMInstrNEON.td
U    lib/Target/ARM/ARMRegisterInfo.h
U    lib/Target/ARM/ARMBaseRegisterInfo.cpp
U    lib/Target/ARM/ARMBaseInstrInfo.cpp
U    lib/Target/ARM/ARMRegisterInfo.td



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103159 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 02:29:06 +00:00
Dan Gohman
06572793a7 Handle the case where open(2) or close(2) is interrupted by a signal when
automatic syscall restarting is disabled.

Also, fix the build on systems which don't define EWOULDBLOCK.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103158 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 02:06:20 +00:00
Evan Cheng
9c35ee2099 Fix an obvious bug in isMoveInstr. It needs to return sub-register indices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103157 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 01:54:03 +00:00
Evan Cheng
4ffc22ae00 Adding pseudo 256-bit registers QQ0 . . . QQ7 to represent pairs of Q registers. These will be used to model VLD2 / VST2 instructions in order to get substantially better codegen for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103156 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 01:52:03 +00:00
Evan Cheng
d31c5496d7 Cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103155 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 01:34:11 +00:00
Evan Cheng
7f2f436267 storeRegToStackSlot has forgotten about QPR_8 register class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103154 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 01:32:54 +00:00
Dan Gohman
5fe89d0126 Handle EWOULDBLOCK as EAGAIN. And add a comment explaining why
EAGAIN and EWOULDBLOCK are used here.

Also, handle the case where a write call is interrupted after
some data has already been written.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103153 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 01:27:36 +00:00
Dan Gohman
7539584781 Update LabelsBeforeInsn also, when creating unknown-position labels.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103145 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 00:29:41 +00:00
Chris Lattner
b4202dbb36 Fix PR7054 - Assertion `Symbol->isUndefined() && "Cannot define a symbol twice!"' failed.
Users can write broken code that emits the same label twice with asm renaming,
detect this and emit a fatal backend error instead of aborting.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103140 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 00:05:37 +00:00
Dan Gohman
97c94b8fc6 In bottom-up mode, defer the materialization of local constant values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103139 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-06 00:02:14 +00:00
Dan Gohman
a7a0ed7901 Add an "IsBottomUp" member function to FastISel, which will be used to
support a new bottom-up mode.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103138 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 23:58:35 +00:00
Chris Lattner
851f87c6c9 fix rdar://7946934 - in some limited cases, the assembler should
allow $ at the start of a symbol name.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103137 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 23:51:28 +00:00
Jim Grosbach
29402132f3 Cleanup of ARMv7M support. Move hardware divide and Thumb2 extract/pack
instructions to subtarget features and update tests to reflect.
PR5717.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103136 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 23:44:43 +00:00
Dan Gohman
1cc0d62855 Emit debug info for MachineInstrs with unknown debug locations, instead
of just letting them inherit the debug locations of adjacent instructions.

Debug info should aim to be either accurate or absent.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103135 91177308-0d34-0410-b5e6-96231b3b80d8
2010-05-05 23:41:32 +00:00